with_test_prefix "$break_command" {
delete_breakpoints
- gdb_test "$break_command foo" "reakpoint.* at .*"
-
- # A condition that evals true.
- gdb_test "condition \$bpnum cond_global==0" ".*"
-
- set can_do_cmd 0
-
- set test "continue"
- gdb_test_multiple $test $test {
- -re "You may have requested too many.*$gdb_prompt $" {
- pass $test
+ with_test_prefix "true condition" {
+ gdb_test "$break_command foo" "reakpoint.* at .*"
+
+ # A condition that evals true.
+ gdb_test "condition \$bpnum cond_global==0" ".*"
+
+ set can_do_cmd 0
+
+ set test "continue"
+ gdb_test_multiple $test $test {
+ -re "You may have requested too many.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "Breakpoint .*, foo .*$gdb_prompt $" {
+ pass $test
+ set can_do_cmd 1
+ }
}
- -re "Breakpoint .*, foo .*$gdb_prompt $" {
- pass $test
- set can_do_cmd 1
- }
- }
- if { !$can_do_cmd } {
- unsupported "no target support"
- return
+ if { !$can_do_cmd } {
+ unsupported "no target support"
+ return
+ }
}
- delete_breakpoints
+ with_test_prefix "false condition" {
+ delete_breakpoints
- gdb_test "$break_command foo" ".*reakpoint .* at .*"
+ gdb_test "$break_command foo" ".*reakpoint .* at .*"
- # A condition that evals false.
- gdb_test "condition \$bpnum cond_global==1" ".*"
+ # A condition that evals false.
+ gdb_test "condition \$bpnum cond_global==1" ".*"
- gdb_test "b bar" "Breakpoint .* at .*"
+ gdb_test "b bar" "Breakpoint .* at .*"
- gdb_test "continue" "Breakpoint .*, bar .*"
+ gdb_test "continue" "Breakpoint .*, bar .*"
+ }
}
}
return
}
- delete_breakpoints
+ with_test_prefix "true condition" {
+ delete_breakpoints
- gdb_test "$watch_command global" ".*atchpoint .*: global.*"
+ gdb_test "$watch_command global" ".*atchpoint .*: global.*"
- # A condition that evals true.
- gdb_test "condition \$bpnum cond_global==0" ".*"
+ # A condition that evals true.
+ gdb_test "condition \$bpnum cond_global==0" ".*"
- set can_do_cmd 0
+ set can_do_cmd 0
- set test "continue"
- gdb_test_multiple $test $test {
- -re "You may have requested too many.*$gdb_prompt $" {
- pass $test
- }
- -re "atchpoint .*: global.*$gdb_prompt $" {
- pass $test
- set can_do_cmd 1
+ set test "continue"
+ gdb_test_multiple $test $test {
+ -re "You may have requested too many.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "atchpoint .*: global.*$gdb_prompt $" {
+ pass $test
+ set can_do_cmd 1
+ }
}
- }
- if { !$can_do_cmd } {
- unsupported "no target support"
- return
+ if { !$can_do_cmd } {
+ unsupported "no target support"
+ return
+ }
}
- delete_breakpoints
+ with_test_prefix "false condition" {
+ delete_breakpoints
- gdb_test "$watch_command global" ".*atchpoint .*: global.*"
+ gdb_test "$watch_command global" ".*atchpoint .*: global.*"
- # A condition that evals false.
- gdb_test "condition \$bpnum cond_global==1" ".*"
+ # A condition that evals false.
+ gdb_test "condition \$bpnum cond_global==1" ".*"
- gdb_test "b bar" "Breakpoint .* at .*"
+ gdb_test "b bar" "Breakpoint .* at .*"
- gdb_test "continue" "Breakpoint .*, bar .*"
+ gdb_test "continue" "Breakpoint .*, bar .*"
+ }
}
}