From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 9DC883858C60 for ; Mon, 28 Feb 2022 18:02:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9DC883858C60 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 21SGPpeo015336 for ; Mon, 28 Feb 2022 18:02:19 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0b-001b2d01.pphosted.com with ESMTP id 3eh1wj2bpu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 Feb 2022 18:02:18 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 21SHxMbu022376 for ; Mon, 28 Feb 2022 18:02:18 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma04wdc.us.ibm.com with ESMTP id 3eftrr829u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 Feb 2022 18:02:18 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 21SI2FOA6750924 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Feb 2022 18:02:15 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1B2D728060; Mon, 28 Feb 2022 18:02:15 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 42D022805C; Mon, 28 Feb 2022 18:02:14 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.211.79.233]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 28 Feb 2022 18:02:14 +0000 (GMT) Message-ID: <1ce325d2bf301bc18b847332a7df2abf5e1565be.camel@us.ibm.com> Subject: Re: [PING PATCH] Powerpc fix for gdb.base/ending-run.exp From: Carl Love To: gdb-patches@sourceware.org Cc: Rogerio Alves , Will Schmidt Date: Mon, 28 Feb 2022 10:02:13 -0800 In-Reply-To: <479011be1a832692f38293ebf6f9cc0fd18315fa.camel@us.ibm.com> References: <479011be1a832692f38293ebf6f9cc0fd18315fa.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: 0W9ykGpfJS9yn7Vx92TeMnnevlbzVDwW X-Proofpoint-ORIG-GUID: 0W9ykGpfJS9yn7Vx92TeMnnevlbzVDwW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-02-28_08,2022-02-26_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 mlxscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 priorityscore=1501 phishscore=0 clxscore=1015 spamscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202280089 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Mon, 28 Feb 2022 18:02:21 -0000 GDB maintainers: Just a ping on the patch. I noticed I did miss address the patch initially. This is a patch for GDB. Carl On Wed, 2022-02-23 at 15:18 -0800, Carl Love wrote: > GCC maintainers: > > The following patch fixes two Powerpc testsuite errors in > gdb.base/ending-run.exp. As stated below, the last two tests > fail. It > seems the standard output on Powerpc is different then other > platforms > as described below. > > Please let me know if the following patch is acceptable for gdb > mainline. Thanks. > > Carl Love > > -------------------------------------------------------------- > Powerpc fix for gdb.base/ending-run.exp > > The last two tests in this test case fail. The next to the > last test does a next command when the program is stopped at > the closing bracket for main. On Powerpc, the message printed > is: > > 0x00007ffff7d01524 in ?? () from /lib/powerpc64le-linux-gnu/libc.so.6 > > which fails to match any of the test_multiple options. > > The test then does another next command. On Powerpc, the > message printed it: > > Cannot find bounds of current function > > which again is not any of the options in the test_multiple. > > I checked the behavior on Powerpc to see if this is typical. > I ran gdb on the following simple program as shown below. > > #include > int > main(void) > { > printf("Hello, world!\n"); > return 0; > } > > gdb ./hello_world > > > Type "apropos word" to search for commands related to "word"... > Reading symbols from ./hello_world... > (No debugging symbols found in ./hello_world) > (gdb) break main > Breakpoint 1 at 0x818 > (gdb) r > > Starting program: /home/carll/hello_world > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/powerpc64le-linux- > gnu/libthread_db.so.1". > > Breakpoint 1, 0x0000000100000818 in main () > (gdb) n > Single stepping until exit from function main, > which has no line number information. > Hello, world! > 0x00007ffff7d01524 in ?? () from /lib/powerpc64le-linux-gnu/libc.so.6 > (gdb) n > Cannot find bounds of current function > > So it would seem that the messages seen from the test case are > "normal" output for Powerpc. > > The following patch adds the output from Powerpc as an option > to the test_multiple, identifying them as the expected output > on Powerpc. > > The patch has been tested on a Power 10 system and an Intel > 64-bit system. No additional regression failures were seen on > either platform. > --- > gdb/testsuite/gdb.base/ending-run.exp | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.base/ending-run.exp > b/gdb/testsuite/gdb.base/ending-run.exp > index 32435b2b509..d00a002928e 100644 > --- a/gdb/testsuite/gdb.base/ending-run.exp > +++ b/gdb/testsuite/gdb.base/ending-run.exp > @@ -202,6 +202,11 @@ gdb_test_multiple "next" "step out of main" { > # This is what happens on system using uClibc. > pass "step out of main" > } > + -re ".*from /lib/powerpc.*$gdb_prompt $" { > + # Powerpc output for step out of main > + pass "step out of main" > + set program_exited_normally 1 > + } > } > > # When we're talking to a program running on a real stand-alone > board, > @@ -238,13 +243,18 @@ if {!$use_gdb_stub > pass "step to end of run" > set program_in_exit 1 > } > + -re ".*Cannot find bounds of current function.*$gdb_prompt > $" { > + # Powerpc output for step to end of run > + pass "step to end of run" > + set program_in_exit 1 > + } > -re ".*Single.*_int_reset.*$gdb_prompt $" { > pass "step to end of run" > if {![istarget "xstormy16-*-*"]} { > set program_exited_normally 1 > } > } > - } > + } > } > > if {$program_in_exit} {