From 11350d2a6f73a4a510fa335553e1363857f8b84f Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 18 Sep 2002 15:34:10 +0000 Subject: [PATCH] * lib/gdb.exp (rerun_to_main): Allow restarting application. * gdb.base/ena-dis-br.exp (rerun_to_main): Eliminate. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.base/ena-dis-br.exp | 24 ------------------------ gdb/testsuite/lib/gdb.exp | 4 ++++ 3 files changed, 9 insertions(+), 24 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2582161d394..3235f08a703 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-09-18 Corinna Vinschen + + * lib/gdb.exp (rerun_to_main): Allow restarting application. + * gdb.base/ena-dis-br.exp (rerun_to_main): Eliminate. + 2002-09-17 Tom Tromey * gdb.base/printcmds.exp (test_print_string_constants): Expect diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp index 40b0bda3fd4..93f6707097c 100644 --- a/gdb/testsuite/gdb.base/ena-dis-br.exp +++ b/gdb/testsuite/gdb.base/ena-dis-br.exp @@ -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 diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 7e4a5b14388..aae73657a5f 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -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 $"\ -- 2.39.2