]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* lib/gdb.exp (rerun_to_main): Allow restarting application.
authorCorinna Vinschen <corinna@vinschen.de>
Wed, 18 Sep 2002 15:34:10 +0000 (15:34 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 18 Sep 2002 15:34:10 +0000 (15:34 +0000)
* gdb.base/ena-dis-br.exp (rerun_to_main): Eliminate.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/ena-dis-br.exp
gdb/testsuite/lib/gdb.exp

index 2582161d394d2580ed516fa9e2e8082aec84b979..3235f08a703e566d3683d441e4f1b5de14bdfa54 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-18  Corinna Vinschen  <vinschen@redhat.com>
+
+       * lib/gdb.exp (rerun_to_main): Allow restarting application.
+       * gdb.base/ena-dis-br.exp (rerun_to_main): Eliminate.
+
 2002-09-17  Tom Tromey  <tromey@redhat.com>
 
        * gdb.base/printcmds.exp (test_print_string_constants): Expect
index 40b0bda3fd4aa348a9b27c8d18eca00f1a5b5b82..93f6707097c258c1ed7b9155f05766a4f80181d9 100644 (file)
@@ -38,30 +38,6 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
      gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
 }
 
-proc rerun_to_main {} {
-  global gdb_prompt
-
-  if [target_info exists use_gdb_stub] {
-    gdb_run_cmd
-    gdb_expect {
-      -re ".*Breakpoint .*main .*$gdb_prompt $"\
-             {pass "rerun to main" ; return 0}
-      -re "$gdb_prompt $"\
-             {fail "rerun to main" ; return 0}
-      timeout {fail "(timeout) rerun to main" ; return 0}
-    }
-  } else {
-    send_gdb "run\n"
-    gdb_expect {
-      -re "Starting program.*$gdb_prompt $"\
-             {pass "rerun to main" ; return 0}
-      -re "$gdb_prompt $"\
-             {fail "rerun to main" ; return 0}
-      timeout {fail "(timeout) rerun to main" ; return 0}
-    }
-  }
-}
-
 gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
index 7e4a5b143881ada08d594e6f6e93c95aa870076e..aae73657a5f3c4d763da85901c260fd8ab20a1ad 100644 (file)
@@ -1685,6 +1685,10 @@ proc rerun_to_main {} {
   } else {
     send_gdb "run\n"
     gdb_expect {
+      -re "The program .* has been started already.*y or n. $" {
+         send_gdb "y\n"
+         exp_continue
+      }
       -re "Starting program.*$gdb_prompt $"\
              {pass "rerun to main" ; return 0}
       -re "$gdb_prompt $"\