[testsuite/gdb.ada] simplify some testcases by using clean_restart.
authorJoel Brobecker <brobecker@gnat.com>
Thu, 6 Jan 2011 10:35:00 +0000 (10:35 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Thu, 6 Jan 2011 10:35:00 +0000 (10:35 +0000)
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.

48 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/array_bounds.exp
gdb/testsuite/gdb.ada/array_return.exp
gdb/testsuite/gdb.ada/array_subscript_addr.exp
gdb/testsuite/gdb.ada/arrayidx.exp
gdb/testsuite/gdb.ada/arrayparam.exp
gdb/testsuite/gdb.ada/arrayptr.exp
gdb/testsuite/gdb.ada/atomic_enum.exp
gdb/testsuite/gdb.ada/call_pn.exp
gdb/testsuite/gdb.ada/catch_ex.exp
gdb/testsuite/gdb.ada/char_param.exp
gdb/testsuite/gdb.ada/complete.exp
gdb/testsuite/gdb.ada/exprs.exp
gdb/testsuite/gdb.ada/fixed_cmp.exp
gdb/testsuite/gdb.ada/fixed_points.exp
gdb/testsuite/gdb.ada/formatted_ref.exp
gdb/testsuite/gdb.ada/frame_args.exp
gdb/testsuite/gdb.ada/fun_addr.exp
gdb/testsuite/gdb.ada/fun_in_declare.exp
gdb/testsuite/gdb.ada/funcall_param.exp
gdb/testsuite/gdb.ada/homonym.exp
gdb/testsuite/gdb.ada/int_deref.exp
gdb/testsuite/gdb.ada/interface.exp
gdb/testsuite/gdb.ada/lang_switch.exp
gdb/testsuite/gdb.ada/mod_from_name.exp
gdb/testsuite/gdb.ada/nested.exp
gdb/testsuite/gdb.ada/null_array.exp
gdb/testsuite/gdb.ada/null_record.exp
gdb/testsuite/gdb.ada/packed_array.exp
gdb/testsuite/gdb.ada/packed_tagged.exp
gdb/testsuite/gdb.ada/print_chars.exp
gdb/testsuite/gdb.ada/print_pc.exp
gdb/testsuite/gdb.ada/ptype_field.exp
gdb/testsuite/gdb.ada/ptype_tagged_param.exp
gdb/testsuite/gdb.ada/rec_return.exp
gdb/testsuite/gdb.ada/ref_param.exp
gdb/testsuite/gdb.ada/ref_tick_size.exp
gdb/testsuite/gdb.ada/start.exp
gdb/testsuite/gdb.ada/str_ref_cmp.exp
gdb/testsuite/gdb.ada/sym_print_name.exp
gdb/testsuite/gdb.ada/taft_type.exp
gdb/testsuite/gdb.ada/tagged.exp
gdb/testsuite/gdb.ada/tasks.exp
gdb/testsuite/gdb.ada/tick_last_segv.exp
gdb/testsuite/gdb.ada/type_coercion.exp
gdb/testsuite/gdb.ada/uninitialized_vars.exp
gdb/testsuite/gdb.ada/variant_record_packed_array.exp
gdb/testsuite/gdb.ada/watch_arg.exp

index 7240089..3675e27 100644 (file)
@@ -1,5 +1,32 @@
 2011-01-06  Joel Brobecker  <brobecker@adacore.com>
 
+        * 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  <brobecker@adacore.com>
+
        Add marker to be used as anchor for inserting breakpoints.
        * gdb.ada/null_record/null_record.adb: Add "-- START" comment.
        * gdb.ada/start/dummy.adb, gdb.ada/uninitialized_vars/parse.adb:
index b25d6ea..cc63c42 100644 (file)
@@ -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 {
index cad2d34..9b5b448 100644 (file)
@@ -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
 
index e6da83c..d4c13da 100644 (file)
@@ -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"
index 350f19e..9d27194 100644 (file)
@@ -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"
index 1db6d6a..a861916 100644 (file)
@@ -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"
index 42759da..85d920d 100644 (file)
@@ -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 {
index bd30711..e6a7cca 100644 (file)
@@ -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 {
index b20fb12..6e25604 100644 (file)
@@ -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 {
index e3e89c8..b0a4000 100644 (file)
@@ -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.
index 017a549..0f9b07f 100644 (file)
@@ -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"
index 2a135b8..19d2e90 100644 (file)
@@ -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"
index ecb574e..68f5107 100644 (file)
@@ -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"
index 10b3240..2b724f6 100644 (file)
@@ -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"
index bd83642..152c2f4 100644 (file)
@@ -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"
index 80a74ae..8c284e6 100644 (file)
@@ -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 ]
 
index fc0c66d..626d152 100644 (file)
@@ -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\]+"
index a8e23da..6f962f2 100644 (file)
@@ -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).
index 7d82093..fe33940 100644 (file)
@@ -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}"
index 947e1ec..c8b2461 100644 (file)
@@ -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"
index f0b8a86..b5dff1b 100644 (file)
@@ -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"
index 814940f..368a4f5 100644 (file)
@@ -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"
index 86fb847..11f5850 100644 (file)
@@ -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"
index acdda15..51eb086 100644 (file)
@@ -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"
index ded0ea1..a68d9ee 100644 (file)
@@ -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 {
index 8c70fa0..aa182cf 100644 (file)
@@ -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\]+"
index 41cefb6..9ede3f8 100644 (file)
@@ -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"
index 6ed8585..ef02765 100644 (file)
@@ -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"
index 4a56e38..1789aab 100644 (file)
@@ -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"
index fcf32d4..dc68d2d 100644 (file)
@@ -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"
index 2ed9619..1576bfd 100644 (file)
@@ -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"
index a7a098c..6d69116 100644 (file)
@@ -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"
index 9b04b5f..456fa4c 100644 (file)
@@ -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"
index e85d528..2ac2acd 100644 (file)
@@ -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
index bbf59e2..f0a24b2 100644 (file)
@@ -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 {
index 125e7ec..aeb4e87 100644 (file)
@@ -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}"
index e121bdc..e79d46d 100644 (file)
@@ -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"
index 2c000a8..e14ecde 100644 (file)
@@ -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 } {
index af170e2..70acf83 100644 (file)
@@ -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"
index 6f51e12..acca51c 100644 (file)
@@ -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"
index c872aca..0e3036e 100644 (file)
@@ -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 {
index dce717d..a5c1aab 100644 (file)
@@ -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"
index 1cf3915..bced9f8 100644 (file)
@@ -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"
index 86af0d5..a5ef9e0 100644 (file)
@@ -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
index 02f19a3..94efa95 100644 (file)
@@ -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"
index b6ec6fa..39b88a2 100644 (file)
@@ -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.
index b7762f2..fbc5828 100644 (file)
@@ -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"
index fc73678..dd1be99 100644 (file)
@@ -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"