mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
gdb/testsuite: Remove duplicates from gdb.base/nested-subp2.exp
When running the testsuite, I have: Running .../gdb/testsuite/gdb.base/nested-subp2.exp ... DUPLICATE: gdb.base/nested-subp2.exp: continue to the STOP marker DUPLICATE: gdb.base/nested-subp2.exp: print c DUPLICATE: gdb.base/nested-subp2.exp: print count Fix by using with_test_prefix to differentiate the test that are performed at different points during the execution of the debuggee. Tested on x86_64-linux.
This commit is contained in:
@ -49,21 +49,23 @@ set bp_location [gdb_get_line_number "STOP" "${testcase}.c"]
|
||||
gdb_test "break ${testcase}.c:${bp_location}" \
|
||||
"Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: .*" \
|
||||
"breakpoint to the STOP marker"
|
||||
gdb_test "continue" \
|
||||
"Breakpoint \[0-9\]+, increment .*" \
|
||||
"continue to the STOP marker"
|
||||
|
||||
with_test_prefix "stop at first iteration" {
|
||||
gdb_test "continue" \
|
||||
"Breakpoint \[0-9\]+, increment .*" \
|
||||
"continue to the STOP marker"
|
||||
|
||||
# Check we get correct values for both local and non-local variable references.
|
||||
|
||||
gdb_test "print c" "102 'f'"
|
||||
gdb_test "print count" "0"
|
||||
# Check we get correct values for both local and non-local variable references.
|
||||
gdb_test "print c" "102 'f'"
|
||||
gdb_test "print count" "0"
|
||||
}
|
||||
|
||||
|
||||
# Same but a little later: make sure we were looking at the proper places.
|
||||
|
||||
gdb_test "continue" \
|
||||
"Breakpoint \[0-9\]+, increment .*" \
|
||||
"continue to the STOP marker"
|
||||
gdb_test "print c" "111 'o'"
|
||||
gdb_test "print count" "1"
|
||||
with_test_prefix "stop at second iteration" {
|
||||
gdb_test "continue" \
|
||||
"Breakpoint \[0-9\]+, increment .*" \
|
||||
"continue to the STOP marker"
|
||||
gdb_test "print c" "111 'o'"
|
||||
gdb_test "print count" "1"
|
||||
}
|
||||
|
Reference in New Issue
Block a user