diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/ena-dis-br.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/ena-dis-br.exp | 57 |
1 files changed, 45 insertions, 12 deletions
diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp index c338a0d..d43e47e 100644 --- a/gdb/testsuite/gdb.base/ena-dis-br.exp +++ b/gdb/testsuite/gdb.base/ena-dis-br.exp @@ -48,7 +48,7 @@ proc break_at { breakpoint where } { gdb_test_multiple "$test" "$test" { -re "Breakpoint (\[0-9\]*) at .*$where.*$gdb_prompt $" { set bp $expect_out(1,string) - pass "$test" + pass $gdb_test_name } } return $bp @@ -104,7 +104,12 @@ gdb_test "info break $bp" \ # Verify that we don't stop at a disabled breakpoint. gdb_continue_to_end "no stop" -rerun_to_main + +set count 1 +with_test_prefix "run $count" { + rerun_to_main + incr count +} gdb_continue_to_end "no stop at auto-disabled break marker2" # Verify that we can set a breakpoint to be self-deleting after the @@ -149,7 +154,9 @@ if ![runto_main] then { set bp [break_at $bp_location7 "line $bp_location7"] -set bp2 [break_at marker1 " line $bp_location15"] +with_test_prefix "enable count" { + set bp2 [break_at marker1 " line $bp_location15"] +} gdb_test "enable count" \ "Argument required \\(hit count\\)\\." \ @@ -181,7 +188,9 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" } -set bp [break_at "marker1" " line $bp_location15.*"] +with_test_prefix "ignore count" { + set bp [break_at "marker1" " line $bp_location15.*"] +} # Verify that an ignore of a non-existent breakpoint is gracefully # handled. @@ -216,7 +225,11 @@ gdb_test "info break $bp" \ "info ignored break marker1" gdb_continue_to_end "no stop at ignored break marker1" -rerun_to_main + +with_test_prefix "run $count" { + rerun_to_main + incr count +} # See the comments in condbreak.exp for "run until breakpoint at marker1" # for an explanation of the xfail below. @@ -236,7 +249,9 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" } -set bp [break_at marker1 " line $bp_location15.*"] +with_test_prefix "ignore count and auto-delete" { + set bp [break_at marker1 " line $bp_location15.*"] +} gdb_test "ignore $bp 1" \ "Will ignore next crossing of breakpoint \[0-9\]*.*" \ @@ -249,7 +264,11 @@ gdb_test "info break $bp" \ "info break marker1 after hitting breakpoint" gdb_continue_to_end "no stop at ignored & auto-deleted break marker1" -rerun_to_main + +with_test_prefix "run $count" { + rerun_to_main + incr count +} gdb_test "continue" \ ".*marker1 .*:$bp_location15.*" \ @@ -262,7 +281,9 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" } -set bp [break_at marker1 " line $bp_location15"] +with_test_prefix "disabled breakpoint ignore count" { + set bp [break_at marker1 " line $bp_location15"] +} gdb_test "ignore $bp 10" \ "Will ignore next 10 crossings of breakpoint \[0-9\]*.*" \ @@ -271,7 +292,10 @@ gdb_test "ignore $bp 10" \ gdb_test_no_output "disable $bp" "disable break marker1" gdb_continue_to_end "no stop at ignored & disabled break marker1" -rerun_to_main + +with_test_prefix "run $count" { + rerun_to_main +} gdb_test "info break $bp" \ "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*ignore next 10 hits.*" \ @@ -315,9 +339,18 @@ set b2 0 set b3 0 set b4 0 set b1 [break_at main ""] -set b2 [break_at main ""] -set b3 [break_at main ""] -set b4 [break_at main ""] + +with_test_prefix "2nd breakpoint" { + set b2 [break_at main ""] +} + +with_test_prefix "3rd breakpoint" { + set b3 [break_at main ""] +} + +with_test_prefix "4th breakpoint" { + set b4 [break_at main ""] +} # Perform tests for disable/enable commands on multiple # locations and breakpoints. |