Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Tristan Gingold'" <gingold@adacore.com>
Cc: <gdb-patches@sourceware.org>
Subject: RE: [RFC] Improve stabs debugging for mingw64 executables loaded at high addresses
Date: Wed, 15 Sep 2010 08:33:00 -0000	[thread overview]
Message-ID: <001401cb54af$6d2e6c40$478b44c0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <9B2E419A-9C35-40DD-8979-B19C4FD69BD4@adacore.com>



> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Tristan Gingold
> Envoyé : Wednesday, September 15, 2010 9:29 AM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFC] Improve stabs debugging for mingw64 executables
> loaded at high addresses
> 
> 
> On Sep 14, 2010, at 5:24 PM, Pierre Muller wrote:
> 
> >>> Comments welcome,
> >>
> >> I think that some 64 bits targets have 8 bytes for the address.
> >
> >
> >  Of course, dwarf debugging doesn't suffer from this limitation,
> > and uses 8-byte for addresses.
> >  This is the default format for most 64-bit targets,
> > and it is the preferred debugging format for 64-bit
> > because of this 4-byte limitation of stabs...
> >  So this is really a marginal case that I presented here.
> 
> To clarify, I meant that some 64 bits targets have 8 bytes for the
> address in *stabs*.
> (eg: darwin64 - but the use of stabs is deprecated for this target).

  Sorry for misunderstanding you.
  I didn't know about a 64-bit version of stabs.
  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."

But nothing changed in code apparently.
  Where is the source of the support for 64-bit stabs for darwin64?

 
> 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



  reply	other threads:[~2010-09-15  8:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14 17:15 Pierre Muller
2010-09-14 17:32 ` Tristan Gingold
2010-09-14 17:50   ` Pierre Muller
2010-09-15  8:30     ` Tristan Gingold
2010-09-15  8:33       ` Pierre Muller [this message]
2010-09-15 12:42         ` Tristan Gingold
     [not found]   ` <47535.3697002449$1284477885@news.gmane.org>
2010-09-14 20:56     ` Tom Tromey
2010-09-15 11:54       ` Pierre Muller
2010-09-14 18:15 ` Michael Snyder
2010-09-14 19:07   ` Joel Brobecker
2010-09-15  9:57     ` Pierre Muller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001401cb54af$6d2e6c40$478b44c0$@muller@ics-cnrs.unistra.fr' \
    --to=pierre.muller@ics-cnrs.unistra.fr \
    --cc=gdb-patches@sourceware.org \
    --cc=gingold@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox