From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 5EB943858288 for ; Mon, 21 Nov 2022 12:58:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5EB943858288 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca 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)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 522301E0D3; Mon, 21 Nov 2022 07:58:21 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1669035501; bh=BOQRvG6SkFxZ9bj+cS7jI8Skkrb3sXIeFOhbAunNXQc=; h=Date:Subject:To:References:From:In-Reply-To:From; b=nYNDfNyDAlM+qTKxnFGHPJA8cwvzcvzW+J6ffn6S3/gLJwXPfdLDkK2CzqxKOiP74 r39tz902+pm9DWKh40a3yd5ghwn/Wr5lpEwv1VozuD/vJSlmhFwXgKP0OUXo5PXzlq AiKimqJ+ZdzPPhW550NMS515BMvhT2QhUf5EuaYY= Message-ID: Date: Mon, 21 Nov 2022 07:58:21 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [RFA] Fix step-over-syscall.exp matching regexp for $bpnum.$locno matching Content-Language: en-US To: Philippe Waroquiers , gdb-patches@sourceware.org References: <20221120233614.388361-1-philippe.waroquiers@skynet.be> From: Simon Marchi In-Reply-To: <20221120233614.388361-1-philippe.waroquiers@skynet.be> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,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 11/20/22 18:36, Philippe Waroquiers via Gdb-patches wrote: > step-over-syscall.exp has some specific tests for gdbserver. > The regexp matching breakpoint hit must take the added locno into account. > > Test re-run in 3 modes (normal, native-gdbserver and native-extended-gdbserver). > --- > gdb/testsuite/gdb.base/step-over-syscall.exp | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/step-over-syscall.exp b/gdb/testsuite/gdb.base/step-over-syscall.exp > index 788f6e3f5d0..3160900ad83 100644 > --- a/gdb/testsuite/gdb.base/step-over-syscall.exp > +++ b/gdb/testsuite/gdb.base/step-over-syscall.exp > @@ -321,6 +321,7 @@ proc step_over_syscall { syscall } { > # "on" or "off". > > proc break_cond_on_syscall { syscall follow_fork detach_on_fork } { > + global bkptno_numopt_re > with_test_prefix "break cond on target : $syscall" { > set testfile "step-over-$syscall" > > @@ -368,12 +369,12 @@ proc break_cond_on_syscall { syscall follow_fork detach_on_fork } { > if { $detach_on_fork == "off" } { > gdb_test "inferior 1" > gdb_test "break marker" "Breakpoint.*at.*" > - gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \ > + gdb_test "continue" "Continuing\\..*Breakpoint $bkptno_numopt_re, marker \\(\\) at.*" \ > "continue to marker" > } > } else { > gdb_test "break marker" "Breakpoint.*at.* file .*${testfile}.c, line.*" > - gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \ > + gdb_test "continue" "Continuing\\..*Breakpoint $bkptno_numopt_re, marker \\(\\) at.*" \ I would suggest using the $::bkptno_numopt_re form (and removing the global declaration), that makes it clear on use that this is a global variable. With that fixed: Approved-By: Simon Marchi Simon