From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id UDtjFpX7tmMzDBAAWB0awg (envelope-from ) for ; Thu, 05 Jan 2023 11:32:21 -0500 Received: by simark.ca (Postfix, from userid 112) id 588091E222; Thu, 5 Jan 2023 11:32:21 -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=raUGbAp+; 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=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 0E6971E0D3 for ; Thu, 5 Jan 2023 11:32:21 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9CA7E385B534 for ; Thu, 5 Jan 2023 16:32:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9CA7E385B534 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1672936340; bh=XM/UcOK7mILxoFN/WONzpvm+fCxUUA0XDrqfzS7uzOs=; 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=raUGbAp+GWLMN4SIvxj1iUb9zvCseHY85EuZkzIbQ60AjqjsxBi/rtUrSWnFVItU2 R1yrIfjVXFHiRog8uWOo4QCqxaYvF6Lb4Hy7DzZeVtvSfJyqHwVnKDcH36wPUevEuJ RRA8mAYnoFN3opV/mJXULaVz77JHBd1tPll1x6Js= Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 5E112385B53E for ; Thu, 5 Jan 2023 16:32:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E112385B53E Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8386A1791D; Thu, 5 Jan 2023 16:31:56 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 577F913338; Thu, 5 Jan 2023 16:31:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id UGh0E3z7tmMiSwAAMHmgww (envelope-from ); Thu, 05 Jan 2023 16:31:56 +0000 Message-ID: Date: Thu, 5 Jan 2023 17:31:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH] gdb: use gdb_test_multiple in gdb_breakpoint Content-Language: en-US To: Simon Marchi , gdb-patches@sourceware.org References: <20230103192216.108444-1-simon.marchi@polymtl.ca> <315f1d7a-a948-5512-fd89-a40d7a25e937@polymtl.ca> In-Reply-To: <315f1d7a-a948-5512-fd89-a40d7a25e937@polymtl.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-0.10 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] 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: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 1/5/23 17:28, Simon Marchi wrote: > On 1/5/23 04:04, Tom de Vries wrote: >> On 1/3/23 20:22, Simon Marchi via Gdb-patches wrote: >>> - -re "$gdb_prompt $" { >>> - if { $print_fail } { >>> - fail $test_name >>> - } >>> - return 0 >>> - } >> >> This caused: >> ... >> FAIL: gdb.dwarf2/dw2-main-no-line-number.exp: gdb_breakpoint: set breakpoint at 1 >> FAIL: gdb.dwarf2/dw2-main-no-line-number.exp: !$breakpoint_at_missing_lineno_set >> FAIL: gdb.go/methods.exp: going to first breakpoint (the program exited) >> FAIL: gdb.go/methods.exp: going to second breakpoint (the program is no longer running) >> ... >> >> Re-inserting this piece of code fixes it. > > Ah, sorry for this, and thanks for reporting. The CI test job I usually > use is a bit broken right now, so I don't test as well as I should. Ah, that's too bad, I hope you get it running properly again. > Does the patch below look good? > LGTM, thanks. - Tom > > From db4ea2e9710bfe460d5f99ebf8d3fd670a81dfa2 Mon Sep 17 00:00:00 2001 > From: Simon Marchi > Date: Thu, 5 Jan 2023 11:23:45 -0500 > Subject: [PATCH] gdb/testsuite: add back needed -re clause in gdb_breakpoint > > Commit 4b9728be ("gdb: use gdb_test_multiple in gdb_breakpoint") caused, > amongst others: > > (gdb) break 1^M > No line 1 in the current file.^M > Make breakpoint pending on future shared library load? (y or [n]) n^M > (gdb) FAIL: gdb.dwarf2/dw2-main-no-line-number.exp: gdb_breakpoint: set breakpoint at 1 > FAIL: gdb.dwarf2/dw2-main-no-line-number.exp: !$breakpoint_at_missing_lineno_set > > This is because it removed one empty -re clause (matching just the > prompt) that is necessary after replying "n" to the pending breakpoint > question. Add this clause back. > > Change-Id: Ibfaa059d58bbea660bc29f0547e2f75c323fcbc6 > --- > gdb/testsuite/lib/gdb.exp | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp > index e17eace4cb13..af538e5c8fbd 100644 > --- a/gdb/testsuite/lib/gdb.exp > +++ b/gdb/testsuite/lib/gdb.exp > @@ -657,6 +657,12 @@ proc gdb_breakpoint { linespec args } { > send_gdb "$pending_response\n" > exp_continue > } > + -re "$gdb_prompt $" { > + if { $print_fail } { > + fail $test_name > + } > + return 0 > + } > } > if { $print_pass } { > pass $test_name > > base-commit: d66641b604182246b648f662d3c32200ac921365