This is the mail archive of the 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: stabs changes for 64 bit targets

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.


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