From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Pedro Alves'" <pedro@codesourcery.com>
Cc: <gdb-patches@sourceware.org>
Subject: RE: [RFA] Testsuite centralize -DSYMBOL_PREFIX uses
Date: Tue, 24 May 2011 11:43:00 -0000 [thread overview]
Message-ID: <001801cc1a07$b85da5a0$2918f0e0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <201105240951.07933.pedro@codesourcery.com>
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Pedro Alves
> Envoyé : mardi 24 mai 2011 10:51
> À : gdb-patches@sourceware.org
> Cc : Pierre Muller
> Objet : Re: [RFA] Testsuite centralize -DSYMBOL_PREFIX uses
>
> On Tuesday 24 May 2011 08:48:38, Pierre Muller wrote:
>
> > +# 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.
>
> > +# The list of targets is incomplete and should be enhanced as
> > +# reports about missing targets come in.
>
> This sentence is useless, IMO.
Removed,
> > +# TODO: find out automatically if the target needs this.
> > +
> > +proc gdb_target_symbol_prefix_flags {} {
> > +if { [istarget "*-*-cygwin*"] || [istarget "i?86-*-mingw*"]
>
> Missing indentation.
This should be 4 spaces and 1 tab for double indent, is that right?
> > + || [istarget "*-*-msdosdjgpp*"] || [istarget "*-*-go32*"]
> > + || [istarget "arm*-*-wince*"] || [istarget "arm*-*-mingwce*"]} {
> > + return "additional_flags=-DSYMBOL_PREFIX=\"_\""
>
> 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
(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
===================================================================
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=-DSYMBOL_PREFIX=\"_\""
+ } else {
+ return ""
+ }
+}
+
next prev parent reply other threads:[~2011-05-24 11:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-24 7:49 Pierre Muller
2011-05-24 8:51 ` Pedro Alves
2011-05-24 11:43 ` Pierre Muller [this message]
2011-05-24 11:54 ` Pedro Alves
2011-05-24 12:02 ` 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='001801cc1a07$b85da5a0$2918f0e0$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.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