diff options
author | Kung Hsu <kung@cygnus> | 1995-03-24 22:06:00 +0000 |
---|---|---|
committer | Kung Hsu <kung@cygnus> | 1995-03-24 22:06:00 +0000 |
commit | c86bd3d41b3d6cc5a72d7995ae42d222888f3fa3 (patch) | |
tree | 4207b463ce2ceaedb578808abd6b1968dfa3ef3a /gdb/testsuite | |
parent | a302b5c21909c7ee5e7a7aadf8063ce82d3412ee (diff) | |
download | gdb-c86bd3d41b3d6cc5a72d7995ae42d222888f3fa3.zip gdb-c86bd3d41b3d6cc5a72d7995ae42d222888f3fa3.tar.gz gdb-c86bd3d41b3d6cc5a72d7995ae42d222888f3fa3.tar.bz2 |
* gdb.base/callfuncs.exp: call runto_main instead of runto main.
runto_main is a proc in gdb.exp that will do 'step' for target use
stubs.
* gdb.base/exprs.exp: ditto.
* gdb.base/interrupt.exp: ditto.
* gdb.base/opaque.exp: ditto.
* gdb.base/printcmds.exp: ditto.
* gdb.base/ptype.exp: ditto.
* gdb.base/scope.exp: ditto.
* gdb.base/setvar.exp: ditto.
* gdb.base/signals.exp: ditto.
* gdb.base/twice.exp: ditto.
* gdb.base/break.exp: no run and hit main for stubs. Change line
numbers for breakpoints and info breakpoint.
* gdb.base/break.c: Add #ifdef usestubs for set_debug_traps() and
breakpoint().
* gdb.base/callfuncs.c: ditto.
* gdb.base/exprs: ditto.
* gdb.base/interrupt.c: ditto.
* gdb.base/opaque0.c: ditto.
* gdb.base/printcmds.c: ditto.
* gdb.base/ptype.c: ditto.
* gdb.base/scope0.c: ditto.
* gdb.base/setvar.c: ditto.
* gdb.base/signals.c: ditto.
* gdb.base/twice.c: ditto.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.base/break.exp | 54 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/signals.exp | 4 |
2 files changed, 30 insertions, 28 deletions
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp index 42d7824..1cec7db 100644 --- a/gdb/testsuite/gdb.base/break.exp +++ b/gdb/testsuite/gdb.base/break.exp @@ -87,22 +87,22 @@ gdb_test "break $srcfile:factorial" \ # # test break at line number # -gdb_test "break 60" \ - "Breakpoint.*at.* file .*$srcfile, line 60\\." \ +gdb_test "break 64" \ + "Breakpoint.*at.* file .*$srcfile, line 64\\." \ "breakpoint line number" # # test duplicate breakpoint # -gdb_test "break 60" \ - "Note: breakpoint \[0-9\]+ also set at pc.*Breakpoint \[0-9\]+ at.* file .*$srcfile, line 60\\." \ +gdb_test "break 64" \ + "Note: breakpoint \[0-9\]+ also set at pc.*Breakpoint \[0-9\]+ at.* file .*$srcfile, line 64\\." \ "breakpoint duplicate" # # test break at line number in file # -gdb_test "break $srcfile:66" \ - "Breakpoint.*at.* file .*$srcfile, line 66\\." \ +gdb_test "break $srcfile:70" \ + "Breakpoint.*at.* file .*$srcfile, line 70\\." \ "breakpoint line number in file" @@ -111,11 +111,11 @@ gdb_test "break $srcfile:66" \ # gdb_test "info break" \ "Num Type\[ \]+Disp Enb Address\[ \]+What.* -\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:56.* -\[0-9\]+\[\t \]+breakpoint keep y.* in factorial at .*$srcfile:72.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:60.* -\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:60.* -\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:66" \ +\[0-9\]+\[\t \]+breakpoint keep y.* in factorial at .*$srcfile:76.* +\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:64.* +\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:64.* +\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:70" \ "breakpoint info" @@ -126,39 +126,41 @@ if [istarget "mips-idt-*"] then { } # -# run until the breakpoint at main is hit +# run until the breakpoint at main is hit. For non-stubs-using targets. # -if [istarget "*-*-vxworks*"] then { +if !$usestubs then { + if [istarget "*-*-vxworks*"] then { send "run vxmain \"2\"\n" set timeout 120 -} else { + } else { send "run\n" -} -expect { - -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:56.*56\[\t \]+if .argc.* \{.*$prompt $"\ + } + expect { + -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:60.*60\[\t \]+if .argc.* \{.*$prompt $"\ { pass "run until function breakpoint" } -re ".*$prompt $" { fail "run until function breakpoint" } timeout { fail "(timeout) run until function breakpoint" } + } } # # run until the breakpoint at a line number # -gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:60.*60\[\t \]+printf.*factorial.*" \ +gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:64.*64\[\t \]+printf.*factorial.*" \ "run until breakpoint set at a line number" # # Run until the breakpoint set in a function in a file # 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. \{" \ + gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:76.*76\[\t \]+if .value > 1. \{" \ "run until file:function($i) breakpoint" } # # run until the file:function breakpoint at a line number in a file # -gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:66.*66\[\t \]+return 0;" \ +gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:70.*70\[\t \]+return 0;" \ "run until file:linenum breakpoint" # @@ -224,9 +226,9 @@ expect { # # test break at line number # -send "tbreak 60\n" +send "tbreak 64\n" expect { - -re "Breakpoint.*at.* file .*$srcfile, line 60.*$prompt $" { pass "Temporary breakpoint line number" } + -re "Breakpoint.*at.* file .*$srcfile, line 64.*$prompt $" { pass "Temporary breakpoint line number" } -re ".*$prompt $" { pass "Temporary breakpoint line number" } timeout { fail "(timeout) breakpoint line number" } } @@ -235,9 +237,9 @@ expect { # # test break at line number in file # -send "tbreak $srcfile:66\n" +send "tbreak $srcfile:70\n" expect { - -re "Breakpoint.*at.* file .*$srcfile, line 66.*$prompt $" { pass "Temporary breakpoint line number in file" } + -re "Breakpoint.*at.* file .*$srcfile, line 70.*$prompt $" { pass "Temporary breakpoint line number in file" } -re ".*$prompt $" { pass "Temporary breakpoint line number in file" } timeout { fail "(timeout) breakpoint line number in file" } } @@ -249,10 +251,10 @@ expect { send "info break\n" expect { -re "Num Type.*Disp Enb Address.*What.* -\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:56.* -\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial at .*$srcfile:72.* \[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:60.* -\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:66.*$prompt $" { +\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial at .*$srcfile:76.* +\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:64.* +\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:70.*$prompt $" { pass "Temporary breakpoint info" } -re ".*$prompt $" { fail "Temporary breakpoint info" } diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp index c222972..857702c 100644 --- a/gdb/testsuite/gdb.base/signals.exp +++ b/gdb/testsuite/gdb.base/signals.exp @@ -14,7 +14,7 @@ if ![file exists $binfile] then { proc signal_tests_1 {} { global prompt - if [runto main] then { + if [runto_main] then { gdb_test "next" "signal \\(SIGUSR1.*" \ "next over signal (SIGALRM, handler)" gdb_test "next" "alarm \\(.*" \ @@ -267,7 +267,7 @@ expect { default { perror "sync trouble in signals.exp" } } -if [runto main] then { +if [runto_main] then { gdb_test "break handler if 0" "Breakpoint \[0-9\]+ .*" gdb_test "set \$handler_breakpoint_number = \$bpnum" "" |