Resources
| Sourcery G++ Data Sheet | |
| Register for a Sourcery G++ Evaluation | |
| Buy Sourcery G++ Today! |
Mailing Lists
| Announcements | |
| Discuss |
Do runtime libraries shipped with Sourcery G++ include debugging information, or are they stripped? What do I have to do to be able to debug library code?
Question
Do runtime libraries shipped with Sourcery G++ include debugging information, or are they stripped? What do I have to do to be able to debug library code?
Answer
Shared libraries, such as GLIBC, that are provided with Sourcery G++ for GNU/Linux targets are stripped to include only static symbol table and .debug_frame information. This results in a more compact sysroot installation on the target. Stripping the remaining debug information to further reduce the size of the libraries is not recommended as it can break backtracing through library code and thread debugging, and the space savings are comparatively small.
On GNU/Linux targets, library debug information is available as an add-on to Professional and Standard Edition subscribers. Refer to the section "Installing Add-Ons" in the installation chapter of the Getting Started guide for instructions on downloading add-ons from the Sourcery G++ IDE. To debug library code, you should install both the library debug information add-on for the multilib you are using, and the corresponding library source code add-on. Once you have installed the add-ons, the debugger can load the debug information automatically; no special debugger configuration is necessary.
On EABI, ELF, and uClinux targets where libraries are statically linked, the libraries provided with Sourcery G++ do contain debug information. You may strip your executables after linking, if you wish. On the other hand, if you want to debug library code, most Sourcery G++ toolchains for these targets have an available library source code add-on for Professional and Standard Edition subscribers. Follow the instructions in the Getting Started guide to install the add-on. The debugger can then find the installed library source code automatically.
Note that library source code is also provided in the freely-available Sourcery G++ source packages. However, the library source code add-ons are prepackaged for use from the debugger and also include additional source files generated automatically during the build process.
This entry was last updated on 6 January 2010.