diff options
author | Jason Molenda <jsm@bugshack.cygnus.com> | 1999-06-28 16:06:02 +0000 |
---|---|---|
committer | Jason Molenda <jsm@bugshack.cygnus.com> | 1999-06-28 16:06:02 +0000 |
commit | 3aa48797ecc40f0b9fa07da4685595b9a5bcf07a (patch) | |
tree | 6071aaa9824ade430d70cba71650efb16e77a591 /gdb/testsuite/gdb.base/ending-run.exp | |
parent | 4683ebe4e2ebe3d956e90b55271a01fc6ce735cf (diff) | |
download | gdb-3aa48797ecc40f0b9fa07da4685595b9a5bcf07a.tar.gz |
import gdb-1999-06-28 snapshot
Diffstat (limited to 'gdb/testsuite/gdb.base/ending-run.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/ending-run.exp | 53 |
1 files changed, 35 insertions, 18 deletions
diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp index 8f102fbb43e..e36c975bfd1 100644 --- a/gdb/testsuite/gdb.base/ending-run.exp +++ b/gdb/testsuite/gdb.base/ending-run.exp @@ -52,39 +52,39 @@ gdb_load ${binfile} # to the prolog--that's another bug...) # gdb_test "b 1" ".*Breakpoint.*line 1.*" "bpt at line before routine" -gdb_test "b 8" ".*Note.*also.*Breakpoint.*2.*" "" +gdb_test "b 13" ".*Note.*also.*Breakpoint.*2.*" "" # Set up to go to the next-to-last line of the program # -gdb_test "b 26" ".*Breakpoint.*3.*" "" +gdb_test "b 31" ".*Breakpoint.*3.*" "" # Expect to hit the bp at line "1", but symbolize this -# as line "8". Then try to clear it--this should work. +# as line "13". Then try to clear it--this should work. # if [target_info exists use_gdb_stub] { - gdb_test "continue" ".*Breakpoint.*1.*callee.*8.*" "" + gdb_test "continue" ".*Breakpoint.*1.*callee.*13.*" "" } else { - gdb_test "r" ".*Breakpoint.*1.*callee.*8.*" "" + gdb_test "r" ".*Breakpoint.*1.*callee.*13.*" "" } gdb_test "cle" ".*Deleted breakpoints 2 1.*" "clear worked" send_gdb "i b\n" gdb_expect { -re ".*breakpoint.*breakpoint.*$gdb_prompt $" { fail "clear bp" } - -re ".*3.*main.*26.*$gdb_prompt $" { pass "cleared bp at line before routine" } + -re ".*3.*main.*31.*$gdb_prompt $" { pass "cleared bp at line before routine" } -re ".*$gdb_prompt $" { fail "info b" } } # Test some other "clear" combinations # gdb_test "b 1" ".*Breakpoint.*4.*" "" -gdb_test "b 8" ".*Note.*also.*Breakpoint.*5.*" "" -gdb_test "cle 8" ".*Deleted breakpoint 5.*" "Only cleared 1 by line" +gdb_test "b 13" ".*Note.*also.*Breakpoint.*5.*" "" +gdb_test "cle 13" ".*Deleted breakpoint 5.*" "Only cleared 1 by line" -send_gdb "inf line 8\n" +send_gdb "inf line 13\n" gdb_expect { -re ".*address (0x\[0-9a-fA-F]*).*$gdb_prompt $" { set line_eight $expect_out(1,string) - gdb_test "b 8" ".*Breakpoint.*6.*" "" + gdb_test "b 13" ".*Breakpoint.*6.*" "" gdb_test "cle *$line_eight" ".*Deleted breakpoints 6 4.*" "Clear 2 by address" } -re ".*$gdb_prompt $" { @@ -92,13 +92,13 @@ gdb_expect { } } -send_gdb "inf line 9\n" +send_gdb "inf line 14\n" gdb_expect { -re ".*address (0x\[0-9a-fA-F]*).*$gdb_prompt $" { set line_nine $expect_out(1,string) - gdb_test "b 9" ".*Breakpoint.*7.*" "" + gdb_test "b 14" ".*Breakpoint.*7.*" "" gdb_test "b *$line_nine" ".*Note.*also.*Breakpoint.*8.*" "" - gdb_test "c" ".*Breakpoint.*7.*callee.*9.*" "" + gdb_test "c" ".*Breakpoint.*7.*callee.*14.*" "" gdb_test "cle" ".*Deleted breakpoints 8 7.*" "Clear 2 by default" } -re ".*$gdb_prompt $" { @@ -111,7 +111,7 @@ gdb_expect { -re ".*breakpoint.*breakpoint.*$gdb_prompt $" { fail "didn't clear bps" } - -re ".*3.*main.*26.*$gdb_prompt $" { + -re ".*3.*main.*31.*$gdb_prompt $" { pass "all set to continue" } -re ".*$gdb_prompt $" { @@ -123,14 +123,14 @@ gdb_expect { # See if we can step out with control. The "1 2 3" stuff # is output from the program. # -gdb_test "cont" ".*Breakpoint.*26.*" "" -gdb_test "next" ".*1 2 7 14 23 34 47 62 79 Goodbye!.*27.*" "Step to return" +gdb_test "cont" ".*Breakpoint.*32.*" "" +gdb_test "next" ".*1 2 7 14 23 34 47 62 79 Goodbye!.*32.*" "Step to return" set old_timeout $timeout set timeout 50 send_gdb "next\n" gdb_expect { - -re "27.*$gdb_prompt $" { + -re "33.*$gdb_prompt $" { # sometimes we stop at the closing brace, if so, do another next send_gdb "next\n" gdb_expect { @@ -141,6 +141,9 @@ gdb_expect { -re ".*in.*start.*$gdb_prompt $" { pass "step out of main" } + -re ".*in.*\\\$START\\\$.*from.*dld.sl.*$gdb_prompt $" { + pass "step out of main" + } -re ".*$gdb_prompt $" { fail "step at end 2" } timeout { fail "hang or timeout on step at end 2" } } @@ -152,6 +155,9 @@ gdb_expect { -re ".*in.*start.*$gdb_prompt $" { pass "step out of main" } + -re ".*in.*\\\$START\\\$.*from.*dld.sl.*$gdb_prompt $" { + pass "step out of main 2" + } -re ".*in.*currently asm.*$gdb_prompt $" { pass "step out of main into assembler" } @@ -163,7 +169,18 @@ gdb_expect { } if {![target_info exists use_cygmon] || ![target_info use_cygmon]} { - gdb_test "n" ".*Single.*Program exited.*" "step to end of run" + send_gdb "n\n" + gdb_expect { + -re ".*Single.*Program exited.*$gdb_prompt $" { + pass "step to end of run 1" + } + -re ".*Single.*in exit.*from.*dld.sl.*$gdb_prompt $" { + pass "step to end of run 2" + gdb_test "c" ".*" "continue after exit" + } + timeout { fail "(timeout) step to end of run" } + } + set timeout $old_timeout gdb_test "n" ".*The program is not being run.*" "don't step after run" |