diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/ending-run.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/ending-run.exp | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp index a60e704..bdc3f3f 100644 --- a/gdb/testsuite/gdb.base/ending-run.exp +++ b/gdb/testsuite/gdb.base/ending-run.exp @@ -51,17 +51,13 @@ gdb_run_cmd gdb_test "" ".*Breakpoint.*1.*callee.*14.*" "run" gdb_test "cle" ".*Deleted breakpoints 1 2.*" "clear worked" -send_gdb "i b\n" -gdb_expect { +gdb_test_multiple "i b" "cleared bp at line before routine" { -re ".* breakpoint .* breakpoint .*$gdb_prompt $" { fail "cleared bp at line before routine" } -re ".*3.*main.*31.*$gdb_prompt $" { pass "cleared bp at line before routine" } - -re ".*$gdb_prompt $" { - fail "cleared bp at line before routine (info b)" - } } # Test some other "clear" combinations @@ -71,8 +67,7 @@ gdb_test "b ending-run.c:14" ".*Note.*also.*Breakpoint.*5.*" "b ending-run.c:14, gdb_test "cle ending-run.c:14" \ ".*Deleted breakpoint 5.*" "Cleared 2 by line" -send_gdb "info line ending-run.c:14\n" -gdb_expect { +gdb_test_multiple "info line ending-run.c:14" "" { -re ".*address (0x\[0-9a-fA-F]*).*$gdb_prompt $" { set line_nine $expect_out(1,string) gdb_test "b ending-run.c:14" ".*Breakpoint 6.*ending-run.c, line 14.*" @@ -84,8 +79,7 @@ gdb_expect { } } -send_gdb "i b\n" -gdb_expect { +gdb_test_multiple "i b" "all set to continue" { -re ".* breakpoint .* breakpoint .*$gdb_prompt $" { fail "all set to continue (didn't clear bps)" } @@ -117,9 +111,9 @@ if ![gdb_skip_stdio_test "Step to return"] { set old_timeout $timeout set timeout 50 set program_exited 0 -send_gdb "next\n" set nexted 0 -gdb_expect { + +gdb_test_multiple "next" "step out of main" { -re "33\[ \t\]+\}.*$gdb_prompt $" { # sometimes we stop at the closing brace, if so, do another next if { $nexted } { @@ -201,8 +195,6 @@ gdb_expect { -re ".*Program received signal SIGTRAP.*$gdb_prompt $" { pass "step out of main" } - -re ".*$gdb_prompt $" { fail "step out of main" } - timeout { fail "step out of main" } } # When we're talking to a program running on a real stand-alone board, @@ -216,8 +208,7 @@ if {! [target_info exists use_gdb_stub] && (! [target_info exists use_cygmon] || ! [target_info use_cygmon])} { global program_exited; if {[eval expr $program_exited == 0]} { - send_gdb "n\n" - gdb_expect { + gdb_test_multiple "n" "step to end of run" { -re "Program exited normally.*$gdb_prompt $" { # If we actually have debug info for the start function, # then we won't get the "Single-stepping until function @@ -246,14 +237,6 @@ if {! [target_info exists use_gdb_stub] set program_exited_normally 1 } } - -re ".*$gdb_prompt $" { - fail "step to end of run" - set program_not_exited 1 - } - timeout { - fail "(timeout) step to end of run" - set program_not_exited 1 - } } } |