public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Use clean_restart in gdb.dwarf2
@ 2023-01-27  1:30 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-01-27  1:30 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e8d8a0df4b35509c5fc051f1ff84b872f7f1bac0

commit e8d8a0df4b35509c5fc051f1ff84b872f7f1bac0
Author: Tom Tromey <tom@tromey.com>
Date:   Wed Jan 25 10:46:52 2023 -0700

    Use clean_restart in gdb.dwarf2
    
    Change gdb.dwarf2 to use clean_restart more consistently.

Diff:
---
 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(-)

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
index b24500b8301..88d3d79cad8 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 564c8c47089..626cf5b27f2 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 a3b9dd075e1..52dfae3d7d7 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 e9bedd53cc3..d893fd3252c 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 1b9ba8da092..ba9db41ba61 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 d0bfa6b57f7..19ed2c3c8cb 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 9afad943d1c..0003dfa6bc6 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"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-27  1:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27  1:30 [binutils-gdb] Use clean_restart in gdb.dwarf2 Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).