From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH] Remove 'eval' from gdb_breakpoint
Date: Wed, 22 Feb 2023 15:22:42 -0700 [thread overview]
Message-ID: <20230222222242.65558-1-tromey@adacore.com> (raw)
Now that Tcl has the {*} operator, we can remove the use of eval from
gdb_breakpoint. Tested on x86-64 Fedora 36.
---
gdb/testsuite/lib/gdb.exp | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 6864dac3ac9..66a5d31d9ad 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -704,12 +704,7 @@ proc runto { linespec args } {
set test_name "runto: run to $linespec"
- # We need to use eval here to pass our varargs args to gdb_breakpoint
- # which is also a varargs function.
- # But we also have to be careful because $linespec may have multiple
- # elements, and we don't want Tcl to move the remaining elements after
- # the first to $args. That is why $linespec is wrapped in {}.
- if ![eval gdb_breakpoint {$linespec} $args] {
+ if {![gdb_breakpoint $linespec {*}$args]} {
return 0
}
--
2.39.1
next reply other threads:[~2023-02-22 22:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 22:22 Tom Tromey [this message]
2023-02-22 23:54 ` Kevin Buettner
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=20230222222242.65558-1-tromey@adacore.com \
--to=tromey@adacore.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).