Use clean_restart in gdb.disasm
authorTom Tromey <tom@tromey.com>
Wed, 25 Jan 2023 21:42:39 +0000 (14:42 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 27 Jan 2023 01:28:32 +0000 (18:28 -0700)
Change gdb.disasm to use clean_restart more consistently.

gdb/testsuite/gdb.disasm/am33.exp
gdb/testsuite/gdb.disasm/h8300s.exp
gdb/testsuite/gdb.disasm/hppa.exp
gdb/testsuite/gdb.disasm/mn10300.exp
gdb/testsuite/gdb.disasm/sh3.exp
gdb/testsuite/gdb.go/basic-types.exp

index a278f395dd6d126f4ad1091bd97cb5d151219d2c..51936857ad0e92929e6278384ca73cc0eb3a87d9 100644 (file)
@@ -795,12 +795,7 @@ proc dsp_autoincrement_tests { } {
     }
 }
 
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load $binfile
+clean_restart $binfile
 
 call_tests
 movm_tests
index cd68a6309595a6eea44eb8ae116761d0082d8916..17da0ad0b9574ea23cb8577c49097e2d814c753d 100644 (file)
@@ -640,9 +640,7 @@ proc all_block_data_transfer_tests { } {
     }
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
 all_set_machine_h8300s
 gdb_load $binfile
 
index 19fc08b611548087f1d357489da7dea8afc0fc89..fadbb0a31e199bcafb48e542298ddc616cb3b517 100644 (file)
@@ -1365,12 +1365,7 @@ proc fmemLRbug_tests { } {
     }
 }
 
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load $binfile
+clean_restart $binfile
 
 all_integer_memory_tests
 all_immediate_tests
index 425dc0615c8e12bc5bb6edce1645cd7c0a450c08..5cf57ef12a8f307391d624413b98fde5b28a87fa 100644 (file)
@@ -529,12 +529,7 @@ proc sub_tests { } {
     }
 }
 
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load $binfile
+clean_restart $binfile
 
 add_tests
 bcc_tests
index 84479ce83e7f87e7a983f7d94293d82fa91dcdff..4be9bf57419f5a8dd4c15bfb77c51ac58fe45abd 100644 (file)
@@ -100,10 +100,7 @@ proc all_fp_misc_tests { } {
     }
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load $binfile
+clean_restart $binfile
 
 all_fp_move_and_load_tests
 all_fp_arithmetic_tests
index ce56ba4a68183d5fb349e111d8996a4e81b867fd..ae95906a99a7b50333043d0402a9c1135a7725fd 100644 (file)
@@ -100,11 +100,7 @@ proc test_complex_literal_types_accepted {} {
     gdb_test "pt complex128(i1.0)" "type = complex128"
 }
 
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
 
 if [set_lang_go] {
     test_integer_literal_types_accepted