* lib/gdb.exp (rerun_to_main): Allow restarting application.
* gdb.base/ena-dis-br.exp (rerun_to_main): Eliminate.
This commit is contained in:
parent
05a487dc8c
commit
11350d2a6f
|
@ -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>
|
2002-09-17 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* gdb.base/printcmds.exp (test_print_string_constants): Expect
|
* gdb.base/printcmds.exp (test_print_string_constants): Expect
|
||||||
|
|
|
@ -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."
|
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_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
|
|
@ -1685,6 +1685,10 @@ proc rerun_to_main {} {
|
||||||
} else {
|
} else {
|
||||||
send_gdb "run\n"
|
send_gdb "run\n"
|
||||||
gdb_expect {
|
gdb_expect {
|
||||||
|
-re "The program .* has been started already.*y or n. $" {
|
||||||
|
send_gdb "y\n"
|
||||||
|
exp_continue
|
||||||
|
}
|
||||||
-re "Starting program.*$gdb_prompt $"\
|
-re "Starting program.*$gdb_prompt $"\
|
||||||
{pass "rerun to main" ; return 0}
|
{pass "rerun to main" ; return 0}
|
||||||
-re "$gdb_prompt $"\
|
-re "$gdb_prompt $"\
|
||||||
|
|
Loading…
Reference in New Issue