This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dwarf line output from readelf -wl


Hi Torleif,

I have used readelf quite a bit, and on several occasions found that I would like an output of the mapping between addresses and source locations
from .debug_line in an objectfile..

Are you aware of the addr2line tool ? (Also part of the binutils package). It takes addresses and displays their corresponding file name and source line number.


Invoking readelf with the -wl option, I am only able to see the
opcodes passed to the DWARF state machine and not the address<->
source location mapping.

Is this intentional?

Yes...


Would it be better to replace the current output from -wl with the
address<->source mapping?

No. One of the purposes of the readelf tool is to be able to display the ELF or DWARF information in a low level format so that it can be debugged. ie the tool is intended to help tracing bugs in the generation of the ELF and DWARF information. If the tool did not display the DWARF opcodes it would be much harder to diagnose a problem in their generation.


Could a new option be added to serve this purpose?

Now this is certainly a possibility. Would you like to volunteer to add it ? :-)


Cheers
  Nick



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]