Open mpickering opened 5 years ago
I added support for parsing .debug_line
to dwarf
and now we get line numbers as well.
The remaining issues are about how to upstream the changes to dwarf
as I also had to remove some unnecessary dependencies (text-show
and lens
)
dwarf
support to return state machine rather than interpreted commandsdwarf
.I added a small patch this evening which prints out the portion of the source file the dwarf information points to, like how list *
works in gdb.
The lookup logic is wrong somewhere. The info table pointer looks correct but I get a different result to list *
.
Looking at the debug_line
dump all the addresses look quite wrong so not sure what's happening here.
I fixed the upstream libraries, and the changes are merged in but need to wait for a new release so we can remove the submodules.
I have tried to read DWARF information from the binary using
dwarfadt
so we can map an address to a line number.I need to work out how
list *
in gdb works. Does it use the.debug_line
section?My first attempt was to try to find the subprogram recursively (which worked) but then it lacked location information.