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.cp
Date: Fri, 27 Jan 2023 01:30:52 +0000 (GMT)	[thread overview]
Message-ID: <20230127013052.3B7D5388B6A5@sourceware.org> (raw)

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

commit e125b182783d729a9a29f6389a7661366a8dbd14
Author: Tom Tromey <tom@tromey.com>
Date:   Wed Jan 25 14:43:51 2023 -0700

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

Diff:
---
 gdb/testsuite/gdb.cp/cp-relocate.exp | 8 ++------
 gdb/testsuite/gdb.cp/ref-params.exp  | 2 --
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/gdb/testsuite/gdb.cp/cp-relocate.exp b/gdb/testsuite/gdb.cp/cp-relocate.exp
index 5e70f9d30d3..d400bb14e46 100644
--- a/gdb/testsuite/gdb.cp/cp-relocate.exp
+++ b/gdb/testsuite/gdb.cp/cp-relocate.exp
@@ -46,9 +46,7 @@ proc get_func_address { func } {
 
 # Load the file as an executable; GDB should assign non-overlapping
 # section offsets.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
 gdb_file_cmd ${binfile}
 
 # Find the interesting functions.  We go to a little effort to find
@@ -118,9 +116,7 @@ if { $func1_sec == $func2_sec } {
 }
 
 # Now start a clean GDB, for add-symbol-file tests.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
 
 gdb_test "add-symbol-file ${binfile} 0 -s ${func1_sec} 0x10000 -s ${func2_sec} 0x20000" \
 	"Reading symbols from .*${testfile}\\.o\\.\\.\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)" \
diff --git a/gdb/testsuite/gdb.cp/ref-params.exp b/gdb/testsuite/gdb.cp/ref-params.exp
index 52bbb4d097a..c06fc202893 100644
--- a/gdb/testsuite/gdb.cp/ref-params.exp
+++ b/gdb/testsuite/gdb.cp/ref-params.exp
@@ -28,8 +28,6 @@ if {[build_executable $testfile.exp $testfile $srcfile {debug c++}] == -1} {
     return -1
 }
 
-gdb_exit
-
 proc gdb_start_again { text } {
     global binfile
     global srcfile

                 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=20230127013052.3B7D5388B6A5@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).