This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Info about struct members in ELF?
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Torsten Mohr <tmohr at s dot netic dot de>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 7 Nov 2003 07:51:17 +0100
- Subject: Re: Info about struct members in ELF?
- References: <200311070837.54848.tmohr@s.netic.de>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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