From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id ED6643858290 for ; Tue, 14 Jun 2022 23:54:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ED6643858290 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25ELEAo4020600 for ; Tue, 14 Jun 2022 23:54:34 GMT Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gppw3g15s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 14 Jun 2022 23:54:33 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 25ENZ4q3013604 for ; Tue, 14 Jun 2022 23:54:33 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma01dal.us.ibm.com with ESMTP id 3gmjp9wak3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 14 Jun 2022 23:54:33 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25ENsWnG30081496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Jun 2022 23:54:32 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 48C7CB205F; Tue, 14 Jun 2022 23:54:32 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C2373B2064; Tue, 14 Jun 2022 23:54:31 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.211.68.56]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 14 Jun 2022 23:54:31 +0000 (GMT) Message-ID: Subject: [PATCH] Fix for gdb.base/stap-probe.c From: Carl Love To: gdb-patches@sourceware.org, will schmidt , cel@us.ibm.com, Ulrich Weigand Date: Tue, 14 Jun 2022 16:54:31 -0700 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-18.el8) X-TM-AS-GCONF: 00 X-Proofpoint-GUID: TRGKIyJumcnQ6XC1WmEy04KE-wF2ZZxJ X-Proofpoint-ORIG-GUID: TRGKIyJumcnQ6XC1WmEy04KE-wF2ZZxJ Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-14_10,2022-06-13_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 spamscore=0 clxscore=1015 mlxscore=0 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206140083 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, 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: Tue, 14 Jun 2022 23:54:37 -0000 GDB maintainers: The gdb.base/stap-probe.exp test fails on Power 10 with a compile error due to a missing include file. The include file provides the definition for ATTRIBUTE_NOCLONE. The following patch add the missing include file. The test now runs on Power 10 with 98 expected passes and 4 unsupported tests. Please let me know if this patch is acceptable for mainline. Carl Love --------------------------------------------------------------------- Fix for gdb.base/stap-probe.c On PowePC, the test fails on a compile error: /../binutils-gdb-current/gdb/testsuite/gdb.base/stap-probe.c:107:1: error: expected '=', ',', ';', 'asm' or 'attribute' before 'use_xmm_reg' 107 | use_xmm_reg (int val) | ^~~~~~~~~~~ Where the source code for stap-probe.c is: ... static const char * __attribute__((noinline)) ATTRIBUTE_NOCLONE use_xmm_reg (int val) <-- line 107 { ... The issue is the ATTRIBUTE_NOCLONE is not defined as an attribute as expected. The #define for ATTRIBUTE_NOCLONE can be found in ../lib/attributes.h. This patch adds the missing include statement for the definition of ATTRIBUTE_NOCLONE. The patch has been tested and verified on a Power10 system. --- gdb/testsuite/gdb.base/stap-probe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/testsuite/gdb.base/stap-probe.c b/gdb/testsuite/gdb.base/stap-probe.c index d1482c35caf..527f7e187eb 100644 --- a/gdb/testsuite/gdb.base/stap-probe.c +++ b/gdb/testsuite/gdb.base/stap-probe.c @@ -15,6 +15,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include "../lib/attributes.h" + #if USE_SEMAPHORES #define _SDT_HAS_SEMAPHORES -- 2.31.1