This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [SH] gdb.arch/gdb1291.exp, gdb.arch/gdb1431.exp
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, Kevin Buettner <kevinb at redhat dot com>
- Date: Wed, 16 May 2012 07:37:13 -0700
- Subject: Re: [SH] gdb.arch/gdb1291.exp, gdb.arch/gdb1431.exp
- References: <87fwcze2w7.fsf@schwinge.name>
Really sorry for the delay...
> Exactly the same for gdb.arch/gdb1431.exp: their source files
> (gdb.arch/gdb1291.s, gdb.arch/gdb1431.s) are identical, and I first
> propose to get rid of one of them:
>
> gdb/testsuite/
>
> * gdb.arch/gdb1431.s: Remove file.
> * gdb.arch/gdb1431.exp (srcfile): Refer to gdb1291.s.
No one objected to this, it seems. I verified that you still
generate one executable per testcase, which is what we want.
So no objection from me.
> Next, for the linking error, the problem is that global symbols (such as
> printf) are specified with a leading underscore, which is correct for
> sh-elf, but not for sh-linux-gnu. Relying on GCC's
> __USER_LABEL_PREFIX__, I propose the following:
I would rather not rely on GCC-isms for this. You should take a look
at how we deal with this in other testcases. See
gdb_target_symbol_prefix_flags in testsuite/lib/gdb.exp, and
how it is used in some of the Windows targets.
--
Joel