From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gproxy4-pub.mail.unifiedlayer.com (gproxy4-pub.mail.unifiedlayer.com [69.89.23.142]) by sourceware.org (Postfix) with ESMTPS id 3C6503858D20 for ; Thu, 9 Mar 2023 19:03:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3C6503858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw11.mail.unifiedlayer.com (unknown [10.0.90.126]) by progateway6.mail.pro1.eigbox.com (Postfix) with ESMTP id C911A1004954F for ; Thu, 9 Mar 2023 19:03:33 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id aLY5p74SMBwvKaLY5pCajd; Thu, 09 Mar 2023 19:03:33 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=Jqk0EO0C c=1 sm=1 tr=0 ts=640a2d85 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=k__wU0fu6RkA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=CCpqsmhAAAAA:8 a=48EWMvaXlu6FxVGZzfMA:9 a=ul9cdbp4aOFLsgKbc677:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1oBTon3IKDhQpCBeiFMXAK5hSyi6Q0l4h0mmdLJjq8U=; b=loMDoDAzHbgnkiad8AHSzVUKMf 8Ilg6C3blb8dgutkwq2KFnfhACjuE08pWy8f9Da9VQMXNn+0kBrfU1zjUaVfba1NJuBviamNARvzd lX67NVGd987TzJaOEFO4c/zEv; Received: from 71-211-185-113.hlrn.qwest.net ([71.211.185.113]:46980 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1paLY5-001Oyz-9T; Thu, 09 Mar 2023 12:03:33 -0700 From: Tom Tromey To: Carl Love via Gdb-patches Cc: Tom de Vries , Ulrich Weigand , Bruno Larsen , "pedro@palves.net" , Carl Love Subject: Re: [PATCH 1/2] PowerPC: fix for gdb.reverse/finish-precsave.exp and gdb.reverse/finish-reverse.exp References: <78b464a1-e32e-c3da-85e4-7bfc322cc29f@redhat.com> <7848e9858b54e33e399b871774ffc0b5058c1736.camel@us.ibm.com> <65d44121-65f7-a212-79ec-07ce53c15ecb@suse.de> <9fe94c0979cb40979b0dea7693a901c2d9f66164.camel@us.ibm.com> <59417813-eb4a-baf8-4e5d-e225d6732f71@suse.de> <7a494157-494f-6adf-d533-bf373b0f054f@redhat.com> <71aa635593df0677811afb85409aa190bcfa4f6a.camel@us.ibm.com> <15864a6b87b25c93e99a28149f23138267735f2a.camel@us.ibm.com> <041f62e9f26fd4a536bc90c34f072985582e6237.camel@de.ibm.com> <46c2c756475ba5923d7eed97996632a08285dd42.camel@us.ibm.com> <65861786-069e-53a1-ca17-a525b6629c95@suse.de> X-Attribution: Tom Date: Thu, 09 Mar 2023 12:03:30 -0700 In-Reply-To: (Carl Love via Gdb-patches's message of "Wed, 01 Mar 2023 12:59:25 -0800") Message-ID: <87y1o5n3wd.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.211.185.113 X-Source-L: No X-Exim-ID: 1paLY5-001Oyz-9T X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-185-113.hlrn.qwest.net (murgatroyd) [71.211.185.113]:46980 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3020.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Carl" == Carl Love via Gdb-patches writes: Carl> Procedure proc_step_until from test gdb.reverse/step-indirect-call-thunk.exp The "proc_" in there seems incorrect. Carl> # Step until the pattern REGEXP is found. Step at most Carl> # MAX_STEPS times, but stop stepping once REGEXP is found. Carl> -# Carl> +# CURRENT matches current location Carl> # If REGEXP is found then a single pass is emitted, otherwise, after Carl> # MAX_STEPS steps, a single fail is emitted. Carl> # Carl> # TEST_NAME is the name used in the pass/fail calls. Carl> -proc gdb_step_until { regexp {test_name ""} {max_steps 10} } { Carl> +proc gdb_step_until { regexp {test_name ""} {current ""} \ Carl> + { max_steps 10 } } { Carl> + if { $current == "" } { Carl> + set current "\}" Carl> + } Carl> + if { $test_name == "" } { Carl> + set test_name "stepping until regexp" Carl> + } I think you can just supply these as defaults directly in the proc definition. Carl> +# Do repeated stepping COMMANDs in order to reach TARGET from CURRENT Carl> +# Carl> +# COMMAND is a stepping command Carl> +# CURRENT is a string matching the current location Carl> +# TARGET is a string matching the target location Carl> +# TEST is the test name Carl> +# MAX_STEPS is number of steps attempted before fail is emitted Carl> +# Carl> +# The function issues repeated COMMANDs as long as the location matches Carl> +# CURRENT up to a maximum of 100 steps. s/100/MAX_STEPS Carl> +# Carl> +# TEST passes if the resulting location matches TARGET and fails Carl> +# otherwise. Carl> +# Carl> +proc repeat_cmd_until { command current target test_name {max_steps 100} } { The docs refer to "TEST" but should use "TEST_NAME". thanks, Tom