O'Reilly logo

Embedded Linux Projects Using Yocto Project Cookbook by Alex González

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required