From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id VtzIIYaeNWrC1g8AWB0awg (envelope-from ) for ; Fri, 19 Jun 2026 15:54:46 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=NdGVNP9d; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 792061E070; Fri, 19 Jun 2026 15:54:46 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id BD2D61E070 for ; Fri, 19 Jun 2026 15:54:45 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 578874BAE7E7 for ; Fri, 19 Jun 2026 19:54:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 578874BAE7E7 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=NdGVNP9d Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 887444B9DB7D for ; Fri, 19 Jun 2026 19:54:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 887444B9DB7D 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 887444B9DB7D 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=1781898860; cv=none; b=GhGtm/BEixPn7QFKoX/nhoYTXMtGuwq9XMRSMIhrumiXSfcRv1ND6hemx7hxHg9ne3zl66CsPgAb3Wci7xCCTwrwQOfpO5eREn8DboSzh0r8zdQ2TcJauhwYJeo8iVULL82N9ihdgvcO1lGYK/xIXoVtlF0ouWiXmGSxrjdV31k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1781898860; c=relaxed/simple; bh=sJWqh8D7ADdfJxtKJyyUJ7vQNoyKWxLogED6yBJ7yDs=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=PAXY5wxTMBjpYs1eWilia5VqJn+yuvZ8FYF0Gdj2gTYWjU897UuK+33s2Okn4ZC2CSXRnnOATAAjRbxnV5JIrl+KyLSsrpraA3xrv7+T6qy3AQvW4icrtYG1Q+h3x49H47xV+ZbMdr3ZfLShI/iSa/5TMB2vC1zIx+/xgObKsPI= 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=NdGVNP9d DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 887444B9DB7D 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 65JJsA6f014730 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Jun 2026 15:54:15 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 65JJsA6f014730 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1781898855; bh=U3UH9Jn8+bDRbmVzALFuedMkgTWTmLOBdl6m8dYlDY0=; h=Date:Subject:From:To:In-Reply-To:From; b=NdGVNP9d0DqSnOVwDwlFu4TacqLnZsc2Ceje06E5Y0cNUsm9TYWI7J+/nT719k6Rq 34fg9n2ABwCh5gD9TsvlF+PWZdDww0yK1I7Tx6K9t/rtSt1pXs30bL4GIVqksPhBsW QB2Mf2Mw+tatWfC01EzB7qkRexy2zzNrLswL8+N2L06a8jygfVFHVTNZxoEB7dChjh mOjU7RAtZ95z7mZ1vSU/sQm5EQl+NITpN/VBSB6hnwNW9ZVwcfbTpPFSg+ryC5hnWV kI958Z+0q8ahxfsVH74V0bVfVVj4SAAisbCGGWUiumeUKUeeU7sUy8LOVGzrVshccK GtCHImzKHQ2jA== Received: by simark.ca (Postfix) id 756F81E070; Fri, 19 Jun 2026 15:54:10 -0400 (EDT) Message-ID: <4346f4a8-6d7e-43c3-9097-90b03bbd3b13@polymtl.ca> Date: Fri, 19 Jun 2026 15:54:10 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/7] gdb/testsuite: add -inferior-args option to runto From: Simon Marchi To: "Aktemur, Baris" , "gdb-patches@sourceware.org" References: <20260506202804.1681886-1-simon.marchi@polymtl.ca> <20260506202804.1681886-4-simon.marchi@polymtl.ca> Content-Language: fr In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 19 Jun 2026 19:54:10 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 6/19/26 3:29 PM, Simon Marchi wrote: > On 5/12/26 9:02 AM, Aktemur, Baris wrote: >> AMD General >> >> Hi Simon, >> >>> From: Simon Marchi >>> >>> 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. I saw later your comment in the cover letter about saying how to pass multiple arguments. I had to give it a try to be sure it works. I will change the last paragraph above to read: # The 'inferior-args' option allows to specify arguments to pass to the # inferior. For example, this would pass three arguments: # # runto func -inferior-args "one two three" Simon