diff options
author | Anton Blanchard <anton@samba.org> | 2014-03-28 12:37:37 +1100 |
---|---|---|
committer | Anton Blanchard <anton@samba.org> | 2014-04-01 12:12:48 +1100 |
commit | 62f7182c14492421b8d59ba5c6640d6c27ad6ea2 (patch) | |
tree | 9568d009f78fc0fdc26984692a161002085e4e1b /gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp | |
parent | 11a865c84fcf530d8d96d01566f4bde378f629a1 (diff) | |
download | gdb-62f7182c14492421b8d59ba5c6640d6c27ad6ea2.zip gdb-62f7182c14492421b8d59ba5c6640d6c27ad6ea2.tar.gz gdb-62f7182c14492421b8d59ba5c6640d6c27ad6ea2.tar.bz2 |
Fix ppc64 single step over atomic sequence testcase.
The current ppc64 single step over atomic sequence testcase is written
in C and breaks with some versions of gcc. Convert the test to
assembly and use stepi to step through it.
gdb/testsuite/
2014-04-01 Anton Blanchard <anton@samba.org>
* gdb.arch/ppc64-atomic-inst.c: Remove.
* gdb.arch/ppc64-atomic-inst.S: New file.
* gdb.arch/ppc64-atomic-inst.exp: Adapt for asm based testcase.
Diffstat (limited to 'gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp')
-rw-r--r-- | gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp b/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp index f5f3b40..cefdfc9 100644 --- a/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp +++ b/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp @@ -27,7 +27,7 @@ if {![istarget "powerpc*"] || ![is_lp64_target]} { } set testfile "ppc64-atomic-inst" -set srcfile ${testfile}.c +set srcfile ${testfile}.S set binfile ${objdir}/${subdir}/${testfile} set compile_flags {debug quiet} @@ -50,11 +50,18 @@ set bp1 [gdb_get_line_number "lwarx"] gdb_breakpoint "$bp1" "Breakpoint $decimal at $hex" \ "Set the breakpoint at the start of the sequence" +set bp2 [gdb_get_line_number "ldarx"] +gdb_breakpoint "$bp2" "Breakpoint $decimal at $hex" \ + "Set the breakpoint at the start of the sequence" + gdb_test continue "Continuing.*Breakpoint $decimal.*" \ "Continue until breakpoint" -gdb_test next ".*__asm __volatile.*" \ +gdb_test nexti "bne.*1b" \ "Step through the lwarx/stwcx sequence" -gdb_test next ".*return 0.*" \ - "Step through the ldarx/stdcx sequence" +gdb_test continue "Continuing.*Breakpoint $decimal.*" \ + "Continue until breakpoint" + +gdb_test nexti "bne.*1b" \ + "Step through the lwarx/stwcx sequence" |