From: Simon Marchi <simon.marchi@polymtl.ca>
To: "Aktemur, Baris" <TankutBaris.Aktemur@amd.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 3/7] gdb/testsuite: add -inferior-args option to runto
Date: Fri, 19 Jun 2026 15:29:51 -0400 [thread overview]
Message-ID: <f8608446-e433-42fb-ac23-4216a6c405c0@polymtl.ca> (raw)
In-Reply-To: <DM4PR12MB6470FF447C561AB1C91E299BF8392@DM4PR12MB6470.namprd12.prod.outlook.com>
On 5/12/26 9:02 AM, Aktemur, Baris wrote:
> AMD General
>
> Hi Simon,
>
>> From: Simon Marchi <simon.marchi@polymtl.ca>
>>
>> Add a new -inferior-args option to proc runto, to allow passing
>> arguments to the test program. Its value is forwarded to gdb_run_cmd,
>> which does the right thing, including with the native-gdbserver board,
>> where arguments need to be passed on the gdbserver command line.
>>
>> The option is named -inferior-args (rather than the shorter -args)
>> because parse_args sets a variable in the caller's scope using the
>> option name. Naming it "-args" would clash with the "args" parameter.
>>
>> Subsequent patches use this new option.
>>
>> Change-Id: If2483c22302ed432ccd6cebef8d235e3e1d35bb8
>> ---
>> gdb/testsuite/lib/gdb.exp | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
>> index 601896457fea..60bcb582aeef 100644
>> --- a/gdb/testsuite/lib/gdb.exp
>> +++ b/gdb/testsuite/lib/gdb.exp
>> @@ -809,6 +809,7 @@ proc runto { linespec args } {
>> {no-delete-breakpoints}
>> {message}
>> {no-message}
>> + {inferior-args ""}
>
> I think this needs to be documented in the proc comment.
Ack, I will modify it like so:
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 31bb1c0fe59f..e9fd43aed846 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -817,16 +817,20 @@ proc gdb_breakpoint { linespec args } {
# just compare to "function" because it might be a fully qualified,
# single quoted C++ function specifier.
#
-# If there are additional arguments, pass them to gdb_breakpoint.
-# We recognize -no-message/-message ourselves as well as -no-delete-breakpoints.
+# This proc recognizes the -no-message/-message, -no-delete-breakpoints
+# and -inferior-args options. If there are additional arguments, pass
+# them to gdb_breakpoint.
#
# -no-message is messed up here, like gdb_breakpoint: to preserve
# historical usage fails are always printed by default.
# -no-message: turns off printing of fails (and passes, but they're already off)
# -message: turns on printing of passes (and fails, but they're already on)
#
-# The 'no-delete-brekpoints' option stops this proc from deleting all
+# The 'no-delete-breakpoints' option stops this proc from deleting all
# breakpoints.
+#
+# The 'inferior-args' option allows to specify arguments to pass to the
+# inferior.
Simon
next prev parent reply other threads:[~2026-06-19 19:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 20:27 [PATCH 0/7] gdb/testsuite: allow passing inferior arguments with native-gdbserver board simon.marchi
2026-05-06 20:27 ` [PATCH 1/7] gdb/testsuite: remove unused arguments to gdb_breakpoint simon.marchi
2026-05-06 20:27 ` [PATCH 2/7] gdb/testsuite: make gdb_breakpoint, runto and runto_main use parse_args simon.marchi
2026-05-06 20:27 ` [PATCH 3/7] gdb/testsuite: add -inferior-args option to runto simon.marchi
2026-05-12 13:02 ` Aktemur, Baris
2026-06-19 19:29 ` Simon Marchi [this message]
2026-06-19 19:54 ` Simon Marchi
2026-05-06 20:27 ` [PATCH 4/7] gdb/testsuite: fix step-over-thread-exit.exp with native-gdbserver simon.marchi
2026-05-12 13:06 ` Aktemur, Baris
2026-06-19 19:31 ` Simon Marchi
2026-05-06 20:27 ` [PATCH 5/7] gdb/testsuite: make pie-execl.exp work " simon.marchi
2026-05-06 20:27 ` [PATCH 6/7] gdb/testsuite: use -inferior-args in gdb.base/gcore-buffer-overflow.exp simon.marchi
2026-05-06 20:27 ` [PATCH 7/7] gdb/testsuite: fix gdb.rocm/code-object-load-while-breakpoint-hit.exp with native-gdbserver simon.marchi
2026-05-12 13:18 ` [PATCH 0/7] gdb/testsuite: allow passing inferior arguments with native-gdbserver board Aktemur, Baris
2026-06-15 9:54 ` Aktemur, Baris
2026-06-19 20:09 ` Simon Marchi
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=f8608446-e433-42fb-ac23-4216a6c405c0@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=TankutBaris.Aktemur@amd.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