[18/27] Use clean_restart in gdb.dwarf2
Commit Message
Change gdb.dwarf2 to use clean_restart more consistently.
---
gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp | 4 +---
gdb/testsuite/gdb.dwarf2/dw2-error.exp | 4 +---
gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp | 4 +---
gdb/testsuite/gdb.dwarf2/dwp-symlink.exp | 4 +---
gdb/testsuite/gdb.dwarf2/dwzbuildid.exp | 4 +---
gdb/testsuite/gdb.dwarf2/dwznolink.exp | 5 +----
gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp | 4 +---
7 files changed, 7 insertions(+), 22 deletions(-)
@@ -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"
@@ -31,9 +31,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"
@@ -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] {
@@ -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}"
@@ -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"
@@ -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"
@@ -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"