+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
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
} 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 $"\