]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.base/relocate.exp
Use clean_restart in gdb.base
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / relocate.exp
index add323b53f8aae9e3b847b53ba11ba37944a0931..4c09090b7c01d65a0d1ab149913813be7c64b068 100644 (file)
@@ -25,9 +25,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}]
      return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
 
 #Check that invalid options are rejected.
 foreach x {"-raednow" "readnow" "foo" "-readnow s"} {
@@ -194,9 +192,7 @@ if { "${function_foo_addr}" == "${function_bar_addr}" } {
 # Now use a variable as an offset to add-symbol-file, and check that
 # the functions' addresses change.
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
 
 gdb_test_no_output "set \$offset = 0x10000"
 
@@ -317,9 +313,7 @@ with_test_prefix "global vars, 3rd" {
 # Now try loading the object as an exec-file; we should be able to print
 # the values of variables after we do this.
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
 gdb_file_cmd ${binfile}
 
 # Check the values of the variables.