O'Reilly logo

Linux: Embedded Development by Chris Simmonds, Alex González, Alexandru Vaduva

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

Using strace for application debugging

Debugging does not always involve working with source code. Sometimes it is a change in an external factor that is causing the problem.

Strace is a tool that is useful for scenarios where we are looking for problems outside of the binary itself; for example configuration files, input data, and kernel interfaces. This recipe will explain how to use it.

Getting ready

To include strace in your system, add the following to your conf/local.conf file:

IMAGE_INSTALL_append = " strace"

Strace is also part of the tools-debug image feature, so you can also add it with:

EXTRA_IMAGE_FEATURES += "tools-debug"

Strace is also included in the -sdk images.

Before starting, we will also include pgrep, a process utility that will make ...

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