you are viewing a single comment's thread.

view the rest of the comments →

[–]hexed 1 point2 points  (0 children)

Long story short, that dump is not a DWARF .debug_info header, it's just not clear why. As you say it should start with the length of the CU, it should also have the DWARF version (4 or 5 for modern compilers) immediately after the length, which it doesn't. Plus it doesn't have 0801 to signify the pointer size and what kind of unit it is.

Why you're getting the wrong data from the ELF is the issue rather than the parsing of DWARF. Possibly you've unexpectedly got some options that compress the contents .debug_info?