Skip to content

Commit 46c3b22

Browse files
committed
gdb/testsuite/gdb.base/break.exp: split test_no_break_on_catchpoint
Change-Id: Ifa7070943f1de22c2839fedf5f346d6591bb5a76 Approved-By: Kevin Buettner <[email protected]>
1 parent 750375d commit 46c3b22

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

gdb/testsuite/gdb.base/break.exp

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -478,21 +478,27 @@ gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\]
478478
# Verify that catchpoints for fork, vfork and exec don't trigger
479479
# inappropriately. (There are no calls to those system functions
480480
# in this test program.)
481-
#
482-
if ![runto_main] then {
483-
return
484-
}
485481

486-
gdb_test "catch fork" "Catchpoint \[0-9\]+ \\(fork\\)" \
487-
"set catch fork, never expected to trigger"
482+
proc_with_prefix test_no_break_on_catchpoint {} {
483+
clean_restart break
484+
485+
if ![runto_main] then {
486+
return
487+
}
488+
489+
gdb_test "catch fork" "Catchpoint \[0-9\]+ \\(fork\\)" \
490+
"set catch fork, never expected to trigger"
488491

489-
gdb_test "catch vfork" "Catchpoint \[0-9\]+ \\(vfork\\)" \
490-
"set catch vfork, never expected to trigger"
492+
gdb_test "catch vfork" "Catchpoint \[0-9\]+ \\(vfork\\)" \
493+
"set catch vfork, never expected to trigger"
491494

492-
gdb_test "catch exec" "Catchpoint \[0-9\]+ \\(exec\\)" \
493-
"set catch exec, never expected to trigger"
495+
gdb_test "catch exec" "Catchpoint \[0-9\]+ \\(exec\\)" \
496+
"set catch exec, never expected to trigger"
497+
498+
gdb_continue_to_end
499+
}
494500

495-
gdb_continue_to_end
501+
test_no_break_on_catchpoint
496502

497503
# Verify that GDB responds gracefully when asked to set a breakpoint
498504
# on a nonexistent source line.

0 commit comments

Comments
 (0)