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 B1D4538582B0 for ; Tue, 29 Nov 2022 16:50:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B1D4538582B0 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 (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2ATG7L4v004990 for ; Tue, 29 Nov 2022 16:50:34 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=zqA3Wg5Y9YLE9j3QBFdBe0f+SWzh+Uh6PTRU7LXW0LY=; b=LBPN4KY18vw5GMg3XNlwpi7sjFoa9Ev/9gzwSGVy4NbfG20828dGxvkLMw7Z5EdDjY1h +1IqHrl7j1NSfiU8vgsDES0RZPm9+ljONJJIE0v7UbxhkHQqWVVPkv3quauIAiUkT5q3 5d3xRPJXzGQJcJEdD4EcXZX5GskAVCmpbs8sB3ZC5MtkWS0UTnyjsBiILisJ0WZ8DysV 2OPBFrEV9JwNnPf/8eYAQPGreEU9Io2dTpoONHFP/U3aJHLfgXqZx502jvgiEF2/97yM pl9su2yd24WBX5yuNToEBZBzisDmyNCKs998LgcfZGkCWSut1VOCVEH6YdAzKX28h9v8 Bw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3m5kmv565c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 29 Nov 2022 16:50:34 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2ATG7LTv004975 for ; Tue, 29 Nov 2022 16:50:33 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3m5kmv564w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Nov 2022 16:50:33 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2ATGe4KC022707; Tue, 29 Nov 2022 16:50:32 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma03dal.us.ibm.com with ESMTP id 3m3ae9k969-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Nov 2022 16:50:32 +0000 Received: from smtpav06.wdc07v.mail.ibm.com ([9.208.128.115]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2ATGoVMN37683580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Nov 2022 16:50:32 GMT Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D01CB58067; Tue, 29 Nov 2022 16:50:30 +0000 (GMT) Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4B16D5805A; Tue, 29 Nov 2022 16:50:30 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.163.52.7]) by smtpav06.wdc07v.mail.ibm.com (Postfix) with ESMTP; Tue, 29 Nov 2022 16:50:30 +0000 (GMT) Message-ID: From: Carl Love To: Bruno Larsen , Ulrich Weigand , "gdb-patches@sourceware.org" Cc: "will_schmidt@vnet.ibm.com" Date: Tue, 29 Nov 2022 08:50:29 -0800 In-Reply-To: <682e79ba-0e4b-3209-4fa2-e94ef8e6c978@redhat.com> References: <69b2451b-1baf-8bd4-25dd-a1b46963981f@redhat.com> <75b124722aa20466d5044fa115b679b61ff83010.camel@de.ibm.com> <526c2ea0e35214ef46c248ae88bcd1346fa8e574.camel@us.ibm.com> <682e79ba-0e4b-3209-4fa2-e94ef8e6c978@redhat.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: 8RWCWUMVR8GYZN2OQKLOsqzL-eyGY6yP X-Proofpoint-ORIG-GUID: XuVnWYUlmkoDHRI5xu4wigMIxZmsbn2G Subject: RE: [PATCH] PowerPC, fix gdb.reverse/finish-reverse-bkpt.exp and gdb.reverse/next-reverse-bkpt-over-sr.exp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-29_10,2022-11-29_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 suspectscore=0 adultscore=0 phishscore=0 clxscore=1015 mlxlogscore=999 bulkscore=0 spamscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211290092 X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,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: Bruno: On Tue, 2022-11-29 at 09:52 +0100, Bruno Larsen wrote: > > > > > This patch fixes two PowerPC test failures in each of the tests > > gdb.reverse/finish-reverse-bkpt.exp and > > gdb.reverse/next-reverse-bkpt-over-sr.exp. > > > > Patch tested on PowerPC and Intel X86-64 with no regressions. > > Hi Carl, > > I also tested locally and verify that it adds no new regressions, > and > your explanations make sense. I have some style nits inlined, but > with > those fixed you can add my R-b tag: > > Reviewed-By: Bruno Larsen > > > --- > > > > + platforms. See comments in finish-reverse-bkpt.exp. */ > > + > > +int void_test = 0; > > + > > +void void_func () > > GDB's coding style would say this should be: > > void > void_func () > { Fixed > > I know that a lot of .c files in the test suite aren't completely > following the coding standards, but we should avoid introducing new > ones > if not necessary. Yup, I know better. Because I am used to doing it in line, it doesn't jump out at me a wrong. I have to actually stop and think about it to see it. Sigh hard to teach an "old dog" new tricks. :-). I fixed up the four occurrences of the mistake. > > +{ > > + void_test = 1; /* VOID FUNC */ > > +} > > + > > +int main (int argc, char **argv) > same here. Fixed. > > +{ > > + int i; > > + void (*funp) (void) = void_func; > > + > > > > set breakpoint on funp" > > +gdb_continue_to_breakpoint "funp call" ".*$srcfile:$breakloc.*" > > + > > +# Start the test > missing period at the end of the comment. Yup, fixed. > > set breakloc [gdb_get_line_number "VOID FUNC" "$srcfile"] > > gdb_test "tbreak void_func" \ > > > > t myglob = 0; > > + > > +int callee() { /* ENTER CALLEE */ > Same comment about C coding style. Fixed. > > + return myglob++; /* ARRIVED IN CALLEE */ > > +} /* RETURN FROM CALLEE */ > > + > > +int main () { Fixed > > + int (*funp) (void) = callee; > > + > > + /* Test next-reverse-bkpt-over-sr.exp needs to call function > > callee using > > + a function pointer to work correctly on PowerPC. See > > comments in > > + next-reverse-bkpt-over-sr.exp. */ > > + funp (); /* FUNCTION PTR CALL TO CALLEE */ > > + > > + /* Test that "step" doesn't */ > > + callee (); /* STEP INTO CALL AFTER FUNP CALL */ > > I don't see the need for a callee call here. The test doesn't use > the > second call at any point. True, it is only used as a reference point to break on. The exit (0) statement could be used instead. My first thought was to let leave it as it was. But after thinking about it for awhile, I decided it was best to remove it since the comment "STEP INTO CALL AFTER FUNP CALL" is technically misleading as the test doesn't actually step into callee(). So, in the end I decided to remove the callee (); line and fix the expect file to break on the following exit (0) call. Retested both test cases on Power to make sure I didn't have any typos. > As I said before, these are all minor style comments, so I don't > think a > new version is needed for these comments :) Given the above functional change, I need to post the updated version. I did go ahead and add the reviewed by tag. Carl