aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.objc
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-25 10:31:34 -0700
committerTom Tromey <tom@tromey.com>2023-01-26 18:28:31 -0700
commit3ae2b57582b29fce26b00d38363533e761f946a5 (patch)
tree575985491784c1cb33dae9c269c7fe2b0e2e693f /gdb/testsuite/gdb.objc
parenta7e727aea73a6aef4b7fef4cf8fb958f3438d84d (diff)
downloadbinutils-3ae2b57582b29fce26b00d38363533e761f946a5.zip
binutils-3ae2b57582b29fce26b00d38363533e761f946a5.tar.gz
binutils-3ae2b57582b29fce26b00d38363533e761f946a5.tar.bz2
Use clean_restart in gdb.objc
Change gdb.objc to use clean_restart more consistently.
Diffstat (limited to 'gdb/testsuite/gdb.objc')
-rw-r--r--gdb/testsuite/gdb.objc/basicclass.exp11
-rw-r--r--gdb/testsuite/gdb.objc/nondebug.exp13
-rw-r--r--gdb/testsuite/gdb.objc/objcdecode.exp13
-rw-r--r--gdb/testsuite/gdb.objc/print.exp6
4 files changed, 4 insertions, 39 deletions
diff --git a/gdb/testsuite/gdb.objc/basicclass.exp b/gdb/testsuite/gdb.objc/basicclass.exp
index c09d852..05432a1 100644
--- a/gdb/testsuite/gdb.objc/basicclass.exp
+++ b/gdb/testsuite/gdb.objc/basicclass.exp
@@ -70,18 +70,9 @@ proc deduce_language_of_main {} {
}
proc do_objc_tests {} {
- global subdir
- global srcdir
global binfile
- global gdb_prompt
-
-
- # Start with a fresh gdb.
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
+ clean_restart $binfile
deduce_language_of_main
}
diff --git a/gdb/testsuite/gdb.objc/nondebug.exp b/gdb/testsuite/gdb.objc/nondebug.exp
index d08c3d4b..c1ab4f6 100644
--- a/gdb/testsuite/gdb.objc/nondebug.exp
+++ b/gdb/testsuite/gdb.objc/nondebug.exp
@@ -28,19 +28,8 @@ if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [
}
proc do_objc_tests {} {
- global subdir
- global srcdir
global binfile
- global gdb_prompt
-
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
+ clean_restart $binfile
}
do_objc_tests
diff --git a/gdb/testsuite/gdb.objc/objcdecode.exp b/gdb/testsuite/gdb.objc/objcdecode.exp
index 6a713ad..abed670 100644
--- a/gdb/testsuite/gdb.objc/objcdecode.exp
+++ b/gdb/testsuite/gdb.objc/objcdecode.exp
@@ -28,19 +28,8 @@ if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [
}
proc do_objc_tests {} {
- global subdir
- global srcdir
global binfile
- global gdb_prompt
-
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
+ clean_restart $binfile
}
do_objc_tests
diff --git a/gdb/testsuite/gdb.objc/print.exp b/gdb/testsuite/gdb.objc/print.exp
index 8dc8378..c311853 100644
--- a/gdb/testsuite/gdb.objc/print.exp
+++ b/gdb/testsuite/gdb.objc/print.exp
@@ -57,11 +57,7 @@ proc test_float_rejected {} {
test_print_reject "p 1.1ll"
}
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
if [set_lang_objc] {
test_float_accepted