This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] add ppc testcase to test fpscr
- From: Daniel Jacobowitz <drow at false dot org>
- To: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Tue, 2 Sep 2008 17:54:58 -0400
- Subject: Re: [rfc] add ppc testcase to test fpscr
- References: <1219360611.8989.6.camel@localhost.localdomain> <20080821233115.GA1239@caradoc.them.org> <1219362081.29526.2.camel@localhost.localdomain> <20080822024659.GA12951@caradoc.them.org> <1219428669.8167.2.camel@localhost.localdomain>
On Fri, Aug 22, 2008 at 03:11:09PM -0300, Thiago Jung Bauermann wrote:
> +# Run the program, when the prompt comes back it will be for the invalid
> +# operation breakpoint.
> +gdb_test "run" "" ""
This is similar to what Joel said about testing bare metal targets -
using "run" will break gdbserver testing. Pick almost any test and you
can see how this is usually handled, e.g. by gdb_run_cmd or "runto
main".
> +# First, verify if FPSCR is all zeroes.
> +gdb_test "print \$fpscr" " = 0\r" "FPSCR is all zeroes"
Oh, also there's PowerPC targets without hardware floating
point... and GDB is sometimes smart enough nowadays to not display
dummy FP registers. So having fpscr not exist is legitimate.
There's also the E500, which does not have a classic FPU.
--
Daniel Jacobowitz
CodeSourcery