From 09050809a4d0bf939a31850595cda0e50750015b Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Thu, 6 Jan 2011 10:35:00 +0000 Subject: [PATCH] [testsuite/gdb.ada] simplify some testcases by using clean_restart. gdb/testsuite/ChangeLog: * gdb.ada/array_bounds.exp, gdb.ada/array_return.exp, gdb.ada/array_subscript_addr.exp, gdb.ada/arrayidx.exp, gdb.ada/arrayparam.exp, gdb.ada/arrayptr.exp, gdb.ada/atomic_enum.exp, gdb.ada/call_pn.exp, gdb.ada/catch_ex.exp, gdb.ada/char_param.exp, gdb.ada/complete.exp, gdb.ada/exprs.exp, gdb.ada/fixed_cmp.exp, gdb.ada/fixed_points.exp, gdb.ada/formatted_ref.exp, gdb.ada/frame_args.exp, gdb.ada/fun_addr.exp, gdb.ada/fun_in_declare.exp, gdb.ada/funcall_param.exp, gdb.ada/homonym.exp, gdb.ada/int_deref.exp, gdb.ada/interface.exp, gdb.ada/lang_switch.exp, gdb.ada/mod_from_name.exp, gdb.ada/nested.exp, gdb.ada/null_array.exp, gdb.ada/null_record.exp, gdb.ada/packed_array.exp, gdb.ada/packed_tagged.exp, gdb.ada/print_chars.exp, gdb.ada/print_pc.exp, gdb.ada/ptype_field.exp, gdb.ada/ptype_tagged_param.exp, gdb.ada/rec_return.exp, gdb.ada/ref_param.exp, gdb.ada/ref_tick_size.exp, gdb.ada/start.exp, gdb.ada/str_ref_cmp.exp, gdb.ada/sym_print_name.exp, gdb.ada/taft_type.exp, gdb.ada/tagged.exp, gdb.ada/tasks.exp, gdb.ada/tick_last_segv.exp, gdb.ada/type_coercion.exp, gdb.ada/uninitialized_vars.exp, gdb.ada/variant_record_packed_array.exp, gdb.ada/watch_arg.exp: Simplify by using clean_restart. --- gdb/testsuite/ChangeLog | 27 +++++++++++++++++++ gdb/testsuite/gdb.ada/array_bounds.exp | 5 +--- gdb/testsuite/gdb.ada/array_return.exp | 5 +--- .../gdb.ada/array_subscript_addr.exp | 5 +--- gdb/testsuite/gdb.ada/arrayidx.exp | 5 +--- gdb/testsuite/gdb.ada/arrayparam.exp | 5 +--- gdb/testsuite/gdb.ada/arrayptr.exp | 5 +--- gdb/testsuite/gdb.ada/atomic_enum.exp | 5 +--- gdb/testsuite/gdb.ada/call_pn.exp | 5 +--- gdb/testsuite/gdb.ada/catch_ex.exp | 5 +--- gdb/testsuite/gdb.ada/char_param.exp | 5 +--- gdb/testsuite/gdb.ada/complete.exp | 5 +--- gdb/testsuite/gdb.ada/exprs.exp | 5 +--- gdb/testsuite/gdb.ada/fixed_cmp.exp | 5 +--- gdb/testsuite/gdb.ada/fixed_points.exp | 5 +--- gdb/testsuite/gdb.ada/formatted_ref.exp | 5 +--- gdb/testsuite/gdb.ada/frame_args.exp | 5 +--- gdb/testsuite/gdb.ada/fun_addr.exp | 5 +--- gdb/testsuite/gdb.ada/fun_in_declare.exp | 5 +--- gdb/testsuite/gdb.ada/funcall_param.exp | 5 +--- gdb/testsuite/gdb.ada/homonym.exp | 5 +--- gdb/testsuite/gdb.ada/int_deref.exp | 5 +--- gdb/testsuite/gdb.ada/interface.exp | 5 +--- gdb/testsuite/gdb.ada/lang_switch.exp | 5 +--- gdb/testsuite/gdb.ada/mod_from_name.exp | 5 +--- gdb/testsuite/gdb.ada/nested.exp | 5 +--- gdb/testsuite/gdb.ada/null_array.exp | 5 +--- gdb/testsuite/gdb.ada/null_record.exp | 5 +--- gdb/testsuite/gdb.ada/packed_array.exp | 5 +--- gdb/testsuite/gdb.ada/packed_tagged.exp | 5 +--- gdb/testsuite/gdb.ada/print_chars.exp | 5 +--- gdb/testsuite/gdb.ada/print_pc.exp | 5 +--- gdb/testsuite/gdb.ada/ptype_field.exp | 5 +--- gdb/testsuite/gdb.ada/ptype_tagged_param.exp | 5 +--- gdb/testsuite/gdb.ada/rec_return.exp | 5 +--- gdb/testsuite/gdb.ada/ref_param.exp | 5 +--- gdb/testsuite/gdb.ada/ref_tick_size.exp | 5 +--- gdb/testsuite/gdb.ada/start.exp | 5 +--- gdb/testsuite/gdb.ada/str_ref_cmp.exp | 5 +--- gdb/testsuite/gdb.ada/sym_print_name.exp | 5 +--- gdb/testsuite/gdb.ada/taft_type.exp | 5 +--- gdb/testsuite/gdb.ada/tagged.exp | 5 +--- gdb/testsuite/gdb.ada/tasks.exp | 5 +--- gdb/testsuite/gdb.ada/tick_last_segv.exp | 5 +--- gdb/testsuite/gdb.ada/type_coercion.exp | 5 +--- gdb/testsuite/gdb.ada/uninitialized_vars.exp | 5 +--- .../gdb.ada/variant_record_packed_array.exp | 5 +--- gdb/testsuite/gdb.ada/watch_arg.exp | 5 +--- 48 files changed, 74 insertions(+), 188 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 7240089231..3675e27dfe 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,30 @@ +2011-01-06 Joel Brobecker + + * gdb.ada/array_bounds.exp, gdb.ada/array_return.exp, + gdb.ada/array_subscript_addr.exp, gdb.ada/arrayidx.exp, + gdb.ada/arrayparam.exp, gdb.ada/arrayptr.exp, + gdb.ada/atomic_enum.exp, gdb.ada/call_pn.exp, + gdb.ada/catch_ex.exp, gdb.ada/char_param.exp, + gdb.ada/complete.exp, gdb.ada/exprs.exp, gdb.ada/fixed_cmp.exp, + gdb.ada/fixed_points.exp, gdb.ada/formatted_ref.exp, + gdb.ada/frame_args.exp, gdb.ada/fun_addr.exp, + gdb.ada/fun_in_declare.exp, gdb.ada/funcall_param.exp, + gdb.ada/homonym.exp, gdb.ada/int_deref.exp, + gdb.ada/interface.exp, gdb.ada/lang_switch.exp, + gdb.ada/mod_from_name.exp, gdb.ada/nested.exp, + gdb.ada/null_array.exp, gdb.ada/null_record.exp, + gdb.ada/packed_array.exp, gdb.ada/packed_tagged.exp, + gdb.ada/print_chars.exp, gdb.ada/print_pc.exp, + gdb.ada/ptype_field.exp, gdb.ada/ptype_tagged_param.exp, + gdb.ada/rec_return.exp, gdb.ada/ref_param.exp, + gdb.ada/ref_tick_size.exp, gdb.ada/start.exp, + gdb.ada/str_ref_cmp.exp, gdb.ada/sym_print_name.exp, + gdb.ada/taft_type.exp, gdb.ada/tagged.exp, gdb.ada/tasks.exp, + gdb.ada/tick_last_segv.exp, gdb.ada/type_coercion.exp, + gdb.ada/uninitialized_vars.exp, + gdb.ada/variant_record_packed_array.exp, gdb.ada/watch_arg.exp: + Simplify by using clean_restart. + 2011-01-06 Joel Brobecker Add marker to be used as anchor for inserting breakpoints. diff --git a/gdb/testsuite/gdb.ada/array_bounds.exp b/gdb/testsuite/gdb.ada/array_bounds.exp index b25d6ea805..cc63c4205f 100644 --- a/gdb/testsuite/gdb.ada/array_bounds.exp +++ b/gdb/testsuite/gdb.ada/array_bounds.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/bar.adb] if ![runto "bar.adb:$bp_location" ] then { diff --git a/gdb/testsuite/gdb.ada/array_return.exp b/gdb/testsuite/gdb.ada/array_return.exp index cad2d34b4b..9b5b44850e 100644 --- a/gdb/testsuite/gdb.ada/array_return.exp +++ b/gdb/testsuite/gdb.ada/array_return.exp @@ -32,10 +32,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} { return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} # Start the inferior diff --git a/gdb/testsuite/gdb.ada/array_subscript_addr.exp b/gdb/testsuite/gdb.ada/array_subscript_addr.exp index e6da83cccf..d4c13daaa9 100644 --- a/gdb/testsuite/gdb.ada/array_subscript_addr.exp +++ b/gdb/testsuite/gdb.ada/array_subscript_addr.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/p.adb] runto "p.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/arrayidx.exp b/gdb/testsuite/gdb.ada/arrayidx.exp index 350f19e287..9d271946cd 100644 --- a/gdb/testsuite/gdb.ada/arrayidx.exp +++ b/gdb/testsuite/gdb.ada/arrayidx.exp @@ -31,10 +31,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} { return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/p.adb] runto "p.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/arrayparam.exp b/gdb/testsuite/gdb.ada/arrayparam.exp index 1db6d6ab08..a861916080 100644 --- a/gdb/testsuite/gdb.ada/arrayparam.exp +++ b/gdb/testsuite/gdb.ada/arrayparam.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/arrayptr.exp b/gdb/testsuite/gdb.ada/arrayptr.exp index 42759da22e..85d920da91 100644 --- a/gdb/testsuite/gdb.ada/arrayptr.exp +++ b/gdb/testsuite/gdb.ada/arrayptr.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] if ![runto "foo.adb:$bp_location" ] then { diff --git a/gdb/testsuite/gdb.ada/atomic_enum.exp b/gdb/testsuite/gdb.ada/atomic_enum.exp index bd30711e6e..e6a7cca326 100644 --- a/gdb/testsuite/gdb.ada/atomic_enum.exp +++ b/gdb/testsuite/gdb.ada/atomic_enum.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set test "ptype pck.data_flag" gdb_test_multiple "$test" $test { diff --git a/gdb/testsuite/gdb.ada/call_pn.exp b/gdb/testsuite/gdb.ada/call_pn.exp index b20fb1247b..6e256043f4 100644 --- a/gdb/testsuite/gdb.ada/call_pn.exp +++ b/gdb/testsuite/gdb.ada/call_pn.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] if ![runto "foo.adb:$bp_location" ] then { diff --git a/gdb/testsuite/gdb.ada/catch_ex.exp b/gdb/testsuite/gdb.ada/catch_ex.exp index e3e89c8f82..b0a4000e1a 100644 --- a/gdb/testsuite/gdb.ada/catch_ex.exp +++ b/gdb/testsuite/gdb.ada/catch_ex.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} # Some global variables used to simplify the maintenance of some of # the regular expressions below. diff --git a/gdb/testsuite/gdb.ada/char_param.exp b/gdb/testsuite/gdb.ada/char_param.exp index 017a549aff..0f9b07fc22 100644 --- a/gdb/testsuite/gdb.ada/char_param.exp +++ b/gdb/testsuite/gdb.ada/char_param.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/complete.exp b/gdb/testsuite/gdb.ada/complete.exp index 2a135b8f35..19d2e90c05 100644 --- a/gdb/testsuite/gdb.ada/complete.exp +++ b/gdb/testsuite/gdb.ada/complete.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb] runto "foo.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/exprs.exp b/gdb/testsuite/gdb.ada/exprs.exp index ecb574e026..68f5107726 100644 --- a/gdb/testsuite/gdb.ada/exprs.exp +++ b/gdb/testsuite/gdb.ada/exprs.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/p.adb] runto "p.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/fixed_cmp.exp b/gdb/testsuite/gdb.ada/fixed_cmp.exp index 10b324093f..2b724f6ccd 100644 --- a/gdb/testsuite/gdb.ada/fixed_cmp.exp +++ b/gdb/testsuite/gdb.ada/fixed_cmp.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/fixed.adb] runto "fixed.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/fixed_points.exp b/gdb/testsuite/gdb.ada/fixed_points.exp index bd83642070..152c2f4a6c 100644 --- a/gdb/testsuite/gdb.ada/fixed_points.exp +++ b/gdb/testsuite/gdb.ada/fixed_points.exp @@ -31,10 +31,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} { return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "Set breakpoint here" ${testdir}/fixed_points.adb] runto "fixed_points.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/formatted_ref.exp b/gdb/testsuite/gdb.ada/formatted_ref.exp index 80a74ae856..8c284e67c1 100644 --- a/gdb/testsuite/gdb.ada/formatted_ref.exp +++ b/gdb/testsuite/gdb.ada/formatted_ref.exp @@ -93,10 +93,7 @@ proc test_p_op1_equals_op2 {op1 op2} { gdb_test $test "\\$\[0-9\]+ = true" } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} runto defs.adb:[gdb_get_line_number "marker here" ${testdir}/defs.adb ] diff --git a/gdb/testsuite/gdb.ada/frame_args.exp b/gdb/testsuite/gdb.ada/frame_args.exp index fc0c66d1e2..626d152890 100644 --- a/gdb/testsuite/gdb.ada/frame_args.exp +++ b/gdb/testsuite/gdb.ada/frame_args.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set any_nb "\[0-9\]+" set any_addr "0x\[0-9a-zA-Z\]+" diff --git a/gdb/testsuite/gdb.ada/fun_addr.exp b/gdb/testsuite/gdb.ada/fun_addr.exp index a8e23da08d..6f962f27c4 100644 --- a/gdb/testsuite/gdb.ada/fun_addr.exp +++ b/gdb/testsuite/gdb.ada/fun_addr.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} # Verify that we are able to print the address of a function when # the inferior is *not* running (no frame). diff --git a/gdb/testsuite/gdb.ada/fun_in_declare.exp b/gdb/testsuite/gdb.ada/fun_in_declare.exp index 7d82093932..fe33940616 100644 --- a/gdb/testsuite/gdb.ada/fun_in_declare.exp +++ b/gdb/testsuite/gdb.ada/fun_in_declare.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} if ![runto main] then { perror "Couldn't run ${testfile}" diff --git a/gdb/testsuite/gdb.ada/funcall_param.exp b/gdb/testsuite/gdb.ada/funcall_param.exp index 947e1eccb2..c8b246108a 100644 --- a/gdb/testsuite/gdb.ada/funcall_param.exp +++ b/gdb/testsuite/gdb.ada/funcall_param.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/homonym.exp b/gdb/testsuite/gdb.ada/homonym.exp index f0b8a86d04..b5dff1b77a 100644 --- a/gdb/testsuite/gdb.ada/homonym.exp +++ b/gdb/testsuite/gdb.ada/homonym.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "BREAK_1" ${testdir}/homonym.adb] runto "homonym.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/int_deref.exp b/gdb/testsuite/gdb.ada/int_deref.exp index 814940ffb3..368a4f5ccf 100644 --- a/gdb/testsuite/gdb.ada/int_deref.exp +++ b/gdb/testsuite/gdb.ada/int_deref.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "Pck.Watch" ${testdir}/foo.adb] runto "foo.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/interface.exp b/gdb/testsuite/gdb.ada/interface.exp index 86fb847d99..11f58504bb 100644 --- a/gdb/testsuite/gdb.ada/interface.exp +++ b/gdb/testsuite/gdb.ada/interface.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/lang_switch.exp b/gdb/testsuite/gdb.ada/lang_switch.exp index acdda154fe..51eb086eb5 100644 --- a/gdb/testsuite/gdb.ada/lang_switch.exp +++ b/gdb/testsuite/gdb.ada/lang_switch.exp @@ -33,10 +33,7 @@ if {[gdb_compile_ada "${adasrcfile}" "${binfile}" executable [list debug]] != "" return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.c] runto "foo.c:$bp_location" diff --git a/gdb/testsuite/gdb.ada/mod_from_name.exp b/gdb/testsuite/gdb.ada/mod_from_name.exp index ded0ea1269..a68d9ee3a6 100644 --- a/gdb/testsuite/gdb.ada/mod_from_name.exp +++ b/gdb/testsuite/gdb.ada/mod_from_name.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb] if ![runto "foo.adb:$bp_location" ] then { diff --git a/gdb/testsuite/gdb.ada/nested.exp b/gdb/testsuite/gdb.ada/nested.exp index 8c70fa0eeb..aa182cf166 100644 --- a/gdb/testsuite/gdb.ada/nested.exp +++ b/gdb/testsuite/gdb.ada/nested.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set any_nb "\[0-9\]+" set any_addr "0x\[0-9a-zA-Z\]+" diff --git a/gdb/testsuite/gdb.ada/null_array.exp b/gdb/testsuite/gdb.ada/null_array.exp index 41cefb68dc..9ede3f851b 100644 --- a/gdb/testsuite/gdb.ada/null_array.exp +++ b/gdb/testsuite/gdb.ada/null_array.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb] runto "foo.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/null_record.exp b/gdb/testsuite/gdb.ada/null_record.exp index 6ed8585cf0..ef02765eed 100644 --- a/gdb/testsuite/gdb.ada/null_record.exp +++ b/gdb/testsuite/gdb.ada/null_record.exp @@ -31,10 +31,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} { return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/null_record.adb] runto "null_record.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/packed_array.exp b/gdb/testsuite/gdb.ada/packed_array.exp index 4a56e38ddf..1789aab1d8 100644 --- a/gdb/testsuite/gdb.ada/packed_array.exp +++ b/gdb/testsuite/gdb.ada/packed_array.exp @@ -31,10 +31,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} { return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/pa.adb] runto "pa.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/packed_tagged.exp b/gdb/testsuite/gdb.ada/packed_tagged.exp index fcf32d4ed5..dc68d2d2dd 100644 --- a/gdb/testsuite/gdb.ada/packed_tagged.exp +++ b/gdb/testsuite/gdb.ada/packed_tagged.exp @@ -40,10 +40,7 @@ proc multi_line { args } { return [join $args "\[\r\n\]*"] } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/comp_bug.adb] runto "comp_bug.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/print_chars.exp b/gdb/testsuite/gdb.ada/print_chars.exp index 2ed9619613..1576bfde52 100644 --- a/gdb/testsuite/gdb.ada/print_chars.exp +++ b/gdb/testsuite/gdb.ada/print_chars.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb] runto "foo.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/print_pc.exp b/gdb/testsuite/gdb.ada/print_pc.exp index a7a098c605..6d6911659c 100644 --- a/gdb/testsuite/gdb.ada/print_pc.exp +++ b/gdb/testsuite/gdb.ada/print_pc.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/dummy.adb] runto "dummy.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/ptype_field.exp b/gdb/testsuite/gdb.ada/ptype_field.exp index 9b04b5f2aa..456fa4c9f9 100644 --- a/gdb/testsuite/gdb.ada/ptype_field.exp +++ b/gdb/testsuite/gdb.ada/ptype_field.exp @@ -40,10 +40,7 @@ proc multi_line { args } { return [join $args "\[\r\n\]*"] } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp index e85d528d96..2ac2acdca5 100644 --- a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp +++ b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} if ![runto "position_x" ] then { return -1 diff --git a/gdb/testsuite/gdb.ada/rec_return.exp b/gdb/testsuite/gdb.ada/rec_return.exp index bbf59e20e8..f0a24b2cbe 100644 --- a/gdb/testsuite/gdb.ada/rec_return.exp +++ b/gdb/testsuite/gdb.ada/rec_return.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] if ![runto "foo.adb:$bp_location" ] then { diff --git a/gdb/testsuite/gdb.ada/ref_param.exp b/gdb/testsuite/gdb.ada/ref_param.exp index 125e7ec854..aeb4e8787d 100644 --- a/gdb/testsuite/gdb.ada/ref_param.exp +++ b/gdb/testsuite/gdb.ada/ref_param.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} if ![runto call_me] then { perror "Couldn't run ${testfile}" diff --git a/gdb/testsuite/gdb.ada/ref_tick_size.exp b/gdb/testsuite/gdb.ada/ref_tick_size.exp index e121bdc196..e79d46d837 100644 --- a/gdb/testsuite/gdb.ada/ref_tick_size.exp +++ b/gdb/testsuite/gdb.ada/ref_tick_size.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/p.adb] runto "p.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/start.exp b/gdb/testsuite/gdb.ada/start.exp index 2c000a8fcc..e14ecdeb91 100644 --- a/gdb/testsuite/gdb.ada/start.exp +++ b/gdb/testsuite/gdb.ada/start.exp @@ -38,10 +38,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} { return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} # Verify that "start" lands inside the right procedure. if { [gdb_start_cmd] < 0 } { diff --git a/gdb/testsuite/gdb.ada/str_ref_cmp.exp b/gdb/testsuite/gdb.ada/str_ref_cmp.exp index af170e2ba4..70acf83f6e 100644 --- a/gdb/testsuite/gdb.ada/str_ref_cmp.exp +++ b/gdb/testsuite/gdb.ada/str_ref_cmp.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb] runto "foo.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/sym_print_name.exp b/gdb/testsuite/gdb.ada/sym_print_name.exp index 6f51e1207e..acca51c8f4 100644 --- a/gdb/testsuite/gdb.ada/sym_print_name.exp +++ b/gdb/testsuite/gdb.ada/sym_print_name.exp @@ -40,10 +40,7 @@ proc multi_line { args } { return [join $args "\[\r\n\]*"] } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/taft_type.exp b/gdb/testsuite/gdb.ada/taft_type.exp index c872aca825..0e3036e1fa 100644 --- a/gdb/testsuite/gdb.ada/taft_type.exp +++ b/gdb/testsuite/gdb.ada/taft_type.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/p.adb] if ![runto "p.adb:$bp_location" ] then { diff --git a/gdb/testsuite/gdb.ada/tagged.exp b/gdb/testsuite/gdb.ada/tagged.exp index dce717d9af..a5c1aabd24 100644 --- a/gdb/testsuite/gdb.ada/tagged.exp +++ b/gdb/testsuite/gdb.ada/tagged.exp @@ -40,10 +40,7 @@ proc multi_line { args } { return [join $args "\[\r\n\]*"] } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb] runto "foo.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/tasks.exp b/gdb/testsuite/gdb.ada/tasks.exp index 1cf39151bf..bced9f8df6 100644 --- a/gdb/testsuite/gdb.ada/tasks.exp +++ b/gdb/testsuite/gdb.ada/tasks.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP_HERE" ${testdir}/foo.adb] runto "foo.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/tick_last_segv.exp b/gdb/testsuite/gdb.ada/tick_last_segv.exp index 86af0d582b..a5ef9e03e7 100644 --- a/gdb/testsuite/gdb.ada/tick_last_segv.exp +++ b/gdb/testsuite/gdb.ada/tick_last_segv.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} # Make sure that evaluating the 'First and 'Last attributes on # a "primitive type" (a predefined type for which GDB also creates diff --git a/gdb/testsuite/gdb.ada/type_coercion.exp b/gdb/testsuite/gdb.ada/type_coercion.exp index 02f19a3cfb..94efa959fd 100644 --- a/gdb/testsuite/gdb.ada/type_coercion.exp +++ b/gdb/testsuite/gdb.ada/type_coercion.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/assign.adb] runto "assign.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/uninitialized_vars.exp b/gdb/testsuite/gdb.ada/uninitialized_vars.exp index b6ec6fa585..39b88a2080 100644 --- a/gdb/testsuite/gdb.ada/uninitialized_vars.exp +++ b/gdb/testsuite/gdb.ada/uninitialized_vars.exp @@ -32,10 +32,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} # Start the program; we should land in the program main procedure, before # variable initialization. diff --git a/gdb/testsuite/gdb.ada/variant_record_packed_array.exp b/gdb/testsuite/gdb.ada/variant_record_packed_array.exp index b7762f2a95..fbc5828f4e 100644 --- a/gdb/testsuite/gdb.ada/variant_record_packed_array.exp +++ b/gdb/testsuite/gdb.ada/variant_record_packed_array.exp @@ -29,10 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb] runto "foo.adb:$bp_location" diff --git a/gdb/testsuite/gdb.ada/watch_arg.exp b/gdb/testsuite/gdb.ada/watch_arg.exp index fc73678fab..dd1be99d63 100644 --- a/gdb/testsuite/gdb.ada/watch_arg.exp +++ b/gdb/testsuite/gdb.ada/watch_arg.exp @@ -31,10 +31,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} { return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart ${testfile} set bp_location [gdb_get_line_number "BREAK1" ${testdir}/watch.adb] runto "watch.adb:$bp_location"