From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29580 invoked by alias); 7 Dec 2012 17:03:33 -0000 Received: (qmail 29564 invoked by uid 22791); 7 Dec 2012 17:03:31 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.151) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 07 Dec 2012 17:03:27 +0000 Received: from md14.u-strasbg.fr (md14.u-strasbg.fr [130.79.200.249]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qB7H3AIe073184 ; Fri, 7 Dec 2012 18:03:10 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms14.u-strasbg.fr [130.79.204.114]) by md14.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qB7H39PG010677 ; Fri, 7 Dec 2012 18:03:09 +0100 Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qB7H393T032355 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Fri, 7 Dec 2012 18:03:09 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Pedro Alves'" Cc: "'Joel Brobecker'" , "'Eli Zaretskii'" , References: <834nm07z0s.fsf@gnu.org> <5077FEB9.4030304@redhat.com> <83y5jb7rfe.fsf@gnu.org> <006001cdaada$00c81f00$02585d00$@muller@ics-cnrs.unistra.fr> <20121024194517.GK3555@adacore.com> <011901cdb2ab$48076b90$d81642b0$@muller@ics-cnrs.unistra.fr> <20121105171121.GA2972@adacore.com> <50991f5f.8382440a.1100.ffff82abSMTPIN_ADDED@mx.google.com> <509ABA17.30507@redhat.com> <000301cdbd96$f5cd9f10$e168dd30$@muller@ics-cnrs.unistra.fr> <20121122173019.GF9964@adacore.com> <50b2a0d1.c849420a.3a3a.3538SMTPIN_ADDED_BROKEN@mx.google.com> <50C21B58.3040904@redhat.com> In-Reply-To: <50C21B58.3040904@redhat.com> Subject: RE: [RFC-v4] Fix .text section offset for windows DLL (was Calling __stdcall functions in the inferior) Date: Fri, 07 Dec 2012 17:03:00 -0000 Message-ID: <000001cdd49c$bba71b50$32f551f0$@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: 2012-12/txt/msg00189.txt.bz2 Hi Pedro, The values are indeed included in include/coff/pe.h header... The problem is that coff-pe-read.c was=20 written completely without the use of this header. Using that header would probably be better, but would also require even more rewrite of current code... I tried nevertheless to include coff/pe.h I got an error about AOUTHDR not being defined, which requires adding coff/external.h but if I add that one, I get another error that L_LNNO_SIZE must be defined... And that one is defined in cpu specific files coff/CPU.h This seems to mean that including pe.h is not that easy :( Pierre > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Pedro Alves > Envoy=E9=A0: vendredi 7 d=E9cembre 2012 17:38 > =C0=A0: Pierre Muller > Cc=A0: 'Joel Brobecker'; 'Eli Zaretskii'; gdb-patches@sourceware.org > Objet=A0: Re: [RFC-v4] Fix .text section offset for windows DLL (was Call= ing > __stdcall functions in the inferior) >=20 > On 11/25/2012 10:50 PM, Pierre Muller wrote: > >>> > > +#ifndef IMAGE_SCN_CNT_CODE > >>> > > +# define IMAGE_SCN_CNT_CODE 0x20 > >>> > > +#endif > >>> > > +#ifndef IMAGE_SCN_CNT_INITIALIZED_DATA > >>> > > +# define IMAGE_SCN_CNT_INITIALIZED_DATA 0x40 > >>> > > +#endif > >>> > > +#ifndef IMAGE_SCN_CNT_UNINITIALIZED_DATA > >>> > > +# define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x80 > >>> > > +#endif > >> > Do you have an idea of when these macros might not be defined? > >> > (and where they are normally coming from?). It'd be nice to add > >> > a comment providing the answer to those questions. > > > > These are windows specific macros, > > but can also be compiled on any other target, if one > > of the windows target is included in the target list. >=20 > But then, when _are_ they defined? You mean they're being picked > up by something including windows.h on Windows hosts? > It'd be much better if they were defined in src/include/coff/pe.h, > like other IMAGE_SCN_ constants. >=20 > -- > Pedro Alves