import gdb-1999-06-28 snapshot
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / ending-run.exp
index 8f102fbb43ee3477f55a85f1b2c1cd3fbec9843f..e36c975bfd15d14e4f3b0a06bc9852d4e4032886 100644 (file)
@@ -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"
This page took 0.028794 seconds and 4 git commands to generate.