diff options
author | Pedro Alves <palves@redhat.com> | 2011-12-13 17:22:11 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-12-13 17:22:11 +0000 |
commit | 924437bc13e073e7d2b1e705dd4fb60001c1d49b (patch) | |
tree | 98afe2076bbbf0100b66e0cc57234e3127a62219 /gdb/testsuite/gdb.base | |
parent | 6210a125f8517756c18bf50cd313c39d9487f184 (diff) | |
download | gdb-924437bc13e073e7d2b1e705dd4fb60001c1d49b.zip gdb-924437bc13e073e7d2b1e705dd4fb60001c1d49b.tar.gz gdb-924437bc13e073e7d2b1e705dd4fb60001c1d49b.tar.bz2 |
gdb/doc/
2011-12-13 Pedro Alves <pedro@codesourcery.com>
* gdb.texinfo (Implementing a Remote Stub): Explain that you
should transfer control to the stub in the startup code instead of
in main. Mention the need to get past the initial breakpoint.
gdb/testsuite/
2011-12-13 Pedro Alves <pedro@codesourcery.com>
Doug Evans <dje@google.com>
* lib/gdb.exp (gdb_run_cmd, runto_main, gdb_compile)
(clean_restart): Remove references to the gdb_stub target board
variable.
(gdb_step_for_stub): Delete.
* gdb.base/annota1.exp: Remove all references to [target_info
exists gdb_stub], gdb_step_for_stub and usestubs.
* gdb.base/annota3.exp: Ditto.
* gdb.base/async.exp: Ditto.
* gdb.base/break.exp: Ditto.
* gdb.base/code-expr.exp: Ditto.
* gdb.base/commands.exp: Ditto.
* gdb.base/completion.exp: Ditto.
* gdb.base/condbreak.exp: Ditto.
* gdb.base/consecutive.exp: Ditto.
* gdb.base/cvexpr.exp: Ditto.
* gdb.base/define.exp: Ditto.
* gdb.base/display.exp: Ditto.
* gdb.base/ena-dis-br.exp: Ditto.
* gdb.base/environ.exp: Ditto.
* gdb.base/gnu-ifunc.exp: Ditto.
* gdb.base/maint.exp: Ditto.
* gdb.base/pending.exp: Ditto.
* gdb.base/sect-cmd.exp: Ditto.
* gdb.base/sepdebug.exp: Ditto.
* gdb.base/unload.exp: Ditto.
* gdb.base/watchpoint-solib.exp: Ditto.
* gdb.cp/annota2.exp: Ditto.
* gdb.cp/annota3.exp: Ditto.
* gdb.dwarf2/dw2-inline-param.exp: Ditto.
* gdb.hp/gdb.compat/xdb1.exp: Ditto.
* gdb.mi/mi-pending.exp: Ditto.
* gdb.trace/circ.exp: Ditto.
* gdb.cp/ovldbreak.exp: Ditto. Adjust expected line numbers.
* gdb.base/list.exp: Ditto.
* gdb.base/all-types.c: Remove all calls to set_debug_traps and
breakpoint function and all references to the usestubs macro.
* gdb.base/exprs.c: Ditto.
* gdb.base/freebpcmd.c: Ditto.
* gdb.base/bitfields.c: Ditto.
* gdb.base/bitfields2.c: Ditto.
* gdb.base/break.c: Ditto.
* gdb.base/call-sc.c: Ditto.
* gdb.base/call-signals.c: Ditto.
* gdb.base/callfuncs.c: Ditto.
* gdb.base/charset.c: Ditto.
* gdb.base/consecutive.c: Ditto.
* gdb.base/constvars.c: Ditto.
* gdb.base/funcargs.c: Ditto.
* gdb.base/int-type.c: Ditto.
* gdb.base/interrupt.c: Ditto.
* gdb.base/langs0.c: Ditto.
* gdb.base/list0.c: Ditto.
* gdb.base/mips_pro.c: Ditto.
* gdb.base/miscexprs.c: Ditto.
* gdb.base/nodebug.c: Ditto.
* gdb.base/opaque0.c: Ditto.
* gdb.base/pointers.c: Ditto.
* gdb.base/printcmds.c: Ditto.
* gdb.base/ptype.c: Ditto.
* gdb.base/recurse.c: Ditto.
* gdb.base/reread1.c: Ditto.
* gdb.base/reread2.c: Ditto.
* gdb.base/restore.c: Ditto.
* gdb.base/return.c: Ditto.
* gdb.base/run.c: Ditto.
* gdb.base/scope0.c: Ditto.
* gdb.base/sepdebug.c: Ditto.
* gdb.base/setshow.c: Ditto.
* gdb.base/setvar.c: Ditto.
* gdb.base/sigall.c: Ditto.
* gdb.base/signals.c: Ditto.
* gdb.base/structs.c: Ditto.
* gdb.base/structs2.c: Ditto.
* gdb.base/testenv.c: Ditto.
* gdb.base/twice.c: Ditto.
* gdb.base/unwindonsignal.c: Ditto.
* gdb.base/watchpoint.c: Ditto.
* gdb.base/watchpoints.c: Ditto.
* gdb.base/whatis.c: Ditto.
* gdb.cp/classes.cc: Ditto.
* gdb.cp/cplusfuncs.cc: Ditto.
* gdb.cp/derivation.cc: Ditto.
* gdb.cp/formatted-ref.cc: Ditto.
* gdb.cp/misc.cc: Ditto.
* gdb.cp/overload.cc: Ditto.
* gdb.cp/ovldbreak.cc: Ditto.
* gdb.cp/ref-params.cc: Ditto.
* gdb.cp/ref-types.cc: Ditto.
* gdb.cp/templates.cc: Ditto.
* gdb.cp/virtfunc.cc: Ditto.
* gdb.hp/gdb.aCC/run.c: Ditto.
* gdb.hp/gdb.base-hp/callfwmall.c: Ditto.
* gdb.hp/gdb.compat/xdb0.c: Ditto.
* gdb.reverse/consecutive-reverse.c: Ditto.
* gdb.reverse/sigall-reverse.c: Ditto.
* gdb.reverse/until-reverse.c: Ditto.
* gdb.reverse/watch-reverse.c: Ditto.
* gdb.trace/actions.c: Ditto.
* gdb.trace/circ.c: Ditto.
* gdb.trace/collection.c: Ditto.
Diffstat (limited to 'gdb/testsuite/gdb.base')
66 files changed, 25 insertions, 284 deletions
diff --git a/gdb/testsuite/gdb.base/all-types.c b/gdb/testsuite/gdb.base/all-types.c index 2f3a31f..570fd43 100644 --- a/gdb/testsuite/gdb.base/all-types.c +++ b/gdb/testsuite/gdb.base/all-types.c @@ -28,10 +28,6 @@ double v_double; int main () { extern void dummy(); -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif dummy(); return 0; diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp index 9ceeeac..787eb80 100644 --- a/gdb/testsuite/gdb.base/annota1.exp +++ b/gdb/testsuite/gdb.base/annota1.exp @@ -50,10 +50,6 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} -if [target_info exists gdb_stub] { - gdb_step_for_stub; -} - # # the line at which break main will put the breakpoint # diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp index 8ec18a9..7767b1d 100644 --- a/gdb/testsuite/gdb.base/annota3.exp +++ b/gdb/testsuite/gdb.base/annota3.exp @@ -50,10 +50,6 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} -if [target_info exists gdb_stub] { - gdb_step_for_stub; -} - # # the line at which break main will put the breakpoint # diff --git a/gdb/testsuite/gdb.base/async.exp b/gdb/testsuite/gdb.base/async.exp index d894a08..b35926d 100644 --- a/gdb/testsuite/gdb.base/async.exp +++ b/gdb/testsuite/gdb.base/async.exp @@ -56,9 +56,6 @@ gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} -if [target_info exists gdb_stub] { - gdb_step_for_stub; -} # # set it up at a breakpoint so we can play with it diff --git a/gdb/testsuite/gdb.base/bitfields.c b/gdb/testsuite/gdb.base/bitfields.c index 3b5e42c..ed1634c 100644 --- a/gdb/testsuite/gdb.base/bitfields.c +++ b/gdb/testsuite/gdb.base/bitfields.c @@ -78,10 +78,6 @@ int main () /* For each member, set that member to 1, allow gdb to verify that the member (and only that member) is 1, and then reset it back to 0. */ -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif flags.uc = 1; break1 (); flags.uc = 0; diff --git a/gdb/testsuite/gdb.base/bitfields2.c b/gdb/testsuite/gdb.base/bitfields2.c index 1958ef0..edb3b9f 100644 --- a/gdb/testsuite/gdb.base/bitfields2.c +++ b/gdb/testsuite/gdb.base/bitfields2.c @@ -162,10 +162,7 @@ void tester () int main () { int i; -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif + for (i = 0; i < 5; i += 1) tester (); return 0; diff --git a/gdb/testsuite/gdb.base/break.c b/gdb/testsuite/gdb.base/break.c index 3b9f6e2..d33ed15 100644 --- a/gdb/testsuite/gdb.base/break.c +++ b/gdb/testsuite/gdb.base/break.c @@ -86,10 +86,6 @@ int argc; char *argv[], **envp; #endif { -#ifdef usestubs - set_debug_traps(); /* set breakpoint 5 here */ - breakpoint(); -#endif if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */ fprintf (stderr, "usage: factorial <number>\n"); return 1; diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp index c5885ba..6d6f310 100644 --- a/gdb/testsuite/gdb.base/break.exp +++ b/gdb/testsuite/gdb.base/break.exp @@ -119,14 +119,7 @@ gdb_test "break multi_line_while_conditional" \ set bp_location5 [gdb_get_line_number "set breakpoint 5 here"] set bp_location6 [gdb_get_line_number "set breakpoint 6 here"] -# -# check to see what breakpoints are set -# -if [target_info exists gdb_stub] { - set main_line $bp_location5 -} else { - set main_line $bp_location6 -} +set main_line $bp_location6 if {$hp_aCC_compiler} { set proto "\\(int\\)" diff --git a/gdb/testsuite/gdb.base/call-sc.c b/gdb/testsuite/gdb.base/call-sc.c index 951e101..dd2b8ea 100644 --- a/gdb/testsuite/gdb.base/call-sc.c +++ b/gdb/testsuite/gdb.base/call-sc.c @@ -58,10 +58,6 @@ zed () int main() { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif int i; Fun(foo); diff --git a/gdb/testsuite/gdb.base/call-signals.c b/gdb/testsuite/gdb.base/call-signals.c index 23f0a31..d775853 100644 --- a/gdb/testsuite/gdb.base/call-signals.c +++ b/gdb/testsuite/gdb.base/call-signals.c @@ -58,11 +58,6 @@ null_hand_call () int main () { -#ifdef usestubs - set_debug_traps (); - breakpoint (); -#endif - #ifdef SIG_SETMASK /* Ensure all the signals aren't blocked. The environment in which the testsuite is run may have blocked some diff --git a/gdb/testsuite/gdb.base/callfuncs.c b/gdb/testsuite/gdb.base/callfuncs.c index f764b82..58eaa77 100644 --- a/gdb/testsuite/gdb.base/callfuncs.c +++ b/gdb/testsuite/gdb.base/callfuncs.c @@ -646,10 +646,6 @@ struct struct_with_fnptr *function_struct_ptr = &function_struct; int main () { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif malloc(1); t_double_values(double_val1, double_val2); t_structs_c(struct_val1); diff --git a/gdb/testsuite/gdb.base/charset.c b/gdb/testsuite/gdb.base/charset.c index df56c45..57107c6 100644 --- a/gdb/testsuite/gdb.base/charset.c +++ b/gdb/testsuite/gdb.base/charset.c @@ -124,10 +124,6 @@ extern void malloc_stub (void); int main () { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif malloc_stub (); diff --git a/gdb/testsuite/gdb.base/code-expr.exp b/gdb/testsuite/gdb.base/code-expr.exp index b5cddaa..a280fe4 100644 --- a/gdb/testsuite/gdb.base/code-expr.exp +++ b/gdb/testsuite/gdb.base/code-expr.exp @@ -41,10 +41,6 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} -if [target_info exists gdb_stub] { - gdb_step_for_stub; -} - gdb_test_no_output "set print sevenbit-strings" gdb_test_no_output "set print address off" gdb_test_no_output "set width 0" diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp index b4b14b5..3927e84 100644 --- a/gdb/testsuite/gdb.base/commands.exp +++ b/gdb/testsuite/gdb.base/commands.exp @@ -319,7 +319,7 @@ proc watchpoint_command_test {} { # scope. fail $test } - -re "Continuing.*\[Ww\]atchpoint $wp_id deleted because the program has left the block in.*which its expression is valid.*run.c:(57|82).*$gdb_prompt $" { + -re "Continuing.*\[Ww\]atchpoint $wp_id deleted because the program has left the block in.*which its expression is valid.*run.c:(53|77).*$gdb_prompt $" { pass $test } } diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index 030a912..5825139 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -51,8 +51,6 @@ if $tracelevel then { } -global usestubs - # # test running programs # diff --git a/gdb/testsuite/gdb.base/condbreak.exp b/gdb/testsuite/gdb.base/condbreak.exp index b8b38a4..1e3014c 100644 --- a/gdb/testsuite/gdb.base/condbreak.exp +++ b/gdb/testsuite/gdb.base/condbreak.exp @@ -22,8 +22,6 @@ if $tracelevel then { strace $tracelevel } -global usestubs - # # test running programs # @@ -58,10 +56,6 @@ gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} -if [target_info exists gdb_stub] { - gdb_step_for_stub; -} - set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] set bp_location6 [gdb_get_line_number "set breakpoint 6 here"] set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1] diff --git a/gdb/testsuite/gdb.base/consecutive.c b/gdb/testsuite/gdb.base/consecutive.c index bfea429..7d0cea9 100644 --- a/gdb/testsuite/gdb.base/consecutive.c +++ b/gdb/testsuite/gdb.base/consecutive.c @@ -12,9 +12,5 @@ int foo () main() { -#ifdef usestubs - set_debug_traps (); - breakpoint (); -#endif foo (); } diff --git a/gdb/testsuite/gdb.base/consecutive.exp b/gdb/testsuite/gdb.base/consecutive.exp index 34ac2dd..515b76a 100644 --- a/gdb/testsuite/gdb.base/consecutive.exp +++ b/gdb/testsuite/gdb.base/consecutive.exp @@ -43,10 +43,6 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} -if [target_info exists gdb_stub] { - gdb_step_for_stub; -} - if ![runto_main] then { perror "couldn't run to breakpoint" continue diff --git a/gdb/testsuite/gdb.base/constvars.c b/gdb/testsuite/gdb.base/constvars.c index 289b8e7..4228822 100644 --- a/gdb/testsuite/gdb.base/constvars.c +++ b/gdb/testsuite/gdb.base/constvars.c @@ -191,10 +191,6 @@ main (void) const char & radiation = laconic; volatile signed char & remuneration = lemonade; */ -#ifdef usestubs - set_debug_traps (); - breakpoint (); -#endif marker1 (); diff --git a/gdb/testsuite/gdb.base/cvexpr.exp b/gdb/testsuite/gdb.base/cvexpr.exp index 34645dc..b9c9719 100644 --- a/gdb/testsuite/gdb.base/cvexpr.exp +++ b/gdb/testsuite/gdb.base/cvexpr.exp @@ -41,10 +41,6 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} -if [target_info exists gdb_stub] { - gdb_step_for_stub; -} - gdb_test_no_output "set print sevenbit-strings" gdb_test_no_output "set print address off" gdb_test_no_output "set width 0" diff --git a/gdb/testsuite/gdb.base/define.exp b/gdb/testsuite/gdb.base/define.exp index 89519cb..414e9db 100644 --- a/gdb/testsuite/gdb.base/define.exp +++ b/gdb/testsuite/gdb.base/define.exp @@ -20,8 +20,6 @@ if $tracelevel then { strace $tracelevel } -global usestubs - # # test running programs diff --git a/gdb/testsuite/gdb.base/display.exp b/gdb/testsuite/gdb.base/display.exp index fc3c47e..d049a29 100644 --- a/gdb/testsuite/gdb.base/display.exp +++ b/gdb/testsuite/gdb.base/display.exp @@ -31,9 +31,6 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb untested display.exp return -1 } -if [target_info exists gdb_stub] { - gdb_step_for_stub; -} # Preserve the old timeout, and set a new one that should be # sufficient to avoid timing out during this test. diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp index 46713b9..6461344 100644 --- a/gdb/testsuite/gdb.base/ena-dis-br.exp +++ b/gdb/testsuite/gdb.base/ena-dis-br.exp @@ -20,8 +20,6 @@ if $tracelevel then { strace $tracelevel } -global usestubs - # # test running programs # diff --git a/gdb/testsuite/gdb.base/environ.exp b/gdb/testsuite/gdb.base/environ.exp index 3160b17..f039712 100644 --- a/gdb/testsuite/gdb.base/environ.exp +++ b/gdb/testsuite/gdb.base/environ.exp @@ -18,8 +18,6 @@ if $tracelevel then { strace $tracelevel } -global usestubs - # # test running programs # diff --git a/gdb/testsuite/gdb.base/exprs.c b/gdb/testsuite/gdb.base/exprs.c index 34d2780..90c0f25 100644 --- a/gdb/testsuite/gdb.base/exprs.c +++ b/gdb/testsuite/gdb.base/exprs.c @@ -8,10 +8,6 @@ main (argc, argv, envp) #endif { extern void dummy(); -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif dummy(); return 0; diff --git a/gdb/testsuite/gdb.base/freebpcmd.c b/gdb/testsuite/gdb.base/freebpcmd.c index 80b8d9e..7593afd 100644 --- a/gdb/testsuite/gdb.base/freebpcmd.c +++ b/gdb/testsuite/gdb.base/freebpcmd.c @@ -24,11 +24,6 @@ main (int argc, char **argv) { int i; -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif - for (i = 0; i < 100; i++) printf (">>> %d\n", i); /* euphonium */ diff --git a/gdb/testsuite/gdb.base/funcargs.c b/gdb/testsuite/gdb.base/funcargs.c index 6d16b62..b34f3fb 100644 --- a/gdb/testsuite/gdb.base/funcargs.c +++ b/gdb/testsuite/gdb.base/funcargs.c @@ -837,10 +837,6 @@ int main () void (*pointer_to_call0a) (char, short, int, long) = (void (*)(char, short, int, long))call0a; double (*pointer_to_call_with_trampolines) (double) = call_with_trampolines; -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif /* Test calling with basic integer types */ call0a (c, s, i, l); call0b (s, i, l, c); diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.base/gnu-ifunc.exp index 4fcc3bf..2e95bee 100644 --- a/gdb/testsuite/gdb.base/gnu-ifunc.exp +++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp @@ -127,20 +127,17 @@ gdb_test "info sym $expect_out(1,string)" "gnu_ifunc in section .*" "info sym <g # Test statically linked ifunc resolving during inferior start. # https://bugzilla.redhat.com/show_bug.cgi?id=624967 -if ![target_info exists gdb_stub] { +# Compile $staticbinfile separately as it may exit on error (ld/12595). - # Compile $staticbinfile separately as it may exit on error (ld/12595). - - if { [gdb_compile ${srcdir}/${subdir}/$libsrc $lib_o object {}] != "" - || [gdb_compile "${srcdir}/${subdir}/$srcfile $lib_o" $staticbinfile executable {debug}] != "" } { - untested "Could not compile static executable $staticbinfile." - return -1 - } +if { [gdb_compile ${srcdir}/${subdir}/$libsrc $lib_o object {}] != "" + || [gdb_compile "${srcdir}/${subdir}/$srcfile $lib_o" $staticbinfile executable {debug}] != "" } { + untested "Could not compile static executable $staticbinfile." + return -1 +} - clean_restart $staticexecutable +clean_restart $staticexecutable - gdb_breakpoint "gnu_ifunc" - gdb_breakpoint "main" - gdb_run_cmd - gdb_test "" "Breakpoint \[0-9\]*, main .*" "static gnu_ifunc" -} +gdb_breakpoint "gnu_ifunc" +gdb_breakpoint "main" +gdb_run_cmd +gdb_test "" "Breakpoint \[0-9\]*, main .*" "static gnu_ifunc" diff --git a/gdb/testsuite/gdb.base/int-type.c b/gdb/testsuite/gdb.base/int-type.c index 548ca9c..da7eec0 100644 --- a/gdb/testsuite/gdb.base/int-type.c +++ b/gdb/testsuite/gdb.base/int-type.c @@ -9,11 +9,6 @@ int w; int main () { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif - x = 14; y = 3; z = 2; diff --git a/gdb/testsuite/gdb.base/interrupt.c b/gdb/testsuite/gdb.base/interrupt.c index 80b9060..d7bb271 100644 --- a/gdb/testsuite/gdb.base/interrupt.c +++ b/gdb/testsuite/gdb.base/interrupt.c @@ -17,10 +17,6 @@ main () { char x; int nbytes; -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif #ifdef SIGNALS signal (SIGINT, sigint_handler); #endif diff --git a/gdb/testsuite/gdb.base/langs0.c b/gdb/testsuite/gdb.base/langs0.c index 1477a32..cc6efdd 100644 --- a/gdb/testsuite/gdb.base/langs0.c +++ b/gdb/testsuite/gdb.base/langs0.c @@ -22,10 +22,6 @@ langs0__2do () int main () { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif if (langs0__2do () == 5003) /* Success. */ return 0; diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp index 6a4153c..c392924 100644 --- a/gdb/testsuite/gdb.base/list.exp +++ b/gdb/testsuite/gdb.base/list.exp @@ -98,7 +98,7 @@ proc test_listsize {} { runto_main; unsupported "list default lines around main"; } else { - gdb_test "list" "(1\[ \t\]+#include \"list0.h\".*10\[ \t\]+x = 0;|2.*11\[ \t\]+foo .x\[+)\]+;)" "list default lines around main" + gdb_test "list" "(1\[ \t\]+#include \"list0.h\".*7\[ \t\]+x = 0;\r\n.*10\[ \t\]+foo .x\[+)\]+;)" "list default lines around main" } # Ensure we can limit printouts to one line @@ -179,7 +179,7 @@ proc test_list_filename_and_number {} { send_gdb "list list0.c:1\n" gdb_expect { - -re "1\[ \t\]+#include \"list0.h\".*10\[ \t]+x = 0;\r\n$gdb_prompt $" { + -re "1\[ \t\]+#include \"list0.h\".*10\[ \t\]+foo .x\[+)\]+;\r\n$gdb_prompt $" { incr testcnt } -re ".*$gdb_prompt $" { fail "list list0.c:1" ; gdb_suppress_tests } @@ -223,7 +223,7 @@ proc test_list_function {} { # gcc appears to generate incorrect debugging information for code # in include files, which breaks this test. # SunPRO cc is the second case below, it's also correct. - gdb_test "list main" "(5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;|1\[ \t\]+#include .*10\[ \t\]+x = 0;)" "list function in source file 1" + gdb_test "list main" "(5\[ \t\]+int x;.*8\[ \t\]+foo \[(\]+.*\[)\]+;|1\[ \t\]+#include .*7\[ \t\]+x = 0;)" "list function in source file 1" # Ultrix gdb takes the second case below; it's also correct. # SunPRO cc is the third case. @@ -335,14 +335,14 @@ proc test_list_backwards {} { send_gdb "list -\n" gdb_expect { - -re "8\[ \t\]+breakpoint\[(\]\[)\];.*17\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt } + -re "8\[ \t\]+foo \[(\]+.*\[)\]+;.*17\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt } -re ".*$gdb_prompt $" { fail "list 8-17" ; gdb_suppress_tests } timeout { fail "list 8-17 (timeout)" ; gdb_suppress_tests } } send_gdb "list -\n" gdb_expect { - -re "1\[ \t\]+#include .*7\[ \t\]+set_debug_traps\[(\]\[)\]+;\r\n$gdb_prompt $" { incr testcnt } + -re "1\[ \t\]+#include .*7\[ \t\]+x = 0;\r\n$gdb_prompt $" { incr testcnt } -re ".*$gdb_prompt $" { fail "list 1-7" ; gdb_suppress_tests } timeout { fail "list 1-7 (timeout)" ; gdb_suppress_tests } } @@ -387,7 +387,7 @@ proc test_list_filename_and_function {} { # SunPRO cc is the second case below, it's also correct. send_gdb "list list0.c:main\n" gdb_expect { - -re "1\[ \t\]+#include .*10\[ \t\]+x = 0;\r\n$gdb_prompt $" { + -re "1\[ \t\]+#include .*10\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt } -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { @@ -524,10 +524,6 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} -if [target_info exists gdb_stub] { - gdb_step_for_stub; -} - gdb_test_no_output "set width 0" test_listsize diff --git a/gdb/testsuite/gdb.base/list0.c b/gdb/testsuite/gdb.base/list0.c index b50fdd4..85fc6b5 100644 --- a/gdb/testsuite/gdb.base/list0.c +++ b/gdb/testsuite/gdb.base/list0.c @@ -3,10 +3,7 @@ int main () { int x; -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif + x = 0; foo (x++); foo (x++); @@ -33,6 +30,9 @@ int main () foo (x++); foo (x++); foo (x++); + foo (x++); + foo (x++); + foo (x++); return 0; } diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index befcdba..2fc40f7 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -52,8 +52,6 @@ if $tracelevel then { strace $tracelevel } -global usestubs - set testfile "break" set srcfile ${testfile}.c set srcfile1 ${testfile}1.c diff --git a/gdb/testsuite/gdb.base/mips_pro.c b/gdb/testsuite/gdb.base/mips_pro.c index b659d82..c28f99e 100644 --- a/gdb/testsuite/gdb.base/mips_pro.c +++ b/gdb/testsuite/gdb.base/mips_pro.c @@ -49,9 +49,5 @@ main (argc, argv) char **argv; #endif { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif return top (-1) + top (1); } diff --git a/gdb/testsuite/gdb.base/miscexprs.c b/gdb/testsuite/gdb.base/miscexprs.c index fe88fb2..a9930c1 100644 --- a/gdb/testsuite/gdb.base/miscexprs.c +++ b/gdb/testsuite/gdb.base/miscexprs.c @@ -39,11 +39,6 @@ main () sbig.s[90] = 255; lbig.l[333] = 999999999; -#ifdef usestubs - set_debug_traps (); - breakpoint (); -#endif - marker1 (); return 0; } diff --git a/gdb/testsuite/gdb.base/nodebug.c b/gdb/testsuite/gdb.base/nodebug.c index 3e0a4ce..4857882 100644 --- a/gdb/testsuite/gdb.base/nodebug.c +++ b/gdb/testsuite/gdb.base/nodebug.c @@ -52,10 +52,6 @@ main (argc, argv) char **argv; #endif { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif return top (argc); } diff --git a/gdb/testsuite/gdb.base/opaque0.c b/gdb/testsuite/gdb.base/opaque0.c index 5ec4a2a..bf90eca 100644 --- a/gdb/testsuite/gdb.base/opaque0.c +++ b/gdb/testsuite/gdb.base/opaque0.c @@ -13,10 +13,6 @@ extern void putfoo (struct foo *foop); int main () { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif foop = getfoo (); putfoo (foop); return 0; diff --git a/gdb/testsuite/gdb.base/pending.exp b/gdb/testsuite/gdb.base/pending.exp index d711e63..62297ce 100644 --- a/gdb/testsuite/gdb.base/pending.exp +++ b/gdb/testsuite/gdb.base/pending.exp @@ -85,9 +85,6 @@ gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} gdb_load_shlibs $lib_sl -if [target_info exists gdb_stub] { - gdb_step_for_stub; -} # # Test setting, querying, and modifying pending breakpoints # diff --git a/gdb/testsuite/gdb.base/pointers.c b/gdb/testsuite/gdb.base/pointers.c index 4ee5e78..96f2b52 100644 --- a/gdb/testsuite/gdb.base/pointers.c +++ b/gdb/testsuite/gdb.base/pointers.c @@ -91,10 +91,6 @@ int main () void dummy(); int more_code(); -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif dummy(); more_code (); diff --git a/gdb/testsuite/gdb.base/printcmds.c b/gdb/testsuite/gdb.base/printcmds.c index b3841ae..d37dfbd 100644 --- a/gdb/testsuite/gdb.base/printcmds.c +++ b/gdb/testsuite/gdb.base/printcmds.c @@ -122,10 +122,6 @@ struct some_struct int main () { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif malloc(1); /* Prevent AIX linker from removing variables. */ diff --git a/gdb/testsuite/gdb.base/ptype.c b/gdb/testsuite/gdb.base/ptype.c index b154ab4..4148da7 100644 --- a/gdb/testsuite/gdb.base/ptype.c +++ b/gdb/testsuite/gdb.base/ptype.c @@ -290,10 +290,6 @@ int main () sure it is linked in to this program. */ v_char_pointer = (char *) malloc (1); -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif /* Some linkers (e.g. on AIX) remove unreferenced variables, so make sure to reference them. */ primary = blue; diff --git a/gdb/testsuite/gdb.base/recurse.c b/gdb/testsuite/gdb.base/recurse.c index 7981778..cb7b022 100644 --- a/gdb/testsuite/gdb.base/recurse.c +++ b/gdb/testsuite/gdb.base/recurse.c @@ -22,10 +22,6 @@ recurse (a) int main() { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif recurse (10); return 0; } diff --git a/gdb/testsuite/gdb.base/reread1.c b/gdb/testsuite/gdb.base/reread1.c index ae98010..5d1166a 100644 --- a/gdb/testsuite/gdb.base/reread1.c +++ b/gdb/testsuite/gdb.base/reread1.c @@ -16,10 +16,6 @@ void foo() int main() { -#ifdef usestubs - set_debug_traps (); - breakpoint (); -#endif foo(); bar(); return 0; diff --git a/gdb/testsuite/gdb.base/reread2.c b/gdb/testsuite/gdb.base/reread2.c index fd9f7b7..181616c 100644 --- a/gdb/testsuite/gdb.base/reread2.c +++ b/gdb/testsuite/gdb.base/reread2.c @@ -12,10 +12,6 @@ void foo() int main() { -#ifdef usestubs - set_debug_traps (); - breakpoint (); -#endif foo(); return 0; } diff --git a/gdb/testsuite/gdb.base/restore.c b/gdb/testsuite/gdb.base/restore.c index 5160836..c9f246c 100644 --- a/gdb/testsuite/gdb.base/restore.c +++ b/gdb/testsuite/gdb.base/restore.c @@ -269,10 +269,6 @@ driver (void) int main () { register int local; -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif driver (); printf("exiting\n"); return 0; diff --git a/gdb/testsuite/gdb.base/return.c b/gdb/testsuite/gdb.base/return.c index d11a4b5..04b48d2 100644 --- a/gdb/testsuite/gdb.base/return.c +++ b/gdb/testsuite/gdb.base/return.c @@ -23,10 +23,6 @@ double tmp3; int main () { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif func1 (); printf("in main after func1\n"); tmp2 = func2 (); diff --git a/gdb/testsuite/gdb.base/run.c b/gdb/testsuite/gdb.base/run.c index 25b8a4a..c1c3a1b 100644 --- a/gdb/testsuite/gdb.base/run.c +++ b/gdb/testsuite/gdb.base/run.c @@ -49,10 +49,6 @@ int argc; char *argv[], **envp; #endif { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif #ifdef FAKEARGV printf ("%d\n", factorial (1)); #else diff --git a/gdb/testsuite/gdb.base/scope0.c b/gdb/testsuite/gdb.base/scope0.c index 180a431..775f8dc 100644 --- a/gdb/testsuite/gdb.base/scope0.c +++ b/gdb/testsuite/gdb.base/scope0.c @@ -20,10 +20,6 @@ void marker4 (); int main () { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif init0 (); foo (); autovars (5, 6); diff --git a/gdb/testsuite/gdb.base/sect-cmd.exp b/gdb/testsuite/gdb.base/sect-cmd.exp index 5c51c1e..73590b1 100644 --- a/gdb/testsuite/gdb.base/sect-cmd.exp +++ b/gdb/testsuite/gdb.base/sect-cmd.exp @@ -18,8 +18,6 @@ if $tracelevel then { strace $tracelevel } -global usestubs - # # test running programs # diff --git a/gdb/testsuite/gdb.base/sepdebug.c b/gdb/testsuite/gdb.base/sepdebug.c index 83f6ba4..6d2bc96 100644 --- a/gdb/testsuite/gdb.base/sepdebug.c +++ b/gdb/testsuite/gdb.base/sepdebug.c @@ -84,10 +84,6 @@ int argc; char *argv[], **envp; #endif { -#ifdef usestubs - set_debug_traps(); /* set breakpoint 5 here */ - breakpoint(); -#endif if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */ fprintf (stderr, "usage: factorial <number>\n"); return 1; diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp index bb0b914..90fe4ec 100644 --- a/gdb/testsuite/gdb.base/sepdebug.exp +++ b/gdb/testsuite/gdb.base/sepdebug.exp @@ -64,9 +64,6 @@ if { $gdb_file_cmd_debug_info != "debug" } then { fail "No debug information found." } -if [target_info exists gdb_stub] { - gdb_step_for_stub; -} # # test simple breakpoint setting commands # @@ -144,14 +141,7 @@ gdb_test "break multi_line_while_conditional" \ set bp_location5 [gdb_get_line_number "set breakpoint 5 here"] set bp_location6 [gdb_get_line_number "set breakpoint 6 here"] -# -# check to see what breakpoints are set -# -if [target_info exists gdb_stub] { - set main_line $bp_location5 -} else { - set main_line $bp_location6 -} +set main_line $bp_location6 set bp_location7 [gdb_get_line_number "set breakpoint 7 here"] set bp_location8 [gdb_get_line_number "set breakpoint 8 here"] @@ -673,10 +663,6 @@ proc test_different_dir {type test_different_dir xfail} { "set separate debug location" gdb_load ${binfile} - if [target_info exists gdb_stub] { - gdb_step_for_stub; - } - # # test break at function # diff --git a/gdb/testsuite/gdb.base/setshow.c b/gdb/testsuite/gdb.base/setshow.c index fbaba0f..a30ef82 100644 --- a/gdb/testsuite/gdb.base/setshow.c +++ b/gdb/testsuite/gdb.base/setshow.c @@ -14,10 +14,6 @@ main(argc, argv) #endif { int i = 1; -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif if (argc <= 0 || argc > 8) return -1; diff --git a/gdb/testsuite/gdb.base/setvar.c b/gdb/testsuite/gdb.base/setvar.c index 969de0d..83509cd 100644 --- a/gdb/testsuite/gdb.base/setvar.c +++ b/gdb/testsuite/gdb.base/setvar.c @@ -10,10 +10,6 @@ main (argc, argv, envp) #endif { extern void dummy(); -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif dummy(); return 0; } diff --git a/gdb/testsuite/gdb.base/sigall.c b/gdb/testsuite/gdb.base/sigall.c index 28ae192..92ebc6b 100644 --- a/gdb/testsuite/gdb.base/sigall.c +++ b/gdb/testsuite/gdb.base/sigall.c @@ -1577,10 +1577,6 @@ return 0; int main () { -#ifdef usestubs - set_debug_traps (); - breakpoint (); -#endif #ifdef SIG_SETMASK /* Ensure all the signals aren't blocked. diff --git a/gdb/testsuite/gdb.base/signals.c b/gdb/testsuite/gdb.base/signals.c index f1ebcfc..d97719c 100644 --- a/gdb/testsuite/gdb.base/signals.c +++ b/gdb/testsuite/gdb.base/signals.c @@ -38,10 +38,6 @@ func2 () int main () { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif #ifdef SIGALRM signal (SIGALRM, handler); #endif diff --git a/gdb/testsuite/gdb.base/structs.c b/gdb/testsuite/gdb.base/structs.c index c26b86c..df4dfa9 100644 --- a/gdb/testsuite/gdb.base/structs.c +++ b/gdb/testsuite/gdb.base/structs.c @@ -401,10 +401,6 @@ static struct { char c; } chartest[256]; int main() { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif int i; for (i = 0; i < 256; i++) diff --git a/gdb/testsuite/gdb.base/structs2.c b/gdb/testsuite/gdb.base/structs2.c index f1eeab1..7c8be03 100644 --- a/gdb/testsuite/gdb.base/structs2.c +++ b/gdb/testsuite/gdb.base/structs2.c @@ -10,10 +10,6 @@ int bkpt; int main () { -#ifdef usestubs - set_debug_traps (); - breakpoint (); -#endif bkpt = 0; param_reg (120, 130, 32000, 33000); diff --git a/gdb/testsuite/gdb.base/testenv.c b/gdb/testsuite/gdb.base/testenv.c index 83f7e9c..2e29a85 100755 --- a/gdb/testsuite/gdb.base/testenv.c +++ b/gdb/testsuite/gdb.base/testenv.c @@ -27,10 +27,6 @@ int main (int argc, char **argv, char **envp) { int i, j; -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif j = 0; for (i = 0; envp[i]; i++) diff --git a/gdb/testsuite/gdb.base/twice.c b/gdb/testsuite/gdb.base/twice.c index 09eb2dd..a0182bb 100644 --- a/gdb/testsuite/gdb.base/twice.c +++ b/gdb/testsuite/gdb.base/twice.c @@ -11,10 +11,6 @@ int main () { int y ; -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif y = nothing () ; printf ("hello\n") ; return 0; diff --git a/gdb/testsuite/gdb.base/unload.exp b/gdb/testsuite/gdb.base/unload.exp index d33407b..0e6f6aa 100644 --- a/gdb/testsuite/gdb.base/unload.exp +++ b/gdb/testsuite/gdb.base/unload.exp @@ -69,10 +69,6 @@ gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} gdb_load_shlibs $lib_sl $lib_sl2 -if [target_info exists gdb_stub] { - gdb_step_for_stub; -} - # # Test setting a breakpoint in a dynamically loaded library which is # manually loaded and unloaded diff --git a/gdb/testsuite/gdb.base/unwindonsignal.c b/gdb/testsuite/gdb.base/unwindonsignal.c index 98ac811..b8d1ff2 100644 --- a/gdb/testsuite/gdb.base/unwindonsignal.c +++ b/gdb/testsuite/gdb.base/unwindonsignal.c @@ -42,10 +42,6 @@ stop_here () int main () { -#ifdef usestubs - set_debug_traps (); - breakpoint (); -#endif #ifdef SIG_SETMASK /* Ensure all the signals aren't blocked. diff --git a/gdb/testsuite/gdb.base/watchpoint-solib.exp b/gdb/testsuite/gdb.base/watchpoint-solib.exp index 3e014db..d3baa08 100644 --- a/gdb/testsuite/gdb.base/watchpoint-solib.exp +++ b/gdb/testsuite/gdb.base/watchpoint-solib.exp @@ -58,10 +58,6 @@ gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} gdb_load_shlibs $lib_sl -if [target_info exists gdb_stub] { - gdb_step_for_stub; -} - runto_main # Disable hardware watchpoints if necessary. diff --git a/gdb/testsuite/gdb.base/watchpoint.c b/gdb/testsuite/gdb.base/watchpoint.c index c4d8a69..50f0a83 100644 --- a/gdb/testsuite/gdb.base/watchpoint.c +++ b/gdb/testsuite/gdb.base/watchpoint.c @@ -167,10 +167,6 @@ func7 (void) int main () { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif struct1.val = 1; struct2.val = 2; ptr1 = &struct1; diff --git a/gdb/testsuite/gdb.base/watchpoints.c b/gdb/testsuite/gdb.base/watchpoints.c index 36972e8..0826fad 100644 --- a/gdb/testsuite/gdb.base/watchpoints.c +++ b/gdb/testsuite/gdb.base/watchpoints.c @@ -30,11 +30,6 @@ int ival4 = -1; int main () { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif - for (count = 0; count < 4; count++) { ival1 = count; ival2 = count; ival3 = count; ival4 = count; diff --git a/gdb/testsuite/gdb.base/whatis.c b/gdb/testsuite/gdb.base/whatis.c index 24ec080..c86f040a 100644 --- a/gdb/testsuite/gdb.base/whatis.c +++ b/gdb/testsuite/gdb.base/whatis.c @@ -248,10 +248,6 @@ enum cars {chevy, ford, porsche} clunker; int main () { -#ifdef usestubs - set_debug_traps(); - breakpoint(); -#endif /* Some linkers (e.g. on AIX) remove unreferenced variables, so make sure to reference them. */ v_char = 0; |