aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-25 10:46:52 -0700
committerTom Tromey <tom@tromey.com>2023-01-26 18:28:32 -0700
commite8d8a0df4b35509c5fc051f1ff84b872f7f1bac0 (patch)
tree1a01d83fd31fa328cbf0ec0a63d4a83c1ed45c5a /gdb
parentb825d4a3de028fa9df6db149747b1c22575ebfd1 (diff)
downloadgdb-e8d8a0df4b35509c5fc051f1ff84b872f7f1bac0.zip
gdb-e8d8a0df4b35509c5fc051f1ff84b872f7f1bac0.tar.gz
gdb-e8d8a0df4b35509c5fc051f1ff84b872f7f1bac0.tar.bz2
Use clean_restart in gdb.dwarf2
Change gdb.dwarf2 to use clean_restart more consistently.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-error.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dwp-symlink.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dwzbuildid.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dwznolink.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp4
7 files changed, 7 insertions, 22 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
index b24500b..88d3d79 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
@@ -28,9 +28,7 @@ if {[gdb_compile [file join $srcdir $subdir $srcfile] $binfile \
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir [file join $srcdir $subdir]
+clean_restart
# Be sure to set cp-abi before $binfile gets loaded
gdb_test "set cp-abi gnu-v3"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
index 564c8c4..626cf5b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
@@ -28,9 +28,7 @@ if {[build_executable $testfile.exp $testfile $srcfile {nodebug quiet}]} {
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
gdb_test_no_output "set breakpoint pending off"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
index a3b9dd0..52dfae3 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
@@ -23,9 +23,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != ""
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
# From gdb_file_cmd:
if [is_remote host] {
diff --git a/gdb/testsuite/gdb.dwarf2/dwp-symlink.exp b/gdb/testsuite/gdb.dwarf2/dwp-symlink.exp
index e9bedd5..d893fd3 100644
--- a/gdb/testsuite/gdb.dwarf2/dwp-symlink.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwp-symlink.exp
@@ -75,9 +75,7 @@ gdb_test "ptype main" {type = int \(int, char \*\*\)} "binary symlink, dwp at sy
# a relative path for the program.
# This is clean_restart, but specifying a relative path to the binary.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
gdb_test "cd [file dirname [standard_output_file ${thelink}]]" \
"Working directory .*"
gdb_load "./${thelink}"
diff --git a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
index 1b9ba8d..ba9db41 100644
--- a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
@@ -146,9 +146,7 @@ if {[gdb_compile [list ${binfile}1.o ${binfile}6.o] ${binfile}-fallback \
foreach testname {ok mismatch fallback} {
with_test_prefix $testname {
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
+ clean_restart
gdb_test_no_output "set debug-file-directory $debugdir" \
"set debug-file-directory"
diff --git a/gdb/testsuite/gdb.dwarf2/dwznolink.exp b/gdb/testsuite/gdb.dwarf2/dwznolink.exp
index d0bfa6b..19ed2c3 100644
--- a/gdb/testsuite/gdb.dwarf2/dwznolink.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwznolink.exp
@@ -47,10 +47,7 @@ if {[build_executable $testfile.exp $testfile \
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
+clean_restart
gdb_test "file -readnow $binfile" \
"could not read '.gnu_debugaltlink' section" \
"file $testfile"
diff --git a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
index 9afad94..0003dfa 100644
--- a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
+++ b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
@@ -26,9 +26,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} object {debug}] !=
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
# Be sure to set cp-abi before ${binfile} gets loaded
gdb_test "set cp-abi gnu-v3"