From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25152 invoked by alias); 24 May 2011 11:43:19 -0000 Received: (qmail 25134 invoked by uid 22791); 24 May 2011 11:43:18 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,MSGID_MULTIPLE_AT,TW_DJ,TW_GP,TW_JG X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.155) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 May 2011 11:43:00 +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 p4OBgsus022149 ; Tue, 24 May 2011 13:42:54 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms7.u-strasbg.fr [130.79.204.16]) by md1.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p4OBgsrD042226 ; Tue, 24 May 2011 13:42:54 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (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 p4OBgrqJ025220 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Tue, 24 May 2011 13:42:53 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Pedro Alves'" Cc: References: <005001cc19e6$fe446750$facd35f0$@muller@ics-cnrs.unistra.fr> <201105240951.07933.pedro@codesourcery.com> In-Reply-To: <201105240951.07933.pedro@codesourcery.com> Subject: RE: [RFA] Testsuite centralize -DSYMBOL_PREFIX uses Date: Tue, 24 May 2011 11:43:00 -0000 Message-ID: <001801cc1a07$b85da5a0$2918f0e0$@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: 2011-05/txt/msg00558.txt.bz2 > -----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: mardi 24 mai 2011 10:51 > =C0=A0: gdb-patches@sourceware.org > Cc=A0: Pierre Muller > Objet=A0: Re: [RFA] Testsuite centralize -DSYMBOL_PREFIX uses >=20 > On Tuesday 24 May 2011 08:48:38, Pierre Muller wrote: >=20 > > +# gdb_target_symbol_prefix_flags returns a string that can be added > > +# to gdb_compile options to define SYMBOL_PREFIX macro value > > +# symbol_prefix_flags returns a string that can be added > > +# for targets that use underscore as symbol prefix. >=20 > > +# The list of targets is incomplete and should be enhanced as > > +# reports about missing targets come in. >=20 > This sentence is useless, IMO. Removed,=20 > > +# TODO: find out automatically if the target needs this. > > + > > +proc gdb_target_symbol_prefix_flags {} { > > +if { [istarget "*-*-cygwin*"] || [istarget "i?86-*-mingw*"] >=20 > Missing indentation. This should be 4 spaces and 1 tab for double indent, is that right? =20 > > + || [istarget "*-*-msdosdjgpp*"] || [istarget "*-*-go32*"] > > + || [istarget "arm*-*-wince*"] || [istarget "arm*-*-mingwce*"]} { > > + return "additional_flags=3D-DSYMBOL_PREFIX=3D\"_\"" >=20 > ARM Windows CE is not underscored. Is DJGPP/GO32? bfd/config.bfd > appears to indicate it isn't. None of the places you touched listed > wince or djgpp, afaics. I did a search: grep TARGET_UNDERSCORE in bfd directory, $ grep "TARGET_UNDERSCORE[[:space:]]*'_'" *.[hc] coff-arm.c:#define TARGET_UNDERSCORE '_' coff-go32.c:#define TARGET_UNDERSCORE '_' coff-stgo32.c:#define TARGET_UNDERSCORE '_' pe-i386.c:#define TARGET_UNDERSCORE '_' pe-sh.c:#define TARGET_UNDERSCORE '_' pe-x86_64.c:#define TARGET_UNDERSCORE '_' pei-i386.c:#define TARGET_UNDERSCORE '_' pei-ia64.c:#define TARGET_UNDERSCORE '_' pei-sh.c:#define TARGET_UNDERSCORE '_' pei-x86_64.c:#define TARGET_UNDERSCORE '_' I knew that there was a change in win64 x86_64 target leading underscore was default for a moment, but now is only used if USE_MINGW64_LEADING_UNDERSCORES The coff-arm.c lead to my confusion about arm windows CE pe-arm-wince.c and pei-arm-wince.c both use #define TARGET_UNDERSCORE 0 so that coff-arm.c doesn't change its value=20 (the :#define TARGET_UNDERSCORE '_' in guarded inside a #ifndef TARGET_UNDERSCORE) I remember that djgpp/go32 targets are using the prefix as I used DJGPP/go32 quite a lot ... (dgjpp/go32 was not listed in any test because using expect for djgpp is quite tricky and only works partially in windows environment with a special target board that I wrote a while ago...) Below is an update lib/gdb.exp change, does this look better? Pierre $ cvs diff -u -p gdb.exp Index: gdb.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v retrieving revision 1.176 diff -u -p -r1.176 gdb.exp --- gdb.exp 20 May 2011 14:37:20 -0000 1.176 +++ gdb.exp 24 May 2011 11:39:40 -0000 @@ -3658,3 +3658,19 @@ proc core_find {binfile {deletefiles {}} } return $destcore } + +# gdb_target_symbol_prefix_flags returns a string that can be added +# to gdb_compile options to define SYMBOL_PREFIX macro value +# symbol_prefix_flags returns a string that can be added +# for targets that use underscore as symbol prefix. +# TODO: find out automatically if the target needs this. + +proc gdb_target_symbol_prefix_flags {} { + if { [istarget "*-*-cygwin*"] || [istarget "i?86-*-mingw*"] + || [istarget "*-*-msdosdjgpp*"] || [istarget "*-*-go32*"] } { + return "additional_flags=3D-DSYMBOL_PREFIX=3D\"_\"" + } else { + return "" + } +} +