From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0tmcMkQP9WJBBSUAWB0awg (envelope-from ) for ; Thu, 11 Aug 2022 10:16:36 -0400 Received: by simark.ca (Postfix, from userid 112) id C00B81E5EA; Thu, 11 Aug 2022 10:16:36 -0400 (EDT) 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=NdMol1gx; 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=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 4DDC11E21F for ; Thu, 11 Aug 2022 10:16:36 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D8DE8385AC31 for ; Thu, 11 Aug 2022 14:16:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D8DE8385AC31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1660227394; bh=kxbbHb3iGu6nYuYNYYWQqIv4Y54DKnaKyU0TI1bt2OQ=; h=Subject:To:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=NdMol1gxSUZszxKc0lKtj4uTdHykl3D57Dm0DnsWgccCmmiqx7gLIU1hPUYP4ddkm rpXOJUtaIGBnEMWtJZmqohhCGgffclFYfLCWByjb1EG/7zqeucSQqr1dSe1IfWG362 iqip4o6qjQCcYg64/b0I71bDekzBKLDWQjOEc+KY= Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 54ADF3858C74 for ; Thu, 11 Aug 2022 14:16:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 54ADF3858C74 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27BE5uvJ025164 for ; Thu, 11 Aug 2022 14:16:14 GMT Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3hw37xrck7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 11 Aug 2022 14:16:14 +0000 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27BE6vDP021763 for ; Thu, 11 Aug 2022 14:16:13 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma02dal.us.ibm.com with ESMTP id 3hvkjh5qk8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 11 Aug 2022 14:16:13 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27BEGBqP64225616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Aug 2022 14:16:11 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BEC1812405C; Thu, 11 Aug 2022 14:16:11 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6A977124055; Thu, 11 Aug 2022 14:16:11 +0000 (GMT) Received: from lexx (unknown [9.160.66.1]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 11 Aug 2022 14:16:11 +0000 (GMT) Message-ID: <32842d73fc8b78df60cd4dc88b08a51ced20b45b.camel@vnet.ibm.com> Subject: Re: [PATCH] Fix hardware watchpoint check in test gdb.base/watchpoint-reuse-slot.exp To: Carl Love , "gdb-patches@sourceware.org" , Ulrich Weigand Date: Thu, 11 Aug 2022 09:16:10 -0500 In-Reply-To: <5b7b2e287d29fc77aeb81c4c30b6aa8652e529d7.camel@us.ibm.com> References: <3783e7e44fe188af5ca1f2ddcfa4c7f5cb7a818e.camel@us.ibm.com> <20f1b450af2746c38b98e7e1d29805d35b475be1.camel@vnet.ibm.com> <5596a4dc585b51beea3ba1138262ab71014e7c89.camel@us.ibm.com> <5b7b2e287d29fc77aeb81c4c30b6aa8652e529d7.camel@us.ibm.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-GUID: m5Ihz5ZDIoBJf70Qf3Dl0CGMaIgko0nE X-Proofpoint-ORIG-GUID: m5Ihz5ZDIoBJf70Qf3Dl0CGMaIgko0nE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-11_10,2022-08-11_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 spamscore=0 impostorscore=0 mlxscore=0 priorityscore=1501 phishscore=0 malwarescore=0 adultscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208110046 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: will schmidt via Gdb-patches Reply-To: will schmidt Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On Wed, 2022-08-10 at 12:17 -0700, Carl Love wrote: > Will: > > On Wed, 2022-08-10 at 10:54 -0700, Carl Love wrote: > > > > +if {[skip_hw_watchpoint_access_tests]} { > > > > + set supports_hw_wp 0 > > > > +} else { > > > > + set supports_hw_wp 1 > > > > +} > > > > + > > > > standard_testfile > > > > > > > > if {[prepare_for_testing "failed to prepare" $testfile $srcfile > > > > debug]} { > > > > @@ -285,7 +297,7 @@ proc setup_and_run_watchpoints_tests { > > > > hw_wp_p > > > > } { > > > > > > > > # Run tests with hardware watchpoints disabled, then again with > > > > them > > > > # enabled (if this target supports hardware watchpoints). > > > > -if { ![target_info exists gdb,no_hardware_watchpoints]} { > > > > +if { $supports_hw_wp } { > > > > > > So.. could this be simplified with a check against the existing > > > cached > > > has_hw_wp_support value? > > > > Yes, I hadn't thought about that. I updated the patch to just check > > the cached value. > > > > # Run test with H/W enabled. > > > > setup_and_run_watchpoints_tests 1 > > > > } > > I updated the patch on Power to just check the has_hw_wp_support cached > value. That works great. However, when I did my testing on x86-64 it > doesn't work. The issue is the the runtime check is only done on > PowerPC thus the variable has_hw_wp_support is not initialized on other > platforms. Thus you do need to set a local variable and use that. Hmm, I don't see anything in has_hw_wp_support gdb.exp that limits the setting to only for powerpc.. why is that the case? The current usage of the variable in skip_hw_watchpoint_tests does include an istarget reference, is that making the difference here? || ([istarget "powerpc*-*-linux*"] && [has_hw_wp_support]) > Sorry, I didn't catch that earlier as I hadn't done all the regression > testing when I replied to your email. > > Carl >