From e8a256f8a295067be0391ae2123f7ffeca5e84a2 Mon Sep 17 00:00:00 2001 From: Stu Grossman Date: Thu, 16 Mar 1995 00:06:51 +0000 Subject: [PATCH] * config/rom68k.exp: New file to support Motorola IDP board. * gdb.base/a2-run.exp: Skip this file if noargs is set. * gdb.base/break.c: Change things around so that this program doesn't depend upon args. This is necessary to make remote targets work (in general, they can't take args). * gdb.base/break.exp: Don't try to send args to program. Don't expect output. Also, replace lots of code with gdb_test. --- gdb/testsuite/ChangeLog | 10 ++++++++ gdb/testsuite/gdb.base/break.exp | 40 +++++++------------------------- 2 files changed, 19 insertions(+), 31 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2139532ba98..ecbe0777843 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,13 @@ +Wed Mar 15 15:54:56 1995 Stu Grossman (grossman@cygnus.com) + + * config/rom68k.exp: New file to support Motorola IDP board. + * gdb.base/a2-run.exp: Skip this file if noargs is set. + * gdb.base/break.c: Change things around so that this program + doesn't depend upon args. This is necessary to make remote + targets work (in general, they can't take args). + * gdb.base/break.exp: Don't try to send args to program. Don't + expect output. Also, replace lots of code with gdb_test. + Wed Mar 15 04:11:14 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.base/printcmds.exp (test_character_literals_accepted): Test diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp index e3e2770310d..7795b48cfc4 100644 --- a/gdb/testsuite/gdb.base/break.exp +++ b/gdb/testsuite/gdb.base/break.exp @@ -132,7 +132,7 @@ if [istarget "*-*-vxworks"] then { send "run vxmain \"2\"\n" set timeout 120 } else { - send "run 2\n" + send "run\n" } expect { -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:56.*56\[\t \]+if .argc.* \{.*$prompt $"\ @@ -141,47 +141,25 @@ expect { timeout { fail "(timeout) run until function breakpoint" } } - # # run until the breakpoint at a line number # -send "continue\n" -expect { - -re "continue.*Continuing..*Breakpoint \[0-9\]+, main .argc.*argv.* at .*$srcfile:60.* -60\[\t ]+printf.*factorial.*$prompt $" { pass "run until breakpoint set at a line number" } - -re ".*$prompt $" { fail "run until breakpoint set at a line number" } - timeout { fail "(timeout) run until breakpoint set at a line number" } -} - +gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:60.*60\[\t \]+printf.*factorial" \ + "run until breakpoint set at a line number" # # Run until the breakpoint set in a function in a file # -send "continue\n" -expect { - -re "continue.*Continuing..*Breakpoint \[0-9\]+, factorial .value=2. at .*$srcfile:72.*72\[\t ]+if .value > 1. \{.*$prompt $"\ - { send "continue\n" - expect { - -re "continue.*Continuing..*Breakpoint \[0-9\]+, factorial .value=1. at .*$srcfile:72.*72\[\t ]+if .value > 1.*$prompt $" { pass "run until file:function breakpoint" } - -re ".*$prompt $" { fail "run until file:function breakpoint" } - timeout { fail "(timeout) run until file:function breakpoint" } - } - } - -re ".*$prompt $" { fail "run until file:function breakpoint" } - timeout { fail "(timeout) run until file:function breakpoint" } +for {set i 6} {$i >= 1} {incr i -1} { + gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:72.*72\[\t \]+if .value > 1. \{" \ + "run until file:function($i) breakpoint" } - # # run until the file:function breakpoint at a line number in a file # -send "continue\n" -expect { - -re "continue.*Continuing..*Breakpoint \[0-9\]+, main .*argc.*argv.* at .*$srcfile:66.*66\[\t ]+return 0;.*$prompt $" { pass "run until file:linenum breakpoint" } - -re ".*$prompt $" { fail "run until file:linenum breakpoint" } - timeout { fail "(timeout) run until file:linenum breakpoint" } -} - +gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:66.*66\[\t \]+return 0;" \ + "run until file:linenum breakpoint" # # delete all breakpoints so we can start over, course this can be a test too @@ -323,7 +301,7 @@ proc test_next_with_recursion {} { if [istarget "*-*-vxworks"] then { send "run vxmain \"6\"\n" } else { - send "run 6\n" + send "run\n" } expect { -re "Starting .*Break.* factorial .value=6. .*$prompt $" {} -- 2.30.2