From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23008 invoked by alias); 15 Sep 2010 08:25:01 -0000 Received: (qmail 22990 invoked by uid 22791); 15 Sep 2010 08:25:00 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT,TW_BJ X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Sep 2010 08:24:55 +0000 Received: from md1.u-strasbg.fr (md1.u-strasbg.fr [IPv6:2001:660:2402::186]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o8F8OVbu017284 ; Wed, 15 Sep 2010 10:24:31 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms8.u-strasbg.fr [IPv6:2001:660:2402:d::17]) by md1.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o8F8OUCo083387 ; Wed, 15 Sep 2010 10:24:30 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o8F8OTrH025979 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Wed, 15 Sep 2010 10:24:30 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Tristan Gingold'" Cc: 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> In-Reply-To: <9B2E419A-9C35-40DD-8979-B19C4FD69BD4@adacore.com> Subject: RE: [RFC] Improve stabs debugging for mingw64 executables loaded at high addresses Date: Wed, 15 Sep 2010 08:33:00 -0000 Message-ID: <001401cb54af$6d2e6c40$478b44c0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00283.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Tristan Gingold > Envoy=E9=A0: Wednesday, September 15, 2010 9:29 AM > =C0=A0: Pierre Muller > Cc=A0: gdb-patches@sourceware.org > Objet=A0: Re: [RFC] Improve stabs debugging for mingw64 executables > loaded at high addresses >=20 >=20 > On Sep 14, 2010, at 5:24 PM, Pierre Muller wrote: >=20 > >>> 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. >=20 > 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? =20 > 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). =20 > 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! =20=20 > > 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. >=20 > 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. =20=20 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