| Message ID | 20260506202804.1681886-4-simon.marchi@polymtl.ca |
|---|---|
| State | New |
| Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2A8E74BA23F4 for <patchwork@sourceware.org>; Wed, 6 May 2026 20:30:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A8E74BA23F4 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=anFxzahf X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 2B6B04BA23EB for <gdb-patches@sourceware.org>; Wed, 6 May 2026 20:28:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2B6B04BA23EB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2B6B04BA23EB Authentication-Results: sourceware.org; arc=none smtp.remote-ip=132.207.4.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778099294; cv=none; b=voI6rI7OJ7gQqXWXgldPktrpAIYbb5amn9Qf+8pPWzi2bkH9VjuwJvfJMCM/xJws1lr+AMZ9tmeopfpQe45yC/UuVFtBPmLx74zAQVN2sQ33kEmukvPex9xJEfH1pNWLe6OH0nkNPTtlC0ut+TutWZ0WvC6CZx7dYCiKMpGEtD8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778099294; c=relaxed/simple; bh=7HPQXk/ORgO+x6+1hJ3C5YttyBuff+PvTt75on1s4wY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=NwRUehNyruzM5f60rxszSgpq/soZ5LdxGv55ozSJKEcFf9WWXgqwPwheXmf/BYERqNi3gb50w+BdjBxMfKlPFG4O5BVHV5CZ5C+gXJS45WSl1NIibyRUJ1xLrA1B99UDTHDQxplf5QHqBaBeJ3raXf7p+4YA2b/g+SSUlrVSdMY= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=anFxzahf DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2B6B04BA23EB Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 646KS7m4154442 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 6 May 2026 16:28:12 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 646KS7m4154442 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1778099292; bh=kpJ6eK7lad39dxvOHkq7Pn5+1GlU1n/rwro1vftCQnY=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=anFxzahf0vUgoMxgJBJ3uAS2IATkZwFkDk26/5N0rgkP9qFg/SKsy9zAj0RdgIxlW dnTZMjh4TMaSccpqUfI334RtSpuaputV3aBgFzDjnkXLVGAn6NGNK/YNLS5nwWmYeI uMLykC8ICk9ozoYNNLNXVP6++c8YCwXpauC2acVD4yCb8rOCsA+VqZBoVPHwTCvFfJ ZP2HIHmp+m/QJn0ELjLY4LglNpJ7fYocTKD7xP1rJ1mP7D1VBvlCKCmLEQ2M5k+6Fl ijYAA9D7PvBW0s3B11e8U/775TK3RJeEMoX5MK99WqgbkCSDx09HzNncRndE5VXhQK HtypzaG7N8m3w== Received: by simark.ca (Postfix) id 8F0911E0CA; Wed, 06 May 2026 16:28:07 -0400 (EDT) From: simon.marchi@polymtl.ca To: gdb-patches@sourceware.org Cc: Simon Marchi <simon.marchi@polymtl.ca> Subject: [PATCH 3/7] gdb/testsuite: add -inferior-args option to runto Date: Wed, 6 May 2026 16:27:51 -0400 Message-ID: <20260506202804.1681886-4-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260506202804.1681886-1-simon.marchi@polymtl.ca> References: <20260506202804.1681886-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 6 May 2026 20:28:07 +0000 X-Spam-Status: No, score=-3034.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, TXREP, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
gdb/testsuite: allow passing inferior arguments with native-gdbserver board
|
|
Commit Message
Simon Marchi
May 6, 2026, 8:27 p.m. UTC
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(-)
Comments
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. -Baris
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 ""} } if {!${no-delete-breakpoints}} { @@ -842,7 +843,7 @@ proc runto { linespec args } { return 0 } - gdb_run_cmd + gdb_run_cmd ${inferior-args} # the "at foo.c:36" output we get with -g. # the "in func" output we get without -g.