gdb/testsuite: Make test names unique in gdb.base/watchpoint.exp
Extend test names and add test name prefixes to make test names unique. gdb/testsuite/ChangeLog: * gdb.base/watchpoint.exp (test_complex_watchpoint): Extend test names, and add test prefixes to make test names unique.
This commit is contained in:
parent
7235dd9f90
commit
96b6697fd8
|
@ -1,3 +1,8 @@
|
||||||
|
2018-09-07 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||||
|
|
||||||
|
* gdb.base/watchpoint.exp (test_complex_watchpoint): Extend test
|
||||||
|
names, and add test prefixes to make test names unique.
|
||||||
|
|
||||||
2018-09-05 Tom de Vries <tdevries@suse.de>
|
2018-09-05 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
* gdb.dwarf2/varval.exp: Add test.
|
* gdb.dwarf2/varval.exp: Add test.
|
||||||
|
|
|
@ -444,12 +444,12 @@ proc test_complex_watchpoint {} {
|
||||||
# In particular, test that a watch of stack-based things
|
# In particular, test that a watch of stack-based things
|
||||||
# is deleted when the stack-based things go out of scope.
|
# is deleted when the stack-based things go out of scope.
|
||||||
#
|
#
|
||||||
gdb_test_no_output "disable" "disable in test_complex_watchpoint"
|
gdb_test_no_output "disable" "disable in test_complex_watchpoint, first time"
|
||||||
gdb_test "break marker6" ".*Breakpoint.*"
|
gdb_test "break marker6" ".*Breakpoint.*"
|
||||||
gdb_test "cont" "Continuing.*Breakpoint.*marker6 \\(\\).*" \
|
gdb_test "cont" "Continuing.*Breakpoint.*marker6 \\(\\).*" \
|
||||||
"continue to marker6"
|
"continue to marker6"
|
||||||
gdb_breakpoint [gdb_get_line_number "func2 breakpoint here"]
|
gdb_breakpoint [gdb_get_line_number "func2 breakpoint here"]
|
||||||
gdb_continue_to_breakpoint "func2 breakpoint here"
|
gdb_continue_to_breakpoint "func2 breakpoint here, first time"
|
||||||
|
|
||||||
# Test a watch of a single stack-based variable, whose scope
|
# Test a watch of a single stack-based variable, whose scope
|
||||||
# is the function we're now in. This should auto-delete when
|
# is the function we're now in. This should auto-delete when
|
||||||
|
@ -478,7 +478,7 @@ proc test_complex_watchpoint {} {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gdb_continue_to_breakpoint "func2 breakpoint here"
|
gdb_continue_to_breakpoint "func2 breakpoint here, second time"
|
||||||
# We should be in "func2" again now. Test a watch of an
|
# We should be in "func2" again now. Test a watch of an
|
||||||
# expression which includes both a stack-based local and
|
# expression which includes both a stack-based local and
|
||||||
# something whose scope is larger than this invocation
|
# something whose scope is larger than this invocation
|
||||||
|
@ -498,7 +498,7 @@ proc test_complex_watchpoint {} {
|
||||||
# across any invocations of "func2", it should not auto-
|
# across any invocations of "func2", it should not auto-
|
||||||
# delete.
|
# delete.
|
||||||
#
|
#
|
||||||
gdb_continue_to_breakpoint "func2 breakpoint here"
|
gdb_continue_to_breakpoint "func2 breakpoint here, third time"
|
||||||
gdb_test "watch static_b" ".*\[Ww\]atchpoint \[0-9\]*: static_b" \
|
gdb_test "watch static_b" ".*\[Ww\]atchpoint \[0-9\]*: static_b" \
|
||||||
"set static local watch"
|
"set static local watch"
|
||||||
gdb_test "cont" "Continuing.*\[Ww\]atchpoint .*: static_b.*" \
|
gdb_test "cont" "Continuing.*\[Ww\]atchpoint .*: static_b.*" \
|
||||||
|
@ -514,31 +514,35 @@ proc test_complex_watchpoint {} {
|
||||||
# local to a recursing function should be bound only to that
|
# local to a recursing function should be bound only to that
|
||||||
# one invocation, and should not trigger for other invocations.
|
# one invocation, and should not trigger for other invocations.
|
||||||
#
|
#
|
||||||
gdb_test "tbreak recurser" ".*breakpoint.*"
|
with_test_prefix "local_x" {
|
||||||
gdb_test "cont" "Continuing.*recurser.*"
|
gdb_test "tbreak recurser" ".*breakpoint.*"
|
||||||
gdb_test "next" "if \\(x > 0.*" "next past local_x initialization"
|
gdb_test "cont" "Continuing.*recurser.*"
|
||||||
gdb_test "watch local_x" ".*\[Ww\]atchpoint \[0-9\]*: local_x" \
|
gdb_test "next" "if \\(x > 0.*" "next past local_x initialization"
|
||||||
"set local watch in recursive call"
|
gdb_test "watch local_x" ".*\[Ww\]atchpoint \[0-9\]*: local_x" \
|
||||||
gdb_test "cont" "Continuing.*\[Ww\]atchpoint .*: local_x.*New value = 2.*" \
|
"set local watch in recursive call"
|
||||||
"trigger local watch in recursive call"
|
gdb_test "cont" "Continuing.*\[Ww\]atchpoint .*: local_x.*New value = 2.*" \
|
||||||
gdb_test "cont" "Continuing.*\[Ww\]atchpoint .* deleted because the program has left the block in.*which its expression is valid.*" \
|
"trigger local watch in recursive call"
|
||||||
"self-delete local watch in recursive call"
|
gdb_test "cont" "Continuing.*\[Ww\]atchpoint .* deleted because the program has left the block in.*which its expression is valid.*" \
|
||||||
|
"self-delete local watch in recursive call"
|
||||||
|
}
|
||||||
|
|
||||||
# Repeat the preceding test, but this time use "recurser::local_x" as
|
# Repeat the preceding test, but this time use "recurser::local_x" as
|
||||||
# the variable to track.
|
# the variable to track.
|
||||||
gdb_test "cont" "Continuing.*marker6.*"
|
with_test_prefix "recurser::local_x" {
|
||||||
gdb_test "tbreak recurser" ".*breakpoint.*"
|
gdb_test "cont" "Continuing.*marker6.*" "continue to marker6"
|
||||||
gdb_test "cont" "Continuing.*recurser.*"
|
gdb_test "tbreak recurser" ".*breakpoint.*"
|
||||||
gdb_test "next" "if \\(x > 0.*" "next past local_x initialization"
|
gdb_test "cont" "Continuing.*recurser.*" "continue to recurser"
|
||||||
gdb_test "watch recurser::local_x" ".*\[Ww\]atchpoint \[0-9\]*: recurser::local_x" \
|
gdb_test "next" "if \\(x > 0.*" "next past local_x initialization"
|
||||||
"set local watch in recursive call with explicit scope"
|
gdb_test "watch recurser::local_x" ".*\[Ww\]atchpoint \[0-9\]*: recurser::local_x" \
|
||||||
gdb_test "cont" "Continuing.*\[Ww\]atchpoint .*: recurser::local_x.*New value = 2.*" \
|
"set local watch in recursive call with explicit scope"
|
||||||
"trigger local watch with explicit scope in recursive call"
|
gdb_test "cont" "Continuing.*\[Ww\]atchpoint .*: recurser::local_x.*New value = 2.*" \
|
||||||
gdb_test "cont" "Continuing.*\[Ww\]atchpoint .* deleted because the program has left the block in.*which its expression is valid.*" \
|
"trigger local watch with explicit scope in recursive call"
|
||||||
"self-delete local watch with explicit scope in recursive call (2)"
|
gdb_test "cont" "Continuing.*\[Ww\]atchpoint .* deleted because the program has left the block in.*which its expression is valid.*" \
|
||||||
|
"self-delete local watch with explicit scope in recursive call (2)"
|
||||||
|
}
|
||||||
|
|
||||||
# Disable everything so we can finish the program at full speed
|
# Disable everything so we can finish the program at full speed
|
||||||
gdb_test_no_output "disable" "disable in test_complex_watchpoint"
|
gdb_test_no_output "disable" "disable in test_complex_watchpoint, second time"
|
||||||
|
|
||||||
if [target_info exists gdb,noresults] { return }
|
if [target_info exists gdb,noresults] { return }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue