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 7891D3858433 for ; Tue, 5 Oct 2021 20:59:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7891D3858433 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 195JbBIo026072 for ; Tue, 5 Oct 2021 16:59:11 -0400 Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0b-001b2d01.pphosted.com with ESMTP id 3bgu6jc9rg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 05 Oct 2021 16:59:10 -0400 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 195Kr1k6020515 for ; Tue, 5 Oct 2021 20:59:10 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma05wdc.us.ibm.com with ESMTP id 3bef2b4r7h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 05 Oct 2021 20:59:10 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 195Kx7d550463072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 5 Oct 2021 20:59:07 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9EFB7C605B; Tue, 5 Oct 2021 20:59:07 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3DA3EC6059; Tue, 5 Oct 2021 20:59:07 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.163.29.85]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 5 Oct 2021 20:59:07 +0000 (GMT) Message-ID: <22a9ea816266f1b9e6948a396a1dc45cb5f8f153.camel@us.ibm.com> Subject: [PATCH] Powerpc: Add support for openat and fstatat syscalls From: Carl Love To: gdb-patches@sourceware.org, Ulrich Weigand Cc: cel@us.ibm.com, Will Schmidt , Rogerio Alves Date: Tue, 05 Oct 2021 13:59:06 -0700 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-16.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: h7avRFNEpXhezC0iVOoLL0OeWk2plbrM X-Proofpoint-ORIG-GUID: h7avRFNEpXhezC0iVOoLL0OeWk2plbrM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-05_04,2021-10-04_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=654 malwarescore=0 spamscore=0 suspectscore=0 bulkscore=0 mlxscore=0 clxscore=1015 impostorscore=0 phishscore=0 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110050120 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP 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: Tue, 05 Oct 2021 20:59:12 -0000 GDB maintainers: The following patch adds the sycall support for the openat and fstatat system calls. The missing support results in gdb.reverse/fstatat- reverse.exp reporting a failure. The following patch adds the support. The testcase runs without any failures. The patch was tested on a Power 9 system. Please let me know if the patch is acceptable for mainline. Thanks. Carl ----------------------------------------------- Powerpc: Add support for openat and fstatat syscalls [gdb] update ppc-linux-tdep.c Add else if syscall entries for the openat and fstatat system calls. --- gdb/ppc-linux-tdep.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index ea8e3b98fa4..d49e142494f 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -1391,6 +1391,10 @@ ppc_canonicalize_syscall (int syscall) result = syscall += 259 - 240; else if (syscall >= 250 && syscall <= 251) /* tgkill */ result = syscall + 270 - 250; + else if (syscall == 286) + result = gdb_sys_openat; + else if (syscall == 291) + result = gdb_sys_fstatat64; else if (syscall == 336) result = gdb_sys_recv; else if (syscall == 337) -- 2.25.1