Info about struct members in ELF?
Jakub Jelinek
jakub@redhat.com
Fri Nov 7 08:55:00 GMT 2003
On Fri, Nov 07, 2003 at 08:37:54AM +0100, Torsten Mohr wrote:
> Hi,
>
> 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.
You want to look at debugging sections.
Most often Dwarf2/3:
http://www.eagercon.com/dwarf/dwarf3std.htm
or Stabs:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/doc/stabs.texinfo?cvsroot=src
are used.
Jakub
More information about the Binutils
mailing list