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 CA3EE38460AE for ; Thu, 30 Jun 2022 15:12:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CA3EE38460AE Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25UEfq20019567 for ; Thu, 30 Jun 2022 15:12:53 GMT Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3h1dhssvra-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 30 Jun 2022 15:12:52 +0000 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 25UF86kr000662 for ; Thu, 30 Jun 2022 15:12:51 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma05wdc.us.ibm.com with ESMTP id 3gwt0aksw3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 30 Jun 2022 15:12:51 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25UFCpCS24904132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 30 Jun 2022 15:12:51 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0A096AE064; Thu, 30 Jun 2022 15:12:51 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 753ADAE05C; Thu, 30 Jun 2022 15:12:50 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.211.68.56]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 30 Jun 2022 15:12:50 +0000 (GMT) Message-ID: Subject: [Ping] [PATCH] Fix gdb.base/step-indirect-call-thunk.exp From: Carl Love To: gdb-patches@sourceware.org, will schmidt , Ulrich Weigand Date: Thu, 30 Jun 2022 08:12:49 -0700 In-Reply-To: References: 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: zPfH9kyVlRb2Rb5QSe-OJPiFFwutS7U4 X-Proofpoint-ORIG-GUID: zPfH9kyVlRb2Rb5QSe-OJPiFFwutS7U4 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-06-30_09,2022-06-28_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 impostorscore=0 mlxscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 clxscore=1015 spamscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206300060 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Thu, 30 Jun 2022 15:12:56 -0000 Ping? On Wed, 2022-06-15 at 09:21 -0700, Carl Love wrote: > GDB maintainers: > > The gdb regression test gdb.base/step-indirect-call-thunk.exp > currently > does not run on X86 due to a compile error related to incompatible > gcc > command line argument. Secondly, the gcc command line arguments that > are used are specific to Intel thus generating an unsupported command > line error when compiled on other architectures. > > This patch fixes the command line arguments so the test will compile > on > X86. It also adds a check so the test will only run on X86. > > Please let me know if this patch is acceptable for mainline. > > Carl Love > > > -------------------------------------------------------------- > Fix gdb.base/step-indirect-call-thunk.exp > > This test fails on Intel X86-64 with the error: > > Executing on host: gcc -fno-stack-protector -fdiagnostics- > color=never > -mindirect-branch=thunk -mfunction-return=thunk -c -g > -o /.../gdb/testsuite/outputs/gdb.base/step-indirect-call-thunk/step- > indirect-call-thunk0.o > /.../gdb/testsuite/gdb.base/step-indirect-call-thunk.c > (timeout = 300) builtin_spawn -ignore SIGHUP gcc -fno-stack-protector > -fdiagnostics-color=never -mindirect-branch=thunk -mfunction- > return=thunk -c > -g -o /.../gdb/testsuite/outputs/gdb.base/step-indirect-call- > thunk/step-indirect-call-thunk0.o > /.../binutils-gdb-current/gdb/testsuite/gdb.base/step-indirect-call- > thunk.c > /.../gdb/testsuite/gdb.base/step-indirect-call-thunk.c: > In function 'inc': /.../gdb/testsuite/gdb.base/step-indirect-call- > thunk.c: > 22:1: error: '-mindirect-branch' and '-fcf-protection' are not > compatible > 22 | { /* inc.1 */ > > As stated in the error message the default "-fcf-protection" and > "-mindirect-branch' are in compatible. The fcf-protection argument > needs to be > "-fcf-protection=none" for the test to compile on Intel. > > The test also fails on PowerPC as the "-mindirect-branch' is an Intel > specific > GCC command line argument. A check for X86 is added so the test will > only run > on X86 platforms. > > The patch has been tested and verified on Power 10 and Intel X86-64 > systems with > no regressions. > --- > gdb/testsuite/gdb.base/step-indirect-call-thunk.exp | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp > b/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp > index 761e1d9a280..7c1b53c99be 100644 > --- a/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp > +++ b/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp > @@ -15,7 +15,11 @@ > > standard_testfile > > -set cflags "-mindirect-branch=thunk -mfunction-return=thunk" > +if { ![istarget "x86*"] } { > + return > +} > + > +set cflags "-mindirect-branch=thunk -mfunction-return=thunk -fcf- > protection=none" > if { [prepare_for_testing "failed to prepare" $testfile $srcfile \ > [list debug "additional_flags=$cflags"]] } { > return -1