Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Embedded Linux Projects Using Yocto Project Cookbook

You're reading from  Embedded Linux Projects Using Yocto Project Cookbook

Product type Book
Published in Mar 2015
Publisher
ISBN-13 9781784395186
Pages 324 pages
Edition 1st Edition
Languages
Author (1):
Alex Gonzalez Alex Gonzalez
Profile icon Alex Gonzalez

Table of Contents (13) Chapters

Embedded Linux Projects Using Yocto Project Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
The Build System The BSP Layer The Software Layer Application Development Debugging, Tracing, and Profiling Index

Cross GDB debugging


When we run a cross compiled GDB in the host, which connects to a native gdbserver running on the target, it is referred to as cross debugging. This is the same scenario we saw in the Using the Eclipse IDE recipe earlier, except that Eclipse uses the Target Communications Framework (TCF). Cross debugging has the advantage of not needing debug information on target images, as they are already available in the host.

This recipe will show how to use a cross GDB and gdbserver.

Getting ready

To include gdbserver in your target image, you can use an -sdk image, or you can add the tools-debug feature to your image by adding the following to your conf/local.conf configuration file:

EXTRA_IMAGE_FEATURES += "tools-debug"

So that GDB can access debug information of the shared libraries and executables, add the following to the conf/local.conf file:

EXTRA_IMAGE_FEATURES += "dbg-pkgs"

The images running on the target and the toolchain's sysroot need to match. For example, if you are using...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}