This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: stabs changes for 64 bit targets
- From: Tristan Gingold <gingold at adacore dot com>
- To: David Taylor <dtaylor at emc dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 14 May 2013 11:29:50 +0200
- Subject: Re: stabs changes for 64 bit targets
- References: <19214 dot 1368457950 at usendtaylorx2l>
On May 13, 2013, at 5:12 PM, David Taylor wrote:
> [I originally sent this to the binutils, gcc, and gdb lists; but on the
> original I misspelled sourceware on the binutils address; so, I'm
> resending just to binutils.]
>
> There are problems when using current STABS debug format for 64 bit
> targets.
>
> A STABS entry is 12 bytes:
>
> . e_strx (4 bytes)
> . e_type (1 byte)
> . e_other (1 byte)
> . e_desc (2 bytes)
> . e_value (4 bytes)
>
> Unless you have an awfully lot of debug information, 4 bytes for a
> string table index is fine. But, for 64 bit targets, 4 bytes for an
> address is not so good.
Note that on some targets (eg mach-o x86-64), the e_value field is already
8 bytes, so this is a per target issue.
You could also add a pseudo instruction to switch to wider stabs entry instead
of a command line switch.
I'd personally prefer .stab64 for the section name, as it is more meaningful than
.stab2. If we need 8 bytes string offset, what about .stab64s64
Just thoughts.
Tristan.