This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] testsuite/boards/stabs.exp
- From: Yao Qi <yao at codesourcery dot com>
- To: Doug Evans <xdje42 at gmail dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 15 Dec 2014 11:22:45 +0800
- Subject: Re: [PATCH] testsuite/boards/stabs.exp
- Authentication-results: sourceware.org; auth=none
- References: <m3d27ni060 dot fsf at seba dot sebabeach dot org> <87ioheviwk dot fsf at codesourcery dot com> <CAP9bCMRKtavAVZRjk67PO6k-Zzd34VAGuF-q5tr600wG4TNYow at mail dot gmail dot com>
Doug Evans <xdje42@gmail.com> writes:
> b) The testsuite gets the -g* variant to use from the debug_flags board config.
> If you specify CFLAGS_FOR_TARGET then that value *and* the
> debug_flags board config are passed to gcc.
> Plus, -g -gstabs != -gstabs -g.
> [I didn't dig into why, easy enough if it becomes important.]
Oh, it is surprise to me.
> The high order bit is that the right way to specify the flag
> to control the debug format is with the debug_flags board config.
>
> The difference can be seen by trying both.
> A simple example to play with is gdb.cp/bool.exp.
>
> check-gdb --target_board=stabs bool.exp
> -> 2 fails
> FAIL: gdb.cp/bool.exp: print return_true()
> FAIL: gdb.cp/bool.exp: print return_false()
>
> check-gdb CFLAGS_FOR_TARGET=-gstabs bool.exp
> -> 2 passes
Thanks for giving this example.
>
> Is there something about adding a board file that causes problems I'm
> not aware of?
> If so, we'd better establish what it is and get it written down.
> I can imagine wanting more board files. :-)
Adding board file stabs.exp is fine to me.
--
Yao (éå)