From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 18/27] Use clean_restart in gdb.dwarf2
Date: Wed, 25 Jan 2023 15:46:05 -0700 [thread overview]
Message-ID: <20230125224614.1006886-19-tom@tromey.com> (raw)
In-Reply-To: <20230125224614.1006886-1-tom@tromey.com>
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(-)
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 0980f43078f..83a5b875323 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
@@ -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"
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"
--
2.39.1
next prev parent reply other threads:[~2023-01-25 22:46 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 22:45 [PATCH 00/27] Many small testsuite cleanups Tom Tromey
2023-01-25 22:45 ` [PATCH 01/27] Use ordinary calling convention for clean_restart Tom Tromey
2023-01-25 22:45 ` [PATCH 02/27] Use clean_restart in gdb.dlang Tom Tromey
2023-01-25 22:45 ` [PATCH 03/27] Eliminate spurious returns from the test suite Tom Tromey
2023-01-25 22:45 ` [PATCH 04/27] Remove some dead code in gdb.fortran/info-types.exp Tom Tromey
2023-01-25 22:45 ` [PATCH 05/27] Minor "require" fixups Tom Tromey
2023-01-25 22:45 ` [PATCH 06/27] Remove unnecessary call to standard_testfile Tom Tromey
2023-01-25 22:45 ` [PATCH 07/27] Start gdb after building executable in mi-basics.exp Tom Tromey
2023-01-25 22:45 ` [PATCH 08/27] Use mi_clean_restart more Tom Tromey
2023-01-25 22:45 ` [PATCH 09/27] Use clean_restart in gdb.pascal Tom Tromey
2023-01-25 22:45 ` [PATCH 10/27] Use clean_restart in gdb.linespec Tom Tromey
2023-01-25 22:45 ` [PATCH 11/27] Use clean_restart in gdb.opencl Tom Tromey
2023-01-25 22:45 ` [PATCH 12/27] Use clean_restart in gdb.trace Tom Tromey
2023-01-26 17:34 ` Pedro Alves
2023-01-26 18:34 ` Tom Tromey
2023-01-27 0:36 ` Tom Tromey
2023-01-25 22:46 ` [PATCH 13/27] Use clean_restart in gdb.objc Tom Tromey
2023-01-25 22:46 ` [PATCH 14/27] Use clean_restart in gdb.threads Tom Tromey
2023-01-25 22:46 ` [PATCH 15/27] Use clean_restart in gdb.guile Tom Tromey
2023-01-25 22:46 ` [PATCH 16/27] Use clean_restart in gdb.arch Tom Tromey
2023-01-25 22:46 ` [PATCH 17/27] Use clean_restart in gdb.reverse Tom Tromey
2023-01-25 22:46 ` Tom Tromey [this message]
2023-01-25 22:46 ` [PATCH 19/27] Use clean_restart in gdb.ada Tom Tromey
2023-01-25 22:46 ` [PATCH 20/27] Use clean_restart in gdb.fortran Tom Tromey
2023-01-25 22:46 ` [PATCH 21/27] Use clean_restart in gdb.stabs Tom Tromey
2023-01-25 22:46 ` [PATCH 22/27] Use clean_restart in gdb.go Tom Tromey
2023-01-25 22:46 ` [PATCH 23/27] Use clean_restart in gdb.perf Tom Tromey
2023-01-25 22:46 ` [PATCH 24/27] Use clean_restart in gdb.disasm Tom Tromey
2023-01-25 22:46 ` [PATCH 25/27] Use clean_restart in gdb.cp Tom Tromey
2023-01-25 22:46 ` [PATCH 26/27] Use clean_restart in gdb.python Tom Tromey
2023-01-25 22:46 ` [PATCH 27/27] Use clean_restart in gdb.base Tom Tromey
2023-01-26 17:37 ` [PATCH 00/27] Many small testsuite cleanups Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230125224614.1006886-19-tom@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).