This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Improve stabs debugging for mingw64 executables loaded at high addresses
- From: Tristan Gingold <gingold at adacore dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: <gdb-patches at sourceware dot org>
- Date: Wed, 15 Sep 2010 10:33:47 +0200
- Subject: Re: [RFC] Improve stabs debugging for mingw64 executables loaded at high addresses
- References: <000701cb541e$1160cde0$342269a0$@muller@ics-cnrs.unistra.fr> <282E4D5B-2863-4CC2-99EE-76A36BDE8A9F@adacore.com> <000a01cb5420$e7a44420$b6eccc60$@muller@ics-cnrs.unistra.fr> <9B2E419A-9C35-40DD-8979-B19C4FD69BD4@adacore.com> <001401cb54af$6d2e6c40$478b44c0$@muller@ics-cnrs.unistra.fr>
On Sep 15, 2010, at 10:24 AM, Pierre Muller wrote:
> This is not in GNU binutils then, because
> bfd/stabs.c still has a macro called STABSIZE equal to 12
> which only allows for a 4-byte address at offset 8 for stab value field.
> There is a FIXME at line 39:
> "FIXME: This will have to change for a 64-bit object format."
bfd/stabs.c is only for linking.
> But nothing changed in code apparently.
> Where is the source of the support for 64-bit stabs for darwin64?
bfd/mach-o.c:bfd_mach_o_read_symtab_symbol
and
gdb/machoread.c:macho_symtab_read (this doesn't use dbxread.c)
>> OTOH, dbxread.c seems to be bound to 32-bits stabs address.
>
> Which seems logical as also bfd only supports 32-bit,
> I would be interested in extending support for 64-bit
> stabs (which I would then implement inside Free Pascal too).
>
>> I am not sure it is right to set objfile->section_offsets->offsets.
>
> I am not either, that why this is really only a
> Request For Comments!
>
>>> The thing is that, for Free Pascal, we have lots of
>>> troubles with DWARF (and some 64-bit specific),
>>> thus I would like to be able to use STABS format (which
>>> is less troublesome) but that also didn't work
>>> because of this high address default base used by this compiler.
>>
>> So, it might be worth fixing Free Pascal too !
> I could change the default load address inside Free Pascal Source
> if stabs is used, but I wanted to try this out,
> and as it seemed to help, I wanted to share it as a RFC.
>
> But this addition would allow to handle dynamic libraries
> (whose load address might be above the 0x100000000 threshold).
> But I remember that for windows at least, there is an
> incompatibility between relocation and stabs.
>
> Pierre
>
>