Debugging a static library using Eclipse CDT

I am working on an installation with Eclipse CDT for some embedded development, and it is difficult for me to get the initial level debugging that works for static libraries.

I use my own Make files, so this is my first suspect right now, especially since gdb claims that for functions without a source, there is no information about the character table. When using a static library, is the debug information from the library usually included in the ELF file from the final link stage? Right now, I see the full source / assembly if I specify objdump -S in the .a file, but none of the debug data does it in .elf. Information / debug source is present for the main application. Did I miss some switch to say ld to enable this?

Otherwise, the best way to get gdb to tell me what it seeks (and does not find) for debugging information for a particular function.

+3
source share
2 answers

Figured it out.

The lesson is very simple: always, always, triple checking your files. Still attached to an old copy of a static library built without debugging information.

+3
source

I would suggest that GDB simply cannot find the source files that come with this debugging information. See http://web.mit.edu/gnu/doc/html/gdb_9.html#SEC51 for documentation on how to determine where to find the source files.

0
source

Source: https://habr.com/ru/post/1720531/


All Articles