Skip to content

Commit 750375d

Browse files
committed
gdb/testsuite/gdb.base/break.exp: split test_break_nonexistent_line
Change-Id: I4390dd5da23bae83ccc513ad0de0169ddff7df12 Approved-By: Kevin Buettner <[email protected]>
1 parent 9df9cfe commit 750375d

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

gdb/testsuite/gdb.base/break.exp

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -496,11 +496,21 @@ gdb_continue_to_end
496496

497497
# Verify that GDB responds gracefully when asked to set a breakpoint
498498
# on a nonexistent source line.
499-
#
500-
gdb_test_no_output "set breakpoint pending off"
501-
gdb_test "break 999" \
502-
"No line 999 in the current file." \
503-
"break on non-existent source line"
499+
500+
proc_with_prefix test_break_nonexistent_line {} {
501+
clean_restart break
502+
503+
if ![runto_main] then {
504+
return
505+
}
506+
507+
gdb_test_no_output "set breakpoint pending off"
508+
gdb_test "break 999" \
509+
"No line 999 in the current file." \
510+
"break on non-existent source line"
511+
}
512+
513+
test_break_nonexistent_line
504514

505515
proc_with_prefix test_break_default {} {
506516
clean_restart break

0 commit comments

Comments
 (0)