From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id ABFB73858C5E for ; Thu, 9 Mar 2023 21:42:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ABFB73858C5E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=us.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=us.ibm.com Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 329KABpG023055; Thu, 9 Mar 2023 21:42:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : from : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding : subject; s=pp1; bh=hp52TJVYXfBIQmoUF7F6Gx2gTVk0dE9iO+L68Nao288=; b=e4/nXNVveGuUQuw/hYKSNEN0UzZES8ue1jPSFV2ZDeqLPOl6NR5bSPxgHWR+Eo7pvDE9 EO+5lOV3PskvES6WGOZecVVOPJS+MyviCeyfeZxIiV7fbi0nFM3xfV0Nfnmo6kT+/cz6 DDOCZgJHuv8Gj/Z3E6Sa1fbbnbkkwcrn4EiDXSkKnE+FrprKfTQbVs0gx7zOKp42RvUn SQzDXubeTQTUJIfzmETripGX5NoMxQXPs+uSderpKHyvTZI+hmLDFYrVZKQshz/DegHX 9yNk/pbNLwRfY+5sVlCnZo8AVxOoeRlF0ClF7rpDkH+JnMRcFONrON6FKThLtAdrbcok tA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3p6s9bh3ap-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Mar 2023 21:42:35 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 329L9g1G038693; Thu, 9 Mar 2023 21:42:34 GMT Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3p6s9bh3a7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Mar 2023 21:42:34 +0000 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 329J4kMR011833; Thu, 9 Mar 2023 21:42:33 GMT Received: from smtprelay04.dal12v.mail.ibm.com ([9.208.130.102]) by ppma04dal.us.ibm.com (PPS) with ESMTPS id 3p6gbve22p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Mar 2023 21:42:33 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay04.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 329LgWOp66847046 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 9 Mar 2023 21:42:32 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 158B258063; Thu, 9 Mar 2023 21:42:32 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9478E5803F; Thu, 9 Mar 2023 21:42:31 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.163.92.223]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 9 Mar 2023 21:42:31 +0000 (GMT) Message-ID: From: Carl Love To: Tom Tromey , Carl Love via Gdb-patches Cc: Tom de Vries , Ulrich Weigand , Bruno Larsen , "pedro@palves.net" Date: Thu, 09 Mar 2023 13:42:31 -0800 In-Reply-To: <87y1o5n3wd.fsf@tromey.com> 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> <87y1o5n3wd.fsf@tromey.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-18.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: uOyIjOtEtaq04VbdPIWjN5ngj8IooqgK X-Proofpoint-GUID: cevGjcEEt53Bxcwk1pQog7t6_cCAG6UA Subject: RE: [PATCH 1/2] PowerPC: fix for gdb.reverse/finish-precsave.exp and gdb.reverse/finish-reverse.exp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-09_12,2023-03-09_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 phishscore=0 clxscore=1015 impostorscore=0 mlxlogscore=999 priorityscore=1501 suspectscore=0 mlxscore=0 spamscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303090173 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE,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 Thu, 2023-03-09 at 12:03 -0700, Tom Tromey wrote: > > > > > > "Carl" == Carl Love via Gdb-patches < > > > > > > gdb-patches@sourceware.org> writes: > > Carl> Procedure proc_step_until from test gdb.reverse/step-indirect- > call-thunk.exp > > The "proc_" in there seems incorrect. Ah, yea. Good catch. Fixed that. > > 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. True, I guess I was just keeping with the original "style". But yea, better to do these as defaults. Changed to use defaults in this function and similarly in the the new proceedure gdb_step_until. > > 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 OK, changed. > > 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". yup, thanks. Changed. Will post version 2. Thanks for the review. Carl