[PATCH] PPC atomic single stepping testcase

Daniel Jacobowitz drow@false.org
Sun Dec 16 22:49:00 GMT 2007


On Mon, Dec 10, 2007 at 02:44:52PM -0200, Luis Machado wrote:
>     * gdb.arch/powerpc64-atomic-single-stepping.c: New testcase source file.
>     * gdb.arch/powerpc64-atomic-single-stepping.exp: New testcase expect file.

Is there a shorter name you could give this? :-(

> @@ -0,0 +1,71 @@
> +# Copyright 2006 Free Software Foundation, Inc.

2007.

> +gdb_breakpoint "27" "Breakpoint $decimal at $hex" \
> +  "Set the breakpoint at the start of the sequence"
> +
> +gdb_breakpoint "35" "Breakpoint $decimal at $hex" \
> +  "Set the breakpoint at the start of the sequence"

Take a look at gdb_get_line_number.

> +gdb_test continue "Continuing.*Breakpoint $decimal.*" \
> +  "Continue until breakpoint"
> +
> +gdb_test next "" \
> +  "Step through the lwarx/stwcx sequence"
> +
> +gdb_test next "" \
> +  "Step through the ldarx/stdcx sequence"

That's not much of a test.  I suggest you match enough output
to verify that you ended up where you expected to.

> +gdb_test continue ".*Program exited normally.*" \
> +  "Continue until exit"

Is this testing for anything specific?  Otherwise, I'd recommend not
doing it; some targets produce different exit messages, et cetera.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list