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 require target_can_use_run_cmd
Date: Fri, 13 Jan 2023 20:37:29 +0000 (GMT)	[thread overview]
Message-ID: <20230113203729.4543D3860744@sourceware.org> (raw)

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

commit ec1300f6ea8dfc432fae1c5d68ea1389d2d126a7
Author: Tom Tromey <tom@tromey.com>
Date:   Thu Dec 15 16:47:05 2022 -0700

    Use require target_can_use_run_cmd
    
    This changes some tests to use "require target_can_use_run_cmd".

Diff:
---
 gdb/testsuite/gdb.base/annota1.exp                    | 4 +---
 gdb/testsuite/gdb.base/annota3.exp                    | 4 +---
 gdb/testsuite/gdb.base/dprintf-execution-x-script.exp | 4 +---
 gdb/testsuite/gdb.cp/annota2.exp                      | 4 +---
 gdb/testsuite/gdb.cp/annota3.exp                      | 4 +---
 gdb/testsuite/gdb.multi/bkpt-multi-exec.exp           | 4 +---
 6 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index 49cbd6856d6..96698642675 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -19,9 +19,7 @@
 # This testcase cannot use runto_main because of the different prompt
 # we get when using annotation level 2.
 #
-if ![target_can_use_run_cmd] {
-    return 0
-}
+require target_can_use_run_cmd
 
 set breakpoints_invalid "\r\n\032\032breakpoints-invalid\r\n"
 
diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp
index 7aaf6df6dee..62efd1aff66 100644
--- a/gdb/testsuite/gdb.base/annota3.exp
+++ b/gdb/testsuite/gdb.base/annota3.exp
@@ -19,9 +19,7 @@
 # This testcase cannot use runto_main because of the different prompt
 # we get when using annotation level 2.
 #
-if ![target_can_use_run_cmd] {
-    return 0
-}
+require target_can_use_run_cmd
 
 
 #
diff --git a/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp b/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp
index 5a343fc9ad4..5b410f32a1f 100644
--- a/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp
+++ b/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp
@@ -20,9 +20,7 @@
 # part of this test.
 
 # Bail out if the target can't use the 'run' command.
-if ![target_can_use_run_cmd] {
-    return 0
-}
+require target_can_use_run_cmd
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp
index 160d26903d8..5116355049f 100644
--- a/gdb/testsuite/gdb.cp/annota2.exp
+++ b/gdb/testsuite/gdb.cp/annota2.exp
@@ -32,9 +32,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 # This testcase cannot use runto_main because of the different prompt
 # we get when using annotation level 2.
 #
-if ![target_can_use_run_cmd] {
-    return 0
-}
+require target_can_use_run_cmd
 
 set breakpoints_invalid "\r\n\032\032breakpoints-invalid\r\n"
 set frames_invalid "\r\n\032\032frames-invalid\r\n"
diff --git a/gdb/testsuite/gdb.cp/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp
index 5a5f3ff38a4..5d8c152d33d 100644
--- a/gdb/testsuite/gdb.cp/annota3.exp
+++ b/gdb/testsuite/gdb.cp/annota3.exp
@@ -32,9 +32,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 # This testcase cannot use runto_main because of the different prompt
 # we get when using annotation level 2.
 #
-if ![target_can_use_run_cmd] {
-    return 0
-}
+require target_can_use_run_cmd
 
 #
 # line number where we need to stop in main
diff --git a/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp b/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp
index 30d049daa38..9ab1ef18559 100644
--- a/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp
+++ b/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp
@@ -13,9 +13,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if ![target_can_use_run_cmd] {
-    return
-}
+require target_can_use_run_cmd
 
 # Until "catch exec" is implemented on other targets...
 #

                 reply	other threads:[~2023-01-13 20:37 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=20230113203729.4543D3860744@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).