public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Use clean_restart in gdb.reverse
Date: Fri, 27 Jan 2023 01:30:11 +0000 (GMT)	[thread overview]
Message-ID: <20230127013011.8DACE3858C50@sourceware.org> (raw)

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

commit b825d4a3de028fa9df6db149747b1c22575ebfd1
Author: Tom Tromey <tom@tromey.com>
Date:   Wed Jan 25 10:45:30 2023 -0700

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

Diff:
---
 gdb/testsuite/gdb.reverse/sigall-precsave.exp | 6 +-----
 gdb/testsuite/gdb.reverse/sigall-reverse.exp  | 6 +-----
 gdb/testsuite/gdb.reverse/solib-precsave.exp  | 8 +-------
 gdb/testsuite/gdb.reverse/solib-reverse.exp   | 8 +-------
 4 files changed, 4 insertions(+), 24 deletions(-)

diff --git a/gdb/testsuite/gdb.reverse/sigall-precsave.exp b/gdb/testsuite/gdb.reverse/sigall-precsave.exp
index df0e8228fb4..e2a786a7b9b 100644
--- a/gdb/testsuite/gdb.reverse/sigall-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/sigall-precsave.exp
@@ -20,10 +20,6 @@ if [target_info exists gdb,nosignals] {
 
 require supports_reverse
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
 standard_testfile sigall-reverse.c
 set precsave [standard_output_file sigall.precsave]
 
@@ -145,7 +141,7 @@ proc test_one_sig_reverse {prevsig} {
     }
 }
 
-gdb_load $binfile
+clean_restart $binfile
 
 runto gen_ABRT
 
diff --git a/gdb/testsuite/gdb.reverse/sigall-reverse.exp b/gdb/testsuite/gdb.reverse/sigall-reverse.exp
index 7499d784b9b..7891dca92a9 100644
--- a/gdb/testsuite/gdb.reverse/sigall-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/sigall-reverse.exp
@@ -20,10 +20,6 @@ if [target_info exists gdb,nosignals] {
 
 require supports_reverse
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
 standard_testfile
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
@@ -151,7 +147,7 @@ proc test_one_sig_reverse {prevsig} {
     }
 }
 
-gdb_load $binfile
+clean_restart $binfile
 
 runto gen_ABRT
 
diff --git a/gdb/testsuite/gdb.reverse/solib-precsave.exp b/gdb/testsuite/gdb.reverse/solib-precsave.exp
index 88261b6f6b0..3ca73828063 100644
--- a/gdb/testsuite/gdb.reverse/solib-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/solib-precsave.exp
@@ -53,11 +53,6 @@ if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable \
     return -1
 }
      
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-
 # Note: The test previously did "set debug-file-directory" to (try to)
 # ensure the debug info for the dynamic loader and libc weren't found.
 # This doesn't work if the debug info is in the .debug subdirectory.
@@ -65,8 +60,7 @@ gdb_start
 # and is no longer attempted.  Instead, the test does not make assumptions
 # about whether the debug info is present or not.
 
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart $binfile
 gdb_load_shlib $library1
 gdb_load_shlib $library2
 
diff --git a/gdb/testsuite/gdb.reverse/solib-reverse.exp b/gdb/testsuite/gdb.reverse/solib-reverse.exp
index 0afe21926c5..c061086a8d7 100644
--- a/gdb/testsuite/gdb.reverse/solib-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/solib-reverse.exp
@@ -45,11 +45,6 @@ if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $exec_opt
     return -1
 }
      
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-
 # Note: The test previously did "set debug-file-directory" to (try to)
 # ensure the debug info for the dynamic loader and libc weren't found.
 # This doesn't work if the debug info is in the .debug subdirectory.
@@ -57,8 +52,7 @@ gdb_start
 # and is no longer attempted.  Instead, the test does not make assumptions
 # about whether the debug info is present or not.
 
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart $binfile
 gdb_load_shlib $library1
 gdb_load_shlib $library2

                 reply	other threads:[~2023-01-27  1:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230127013011.8DACE3858C50@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@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).