From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 845 invoked by alias); 7 Dec 2012 17:50:50 -0000 Received: (qmail 827 invoked by uid 22791); 7 Dec 2012 17:50:48 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 07 Dec 2012 17:50:45 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qB7Hob1E018310 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Dec 2012 12:50:40 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qB7HoZAD010312; Fri, 7 Dec 2012 12:50:36 -0500 Message-ID: <50C22C6B.2080906@redhat.com> Date: Fri, 07 Dec 2012 17:50:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Pierre Muller CC: "'Joel Brobecker'" , "'Eli Zaretskii'" , gdb-patches@sourceware.org Subject: Re: [RFC-v4] Fix .text section offset for windows DLL (was Calling __stdcall functions in the inferior) 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> <000001cdd49c$bba71b50$32f551f0$@muller@ics-cnrs.unistra.fr> In-Reply-To: <000001cdd49c$bba71b50$32f551f0$@muller@ics-cnrs.unistra.fr> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/msg00194.txt.bz2 Please don't top post. On 12/07/2012 05:03 PM, Pierre Muller wrote: > Hi Pedro, > > The values are indeed included in include/coff/pe.h header... > The problem is that coff-pe-read.c was > 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 :( Yuck. It'd be nice if the architecture independent bits of pe.h were split into a separate file, e.g., pe-common.h. But I'll agree that this should not be a requirement for this patch. But I'm still confused on why do you need "#ifndef IMAGE_SCN_CNT_CODE" instead of unconditionally defining the constants. What is pulling a header that defines these? -- Pedro Alves