diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-08-26 14:05:45 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-08-27 16:32:40 +0100 |
commit | c2015ce4a4019ab9b026f13c33a7f55e8e0d77a0 (patch) | |
tree | 47a3c633c37f32a59584395d72e8713e3c534cf2 /gdb | |
parent | 9e7ed8b080afa19fff25244913594f95af282657 (diff) | |
download | gdb-c2015ce4a4019ab9b026f13c33a7f55e8e0d77a0.zip gdb-c2015ce4a4019ab9b026f13c33a7f55e8e0d77a0.tar.gz gdb-c2015ce4a4019ab9b026f13c33a7f55e8e0d77a0.tar.bz2 |
gdb/testsuite: make test names unique in gdb.arch/*.exp
Make the test names unique in gdb.arch/*.exp by either modifying the
test names or using with_test_prefix.
I have also fixed a typo 'forth' -> 'fourth' throughout gdb.arch/*.
Finally, I replaced code like this:
gdb_test "break [gdb_get_line_number "first breakpoint here"]" \
"Breakpoint .* at .*${srcfile}.*" \
"set first breakpoint in main"
With this:
gdb_breakpoint [gdb_get_line_number "first breakpoint here"]
In those files that I was already modifying for the other reasons
given above.
gdb/testsuite/ChangeLog:
* gdb.arch/amd64-byte.exp: Make test names unique, use
gdb_breakpoint, and fix typo 'forth' -> 'fourth'.
* gdb.arch/amd64-dword.exp: Likewise.
* gdb.arch/amd64-pseudo.c: Fix typo 'forth' -> 'fourth'.
* gdb.arch/amd64-stap-special-operands.exp: Make test names
unique.
* gdb.arch/amd64-tailcall-ret.exp: Likewise.
* gdb.arch/amd64-word.exp: Make test names unique, use
gdb_breakpoint, and fix typo 'forth' -> 'fourth'.
* gdb.arch/i386-byte.exp: Make test names unique, use
gdb_breakpoint.
* gdb.arch/i386-word.exp: Likewise.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 15 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-byte.exp | 112 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-dword.exp | 76 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-pseudo.c | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp | 14 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-word.exp | 76 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-byte.exp | 56 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-word.exp | 34 |
9 files changed, 203 insertions, 186 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index cb29456..8da561e 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2020-08-27 Andrew Burgess <andrew.burgess@embecosm.com> + + * gdb.arch/amd64-byte.exp: Make test names unique, use + gdb_breakpoint, and fix typo 'forth' -> 'fourth'. + * gdb.arch/amd64-dword.exp: Likewise. + * gdb.arch/amd64-pseudo.c: Fix typo 'forth' -> 'fourth'. + * gdb.arch/amd64-stap-special-operands.exp: Make test names + unique. + * gdb.arch/amd64-tailcall-ret.exp: Likewise. + * gdb.arch/amd64-word.exp: Make test names unique, use + gdb_breakpoint, and fix typo 'forth' -> 'fourth'. + * gdb.arch/i386-byte.exp: Make test names unique, use + gdb_breakpoint. + * gdb.arch/i386-word.exp: Likewise. + 2020-08-25 Shahab Vahedi <shahab@synopsys.com> * gdb.arch/arc-tdesc-cpu.xml: Use new feature names. diff --git a/gdb/testsuite/gdb.arch/amd64-byte.exp b/gdb/testsuite/gdb.arch/amd64-byte.exp index 0b46d6f..19cf5ff 100644 --- a/gdb/testsuite/gdb.arch/amd64-byte.exp +++ b/gdb/testsuite/gdb.arch/amd64-byte.exp @@ -61,73 +61,73 @@ set byte_regs(16) bh set byte_regs(17) ch set byte_regs(18) dh -gdb_test "break [gdb_get_line_number "first breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set first breakpoint in main" +gdb_breakpoint [gdb_get_line_number "first breakpoint here"] gdb_continue_to_breakpoint "continue to first breakpoint in main" -for { set r 1 } { $r <= 6 } { incr r } { - gdb_test "print/x \$$byte_regs($r)" \ - ".. = 0x[format %x $r]1" \ - "check contents of %$byte_regs($r)" +with_test_prefix "at first bp" { + for { set r 1 } { $r <= 6 } { incr r } { + gdb_test "print/x \$$byte_regs($r)" \ + ".. = 0x[format %x $r]1" \ + "check contents of %$byte_regs($r)" + } + + for { set r 1 } { $r <= 4 } { incr r } { + set h [expr $r + 14] + gdb_test "print/x \$$byte_regs($h)" \ + ".. = 0x[format %x $r]2" \ + "check contents of %$byte_regs($h)" + } } -for { set r 1 } { $r <= 4 } { incr r } { - set h [expr $r + 14] - gdb_test "print/x \$$byte_regs($h)" \ - ".. = 0x[format %x $r]2" \ - "check contents of %$byte_regs($h)" -} - -gdb_test "break [gdb_get_line_number "second breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set second breakpoint in main" +gdb_breakpoint [gdb_get_line_number "second breakpoint here"] gdb_continue_to_breakpoint "continue to second breakpoint in main" -for { set r 7 } { $r <= 14 } { incr r } { - gdb_test "print/x \$$byte_regs($r)" \ - ".. = 0x[format %x $r]1" \ - "check contents of %$byte_regs($r)" -} - -for { set r 1 } { $r <= 6 } { incr r } { - gdb_test "set var \$$byte_regs($r) = $r" "" "set %$byte_regs($r)" -} - -for { set r 1 } { $r <= 4 } { incr r } { - set h [expr $r + 14] - gdb_test "set var \$$byte_regs($h) = $h" "" "set %$byte_regs($h)" +with_test_prefix "at second bp" { + for { set r 7 } { $r <= 14 } { incr r } { + gdb_test "print/x \$$byte_regs($r)" \ + ".. = 0x[format %x $r]1" \ + "check contents of %$byte_regs($r)" + } + + for { set r 1 } { $r <= 6 } { incr r } { + gdb_test "set var \$$byte_regs($r) = $r" "" "set %$byte_regs($r)" + } + + for { set r 1 } { $r <= 4 } { incr r } { + set h [expr $r + 14] + gdb_test "set var \$$byte_regs($h) = $h" "" "set %$byte_regs($h)" + } } -gdb_test "break [gdb_get_line_number "third breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set third breakpoint in main" +gdb_breakpoint [gdb_get_line_number "third breakpoint here"] gdb_continue_to_breakpoint "continue to third breakpoint in main" -for { set r 1 } { $r <= 6 } { incr r } { - gdb_test "print \$$byte_regs($r)" \ - ".. = $r" \ - "check contents of %$byte_regs($r)" -} - -for { set r 1 } { $r <= 4 } { incr r } { - set h [expr $r + 14] - gdb_test "print \$$byte_regs($h)" \ - ".. = $h" \ - "check contents of %$byte_regs($h)" -} - -for { set r 7 } { $r <= 14 } { incr r } { - gdb_test "set var \$$byte_regs($r) = $r" "" "set %$byte_regs($r)" +with_test_prefix "at third bp" { + for { set r 1 } { $r <= 6 } { incr r } { + gdb_test "print \$$byte_regs($r)" \ + ".. = $r" \ + "check contents of %$byte_regs($r)" + } + + for { set r 1 } { $r <= 4 } { incr r } { + set h [expr $r + 14] + gdb_test "print \$$byte_regs($h)" \ + ".. = $h" \ + "check contents of %$byte_regs($h)" + } + + for { set r 7 } { $r <= 14 } { incr r } { + gdb_test "set var \$$byte_regs($r) = $r" "" "set %$byte_regs($r)" + } } -gdb_test "break [gdb_get_line_number "forth breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set forth breakpoint in main" -gdb_continue_to_breakpoint "continue to forth breakpoint in main" +gdb_breakpoint [gdb_get_line_number "fourth breakpoint here"] +gdb_continue_to_breakpoint "continue to fourth breakpoint in main" -for { set r 7 } { $r <= 14 } { incr r } { - gdb_test "print \$$byte_regs($r)" \ - ".. = $r" \ - "check contents of %$byte_regs($r)" +with_test_prefix "at fourth bp" { + for { set r 7 } { $r <= 14 } { incr r } { + gdb_test "print \$$byte_regs($r)" \ + ".. = $r" \ + "check contents of %$byte_regs($r)" + } } diff --git a/gdb/testsuite/gdb.arch/amd64-dword.exp b/gdb/testsuite/gdb.arch/amd64-dword.exp index bce411d..f2841aa 100644 --- a/gdb/testsuite/gdb.arch/amd64-dword.exp +++ b/gdb/testsuite/gdb.arch/amd64-dword.exp @@ -58,56 +58,56 @@ set dword_regs(12) r13d set dword_regs(13) r14d set dword_regs(14) r15d -gdb_test "break [gdb_get_line_number "first breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set first breakpoint in main" +gdb_breakpoint [gdb_get_line_number "first breakpoint here"] gdb_continue_to_breakpoint "continue to first breakpoint in main" -for { set r 1 } { $r <= 6 } { incr r } { - set hexr [format %x $r] - gdb_test "print/x \$$dword_regs($r)" \ - ".. = 0x${hexr}4${hexr}3${hexr}2${hexr}1" \ - "check contents of %$dword_regs($r)" +with_test_prefix "at first bp" { + for { set r 1 } { $r <= 6 } { incr r } { + set hexr [format %x $r] + gdb_test "print/x \$$dword_regs($r)" \ + ".. = 0x${hexr}4${hexr}3${hexr}2${hexr}1" \ + "check contents of %$dword_regs($r)" + } } -gdb_test "break [gdb_get_line_number "second breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set second breakpoint in main" +gdb_breakpoint [gdb_get_line_number "second breakpoint here"] gdb_continue_to_breakpoint "continue to second breakpoint in main" -for { set r 7 } { $r <= $nr_regs } { incr r } { - set hexr [format %x $r] - gdb_test "print/x \$$dword_regs($r)" \ - ".. = 0x${hexr}4${hexr}3${hexr}2${hexr}1" \ - "check contents of %$dword_regs($r)" +with_test_prefix "at second bp" { + for { set r 7 } { $r <= $nr_regs } { incr r } { + set hexr [format %x $r] + gdb_test "print/x \$$dword_regs($r)" \ + ".. = 0x${hexr}4${hexr}3${hexr}2${hexr}1" \ + "check contents of %$dword_regs($r)" + } + + for { set r 1 } { $r <= 6 } { incr r } { + gdb_test "set var \$$dword_regs($r) = $r" "" "set %$dword_regs($r)" + } } -for { set r 1 } { $r <= 6 } { incr r } { - gdb_test "set var \$$dword_regs($r) = $r" "" "set %$dword_regs($r)" -} - -gdb_test "break [gdb_get_line_number "third breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set third breakpoint in main" +gdb_breakpoint [gdb_get_line_number "third breakpoint here"] gdb_continue_to_breakpoint "continue to third breakpoint in main" -for { set r 1 } { $r <= 6 } { incr r } { - gdb_test "print \$$dword_regs($r)" \ - ".. = $r" \ - "check contents of %$dword_regs($r)" -} +with_test_prefix "at third bp" { + for { set r 1 } { $r <= 6 } { incr r } { + gdb_test "print \$$dword_regs($r)" \ + ".. = $r" \ + "check contents of %$dword_regs($r)" + } -for { set r 7 } { $r <= $nr_regs } { incr r } { - gdb_test "set var \$$dword_regs($r) = $r" "" "set %$dword_regs($r)" + for { set r 7 } { $r <= $nr_regs } { incr r } { + gdb_test "set var \$$dword_regs($r) = $r" "" "set %$dword_regs($r)" + } } -gdb_test "break [gdb_get_line_number "forth breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set forth breakpoint in main" -gdb_continue_to_breakpoint "continue to forth breakpoint in main" +gdb_breakpoint [gdb_get_line_number "fourth breakpoint here"] +gdb_continue_to_breakpoint "continue to fourth breakpoint in main" -for { set r 7 } { $r <= $nr_regs } { incr r } { - gdb_test "print \$$dword_regs($r)" \ - ".. = $r" \ - "check contents of %$dword_regs($r)" +with_test_prefix "at fourth bp" { + for { set r 7 } { $r <= $nr_regs } { incr r } { + gdb_test "print \$$dword_regs($r)" \ + ".. = $r" \ + "check contents of %$dword_regs($r)" + } } diff --git a/gdb/testsuite/gdb.arch/amd64-pseudo.c b/gdb/testsuite/gdb.arch/amd64-pseudo.c index 4c3d3cc..50bb15e 100644 --- a/gdb/testsuite/gdb.arch/amd64-pseudo.c +++ b/gdb/testsuite/gdb.arch/amd64-pseudo.c @@ -118,7 +118,7 @@ main (int argc, char **argv) a temp to build %0. */ "r" (r8), "r" (r9), "r" (r10), "r" (r11), "r" (r12), "r" (r13), "r" (r14), "r" (r15)); - puts ("Bye!"); /* forth breakpoint here */ + puts ("Bye!"); /* fourth breakpoint here */ return 0; } diff --git a/gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp b/gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp index 0dbcb4d..1e2ce19 100644 --- a/gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp +++ b/gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp @@ -19,13 +19,15 @@ if { ![istarget "x86_64-*-*"] || ![is_lp64_target] } { } proc test_probe { probe_name } { - if { ![runto "-pstap $probe_name"] } { - fail "run to probe $probe_name" - return + with_test_prefix "probe: ${probe_name}" { + if { ![runto "-pstap $probe_name"] } { + fail "run to probe $probe_name" + return + } + + gdb_test "print \$_probe_argc" " = 1" + gdb_test "print \$_probe_arg0" " = 10" } - - gdb_test "print \$_probe_argc" " = 1" - gdb_test "print \$_probe_arg0" " = 10" } standard_testfile amd64-stap-triplet.S diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp index 4dc5cd8..60c9a50 100644 --- a/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp +++ b/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp @@ -34,11 +34,11 @@ if ![runto_main] { } gdb_breakpoint "g" -gdb_continue_to_breakpoint "g" ".* v = 2;" +gdb_continue_to_breakpoint "first time in g" ".* v = 2;" gdb_test "return" { f \(\); /\* second \*/} "return" \ {Make g return now\? \(y or n\) } "y" -gdb_continue_to_breakpoint "g" ".* v = 2;" +gdb_continue_to_breakpoint "second time in g" ".* v = 2;" gdb_test "finish" " v = 3;" diff --git a/gdb/testsuite/gdb.arch/amd64-word.exp b/gdb/testsuite/gdb.arch/amd64-word.exp index 4ede548..9f5e5d7 100644 --- a/gdb/testsuite/gdb.arch/amd64-word.exp +++ b/gdb/testsuite/gdb.arch/amd64-word.exp @@ -58,56 +58,56 @@ set word_regs(12) r13w set word_regs(13) r14w set word_regs(14) r15w -gdb_test "break [gdb_get_line_number "first breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set first breakpoint in main" +gdb_breakpoint [gdb_get_line_number "first breakpoint here"] gdb_continue_to_breakpoint "continue to first breakpoint in main" -for { set r 1 } { $r <= 6 } { incr r } { - set hexr [format %x $r] - gdb_test "print/x \$$word_regs($r)" \ - ".. = 0x${hexr}2${hexr}1" \ - "check contents of %$word_regs($r)" +with_test_prefix "at first bp" { + for { set r 1 } { $r <= 6 } { incr r } { + set hexr [format %x $r] + gdb_test "print/x \$$word_regs($r)" \ + ".. = 0x${hexr}2${hexr}1" \ + "check contents of %$word_regs($r)" + } } -gdb_test "break [gdb_get_line_number "second breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set second breakpoint in main" +gdb_breakpoint [gdb_get_line_number "second breakpoint here"] gdb_continue_to_breakpoint "continue to second breakpoint in main" -for { set r 7 } { $r <= $nr_regs } { incr r } { - set hexr [format %x $r] - gdb_test "print/x \$$word_regs($r)" \ - ".. = 0x${hexr}2${hexr}1" \ - "check contents of %$word_regs($r)" +with_test_prefix "at second bp" { + for { set r 7 } { $r <= $nr_regs } { incr r } { + set hexr [format %x $r] + gdb_test "print/x \$$word_regs($r)" \ + ".. = 0x${hexr}2${hexr}1" \ + "check contents of %$word_regs($r)" + } + + for { set r 1 } { $r <= 6 } { incr r } { + gdb_test "set var \$$word_regs($r) = $r" "" "set %$word_regs($r)" + } } -for { set r 1 } { $r <= 6 } { incr r } { - gdb_test "set var \$$word_regs($r) = $r" "" "set %$word_regs($r)" -} - -gdb_test "break [gdb_get_line_number "third breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set third breakpoint in main" +gdb_breakpoint [gdb_get_line_number "third breakpoint here"] gdb_continue_to_breakpoint "continue to third breakpoint in main" -for { set r 1 } { $r <= 6 } { incr r } { - gdb_test "print \$$word_regs($r)" \ - ".. = $r" \ - "check contents of %$word_regs($r)" -} +with_test_prefix "at third bp" { + for { set r 1 } { $r <= 6 } { incr r } { + gdb_test "print \$$word_regs($r)" \ + ".. = $r" \ + "check contents of %$word_regs($r)" + } -for { set r 7 } { $r <= $nr_regs } { incr r } { - gdb_test "set var \$$word_regs($r) = $r" "" "set %$word_regs($r)" + for { set r 7 } { $r <= $nr_regs } { incr r } { + gdb_test "set var \$$word_regs($r) = $r" "" "set %$word_regs($r)" + } } -gdb_test "break [gdb_get_line_number "forth breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set forth breakpoint in main" -gdb_continue_to_breakpoint "continue to forth breakpoint in main" +gdb_breakpoint [gdb_get_line_number "fourth breakpoint here"] +gdb_continue_to_breakpoint "continue to fourth breakpoint in main" -for { set r 7 } { $r <= $nr_regs } { incr r } { - gdb_test "print \$$word_regs($r)" \ - ".. = $r" \ - "check contents of %$word_regs($r)" +with_test_prefix "at fourth bp" { + for { set r 7 } { $r <= $nr_regs } { incr r } { + gdb_test "print \$$word_regs($r)" \ + ".. = $r" \ + "check contents of %$word_regs($r)" + } } diff --git a/gdb/testsuite/gdb.arch/i386-byte.exp b/gdb/testsuite/gdb.arch/i386-byte.exp index aa5b8d7..8903346 100644 --- a/gdb/testsuite/gdb.arch/i386-byte.exp +++ b/gdb/testsuite/gdb.arch/i386-byte.exp @@ -51,38 +51,38 @@ set byte_regs(6) bh set byte_regs(7) ch set byte_regs(8) dh -gdb_test "break [gdb_get_line_number "first breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set first breakpoint in main" +gdb_breakpoint [gdb_get_line_number "first breakpoint here"] gdb_continue_to_breakpoint "continue to first breakpoint in main" -for { set r 1 } { $r <= 4 } { incr r } { - gdb_test "print/x \$$byte_regs($r)" \ - ".. = 0x[format %x $r]1" \ - "check contents of %$byte_regs($r)" - set h [expr $r + 4] - gdb_test "print/x \$$byte_regs($h)" \ - ".. = 0x[format %x $r]2" \ - "check contents of %$byte_regs($h)" +with_test_prefix "at first bp" { + for { set r 1 } { $r <= 4 } { incr r } { + gdb_test "print/x \$$byte_regs($r)" \ + ".. = 0x[format %x $r]1" \ + "check contents of %$byte_regs($r)" + set h [expr $r + 4] + gdb_test "print/x \$$byte_regs($h)" \ + ".. = 0x[format %x $r]2" \ + "check contents of %$byte_regs($h)" + } + + for { set r 1 } { $r <= 4 } { incr r } { + gdb_test "set var \$$byte_regs($r) = $r" "" "set %$byte_regs($r)" + set h [expr $r + 4] + gdb_test "set var \$$byte_regs($h) = $h" "" "set %$byte_regs($h)" + } } -for { set r 1 } { $r <= 4 } { incr r } { - gdb_test "set var \$$byte_regs($r) = $r" "" "set %$byte_regs($r)" - set h [expr $r + 4] - gdb_test "set var \$$byte_regs($h) = $h" "" "set %$byte_regs($h)" -} - -gdb_test "break [gdb_get_line_number "second breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set second breakpoint in main" +gdb_breakpoint [gdb_get_line_number "second breakpoint here"] gdb_continue_to_breakpoint "continue to second breakpoint in main" -for { set r 1 } { $r <= 4 } { incr r } { - gdb_test "print \$$byte_regs($r)" \ - ".. = $r" \ - "check contents of %$byte_regs($r)" - set h [expr $r + 4] - gdb_test "print \$$byte_regs($h)" \ - ".. = $h" \ - "check contents of %$byte_regs($h)" +with_test_prefix "at second bp" { + for { set r 1 } { $r <= 4 } { incr r } { + gdb_test "print \$$byte_regs($r)" \ + ".. = $r" \ + "check contents of %$byte_regs($r)" + set h [expr $r + 4] + gdb_test "print \$$byte_regs($h)" \ + ".. = $h" \ + "check contents of %$byte_regs($h)" + } } diff --git a/gdb/testsuite/gdb.arch/i386-word.exp b/gdb/testsuite/gdb.arch/i386-word.exp index 336ea27..55c2ea6 100644 --- a/gdb/testsuite/gdb.arch/i386-word.exp +++ b/gdb/testsuite/gdb.arch/i386-word.exp @@ -47,28 +47,28 @@ set word_regs(2) bx set word_regs(3) cx set word_regs(4) dx -gdb_test "break [gdb_get_line_number "first breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set first breakpoint in main" +gdb_breakpoint [gdb_get_line_number "first breakpoint here"] gdb_continue_to_breakpoint "continue to first breakpoint in main" -for { set r 1 } { $r <= 4 } { incr r } { - gdb_test "print/x \$$word_regs($r)" \ - ".. = 0x[format %x $r]2[format %x $r]1" \ - "check contents of %$word_regs($r)" -} +with_test_prefix "at first bp" { + for { set r 1 } { $r <= 4 } { incr r } { + gdb_test "print/x \$$word_regs($r)" \ + ".. = 0x[format %x $r]2[format %x $r]1" \ + "check contents of %$word_regs($r)" + } -for { set r 1 } { $r <= 4 } { incr r } { - gdb_test "set var \$$word_regs($r) = $r" "" "set %$word_regs($r)" + for { set r 1 } { $r <= 4 } { incr r } { + gdb_test "set var \$$word_regs($r) = $r" "" "set %$word_regs($r)" + } } -gdb_test "break [gdb_get_line_number "second breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set second breakpoint in main" +gdb_breakpoint [gdb_get_line_number "second breakpoint here"] gdb_continue_to_breakpoint "continue to second breakpoint in main" -for { set r 1 } { $r <= 4 } { incr r } { - gdb_test "print \$$word_regs($r)" \ - ".. = $r" \ - "check contents of %$word_regs($r)" +with_test_prefix "at second bp" { + for { set r 1 } { $r <= 4 } { incr r } { + gdb_test "print \$$word_regs($r)" \ + ".. = $r" \ + "check contents of %$word_regs($r)" + } } |