[PATCH] Powerpc: Add support for openat and fstatat syscalls

Carl Love cel@us.ibm.com
Tue Oct 5 20:59:06 GMT 2021


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




More information about the Gdb-patches mailing list