1

For context: when running gdb on a stripped binary and while in posession of a debuginfo rpm corresponding to the binary being debugged, all of the mangled function names are replaced by their respective non-mangled equivalents from the debuginfo rpm.

Assume the same essential scenario (i.e. you have some ELF file that has been stripped of all debugging information, and that you have a debuginfo rpm corresponding to the same ELF file that has all the debugging symbols in it). Given those assumptions, is there a quick and easy way to make objdump aware of those debugging symbols such that objdump outputs the function names from the debuginfo rpm instead of mangled symbols?

I've read through the docs for objdump, and it doesn't look like it has the capability to read debuginfo rpms. objdump -C is close, but it doesn't give the exact same names as those in the debuginfo rpm, and I really do need the names to be exactly identical.

Alternatively, if there's no out-of-the-box solution, is there a library of some sort for reading the debuginfo rpms that would make it easier to script a "find-and-replace" the mangled objdump function names?

Thanks!

Edit: If it simplifies the problem, all the debuginfos are in the same format, DWARF version 4.

rmg
  • 59
  • 5

1 Answers1

0

I don't think there is an easy solution... the gdb functionality you are talking about is a feature of the gdb executable and not anything the debuginfo RPM is doing beyond just dropping files in the right place.

The only thing I can think of is some kind of un-strip - that's been asked before and seems to be non-trivial.

Aaron D. Marasco
  • 6,506
  • 3
  • 26
  • 39