* gdb.base/attach.exp: When trying to attach to a nonexistent
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / ena-dis-br.exp
index f7be9868e8985089245cdd354328595958b23120..93f6707097c258c1ed7b9155f05766a4f80181d9 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+#   Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
 
 
 # This program is free software; you can redistribute it and/or modify
@@ -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
@@ -97,10 +73,14 @@ gdb_expect {
   timeout {fail "(timeout) info break marker1"}
 }
 
+# See the comments in condbreak.exp for "run until breakpoint at marker1" 
+# for an explanation of the xfail below.
 send_gdb "continue\n"
 gdb_expect {
   -re "Breakpoint \[0-9\]*, marker1.*$gdb_prompt $"\
           {pass "continue to break marker1"}
+  -re "Breakpoint \[0-9\]*, $hex in marker1.*$gdb_prompt $"\
+          {xfail "continue to break marker1"}
   -re "$gdb_prompt $"\
           {fail "continue to break marker1"}
   timeout {fail "(timeout) continue to break marker1"}
@@ -141,10 +121,14 @@ gdb_expect {
   timeout {fail "(timeout) info auto-disabled break marker2"}
 }
 
+# See the comments in condbreak.exp for "run until breakpoint at marker1" 
+# for an explanation of the xfail below.
 send_gdb "continue\n"
 gdb_expect {
   -re "Breakpoint \[0-9\]*, marker2.*$gdb_prompt $"\
           {pass "continue to auto-disabled break marker2"}
+  -re "Breakpoint \[0-9\]*, $hex in marker2.*$gdb_prompt $"\
+          {xfail "continue to auto-disabled break marker2"}
   -re "$gdb_prompt $"\
           {fail "continue to auto-disabled break marker2"}
   timeout {fail "(timeout) continue to auto-disabled break marker2"}
@@ -325,13 +309,17 @@ gdb_expect {
 gdb_continue_to_end "no stop at ignored break marker1"
 rerun_to_main
 
+# See the comments in condbreak.exp for "run until breakpoint at marker1" 
+# for an explanation of the xfail below.
 send_gdb "continue\n"
 gdb_expect {
   -re "Breakpoint \[0-9\]*, marker1.*$gdb_prompt $"\
-          {pass "continue to break marker1"}
+          {pass "continue to break marker1, 2nd time"}
+  -re "Breakpoint \[0-9\]*, $hex in marker1.*$gdb_prompt $"\
+          {xfail "continue to break marker1, 2nd time"}
   -re "$gdb_prompt $"\
-          {fail "continue to break marker1"}
-  timeout {fail "(timeout) continue to break marker1"}
+          {fail "continue to break marker1, 2nd time"}
+  timeout {fail "(timeout) continue to break marker1, 2nd time"}
 }
 
 # Verify that we can specify both an ignore count and an auto-delete.
This page took 0.024153 seconds and 4 git commands to generate.