* lib/gdb.exp (rerun_to_main): Allow restarting application.

* gdb.base/ena-dis-br.exp (rerun_to_main): Eliminate.
This commit is contained in:
Corinna Vinschen 2002-09-18 15:34:10 +00:00
parent 05a487dc8c
commit 11350d2a6f
3 changed files with 9 additions and 24 deletions

View 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

View 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

View 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 $"\