From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KX3hG03OtWMbVw8AWB0awg (envelope-from ) for ; Wed, 04 Jan 2023 14:06:53 -0500 Received: by simark.ca (Postfix, from userid 112) id 681071E222; Wed, 4 Jan 2023 14:06:53 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=WeXaBWYS; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 87AF41E112 for ; Wed, 4 Jan 2023 14:06:51 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C23D0385840E for ; Wed, 4 Jan 2023 19:06:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C23D0385840E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1672859210; bh=my7FgQky1DD0gGvJ6zsODWJXBuMGPN2PK/XqTDkZMZs=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=WeXaBWYS5usBvcP4EfigQCuY8CWSuNZoLHYFbwfi3qI8lh8BwF/Wj8aOY4Ax+KXrj z68rSPKO1mj1yLShonOslALRfe56Dr5nIZlUMI7NgE36QkvCjokrjDF55mQHWwn+xd YiMiAY8EOV2foGchdUrjU4I+AE650sEaAAWBzRP8= 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 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 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> 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-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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