From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lndn.lancelotsix.com (vps-42846194.vps.ovh.net [IPv6:2001:41d0:801:2000::2400]) by sourceware.org (Postfix) with ESMTPS id 6BA833858D35 for ; Wed, 4 Jan 2023 19:12:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6BA833858D35 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=lancelotsix.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lancelotsix.com Received: from ubuntu.lan (unknown [IPv6:2a02:390:9086::146]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id A72B7807EF; Wed, 4 Jan 2023 19:12:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=lancelotsix.com; s=2021; t=1672859529; bh=mnFfsz5cWNf/5AgAO1i60jDfTU8aiO0AIIbPeAMaTbE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=s595Ovs1c5y0zvPrxmE2ej1NuPs48Cq0x9KdMwqS7C9ZMNHh1ktKMbI3btsg/FVQS tukbLcdR5674N/Js4pApb0YvU7jGUFwy7h3+bekdm1MCiA0dIyIRs0U6xnUhsR1eqY QyxxBtv8yggBUbXpudi24OkyKv60lAy4t08J0FlWKHymp2vXWmJo8DipTZ+HJbSj0I wnZYdz9IppLz0Nz14yVhVR+aAkeC7Zh5SFYJ4BNBwDgffTsymSERTyFPF0WoB5R7Ew 5QbAdN79nwoZ5cxNd/XoF5RdK8s+zllM+9I87aoQJqVUnI438QzdC2qRf/tdCrYins vACr22cnbB5Hw== Date: Wed, 4 Jan 2023 19:12:05 +0000 From: Lancelot SIX To: Simon Marchi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb: use gdb_test_multiple in gdb_breakpoint Message-ID: <20230104191205.ajjcvx7vq3hmm424@ubuntu.lan> References: <20230103192216.108444-1-simon.marchi@polymtl.ca> <20230104091559.rqo2774ba566j5sg@ubuntu.lan> <9b050608-4bb6-dbc3-69f6-ebc9ad2cc303@polymtl.ca> <20230104161817.qbvbspsqcqrjw6w2@ubuntu.lan> <7d38d82e-1beb-c3dc-441a-b4e455351020@polymtl.ca> <20230104174038.aeau2an7tmufa3pj@ubuntu.lan> <20230104180248.4bumo5mm4vvpjx6c@ubuntu.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Wed, 04 Jan 2023 19:12:09 +0000 (UTC) X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Jan 04, 2023 at 02:05:23PM -0500, Simon Marchi wrote: > > > On 1/4/23 13:02, Lancelot SIX wrote: > > Something like this should fix the issue:. > > > > From 25585cc98812c90f819d78742243299a933ac879 Mon Sep 17 00:00:00 2001 > > From: Lancelot SIX > > Date: Wed, 4 Jan 2023 17:58:08 +0000 > > Subject: [PATCH] gdb: ensure test_name is initialized in gdb_breakpoint > > > > A refactoring in 4b9728bec15 (gdb: use gdb_test_multiple in > > gdb_breakpoint) left the $test_name variable initialized. > > Woops, thanks for noticing and for the patch. > > initialized -> uninitialized (or undefined)? I went for undefined which is more appropriate. Pushed with this modification. Best, Lancelot. > > > > > This patch fixes this. > > --- > > 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 ba16b2ab315..e17eace4cb1 100644 > > --- a/gdb/testsuite/lib/gdb.exp > > +++ b/gdb/testsuite/lib/gdb.exp > > @@ -639,8 +639,9 @@ proc gdb_breakpoint { linespec args } { > > set print_pass 1 > > } > > > > + set test_name "gdb_breakpoint: set breakpoint at $linespec" > > # The first two regexps are what we get with -g, the third is without -g. > > - gdb_test_multiple "$break_command $linespec" "gdb_breakpoint: set breakpoint at $linespec" { > > + gdb_test_multiple "$break_command $linespec" $test_name { > > -re "$break_message \[0-9\]* at .*: file .*, line $decimal.\r\n$gdb_prompt $" {} > > -re "$break_message \[0-9\]*: file .*, line $decimal.\r\n$gdb_prompt $" {} > > -re "$break_message \[0-9\]* at .*$gdb_prompt $" {} > > -- > > 2.34.1 > > This LGTM, thanks: > > Approved-By: Simon Marchi > > Simon