From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 4B70E3858C53 for ; Wed, 4 Jan 2023 19:06:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4B70E3858C53 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca 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 304J5OuY015124 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 4 Jan 2023 14:05:29 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 304J5OuY015124 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1672859130; bh=my7FgQky1DD0gGvJ6zsODWJXBuMGPN2PK/XqTDkZMZs=; h=Date:Subject:To:References:From:In-Reply-To:From; b=tnj3AUlqYz4BYVQ4cuEHtA22dKZsHg1Pinfl+s9UWZbk7NET06r6tDQSbYth9RgcX zwdvKM2YkdQVuiA7R/XUkFoz9O3F8+pjVaVS0tUgJzP1s4GjPAvNDGv/rtEyreRStl Dmhngt1x+k83D0gCut4PUVa0ikOLbcVMAPa530o8= Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 2FAA81E112; Wed, 4 Jan 2023 14:05:24 -0500 (EST) Message-ID: Date: Wed, 4 Jan 2023 14:05:23 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] gdb: use gdb_test_multiple in gdb_breakpoint Content-Language: en-US To: Lancelot SIX , gdb-patches@sourceware.org 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> From: Simon Marchi In-Reply-To: <20230104180248.4bumo5mm4vvpjx6c@ubuntu.lan> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 4 Jan 2023 19:05:24 +0000 X-Spam-Status: No, score=-3038.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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 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)? > > 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