Skip to content

liubdwarf, cpptrace, function names and -g #248

Answered by davea42
marlowa asked this question in Q&A
Discussion options

You must be logged in to vote

Building from github davea42 libdwarf-code is the right way. I recently fixed some bugs related
to .debug_rnglists and .debug.loclists sections (they could return incomplete or incorrect
address ranges and locations in come cases).

Building with -g tells the compiler to emit debugging symbols. These days the default kind
of symbol table is (usually) DWARF, and often specifically DWARF5.

Without -g there will normally be no DWARF. However, the compiler
will emit (assuming Elf here) Elf symbols.

As shown by something like:
readelf --syms a.out

gdb accumulates all the information it can, so it finds the Elf symbols and can do useful
things with that knowledge.

libdwarf, on the other hand, on…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by davea42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants