This is the mail archive of the binutils@sources.redhat.com 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: Info about struct members in ELF?


On Fri, Nov 07, 2003 at 08:37:54AM +0100, Torsten Mohr wrote:
> from an ELF file i can get some info about a const struct,
> for example its address, its size and its content.
> 
> Does ELF support me somehow in interpreting the content?
> 
> For example "member 2 has offset 6 and size 2"?
> 
> I don't think i can get this info from the ELF file,
> but the debugger somehow has this information.  I
> can't think where else he can get it from.

Yes, this information may be in the debug sections of an ELF file.
The debug info will likely either be DWARF2/3
(http://www.eagercon.com/dwarf/dwarf3std.htm) or STABS
(http://sources.redhat.com/gdb/current/onlinedocs/stabs.html).

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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