diff options
author | Carl Love <cel@us.ibm.com> | 2021-10-13 20:28:48 +0000 |
---|---|---|
committer | Carl Love <cel@us.ibm.com> | 2021-10-14 10:17:25 -0500 |
commit | 38c90362460000bac2efdbf06250821429777bb0 (patch) | |
tree | 84674d98494986ac3992849e10a8bce0610aad69 /gdb | |
parent | 047ab79212fa6e8e17503d38f2a813546ea17bf2 (diff) | |
download | fsf-binutils-gdb-38c90362460000bac2efdbf06250821429777bb0.zip fsf-binutils-gdb-38c90362460000bac2efdbf06250821429777bb0.tar.gz fsf-binutils-gdb-38c90362460000bac2efdbf06250821429777bb0.tar.bz2 |
Powerpc: Add support for openat and fstatat syscalls
[gdb] update ppc-linux-tdep.c
Add argument to ppc_canonicalize_syscall for the wordsize.
Add syscall entries for the openat and fstatat system calls.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ppc-linux-tdep.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index ea8e3b9..e2e1b1e 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -1371,7 +1371,7 @@ static struct linux_record_tdep ppc64_linux_record_tdep; SYSCALL. */ static enum gdb_syscall -ppc_canonicalize_syscall (int syscall) +ppc_canonicalize_syscall (int syscall, int wordsize) { int result = -1; @@ -1391,6 +1391,15 @@ 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) + { + if (wordsize == 64) + result = gdb_sys_newfstatat; + else + result = gdb_sys_fstatat64; + } else if (syscall == 336) result = gdb_sys_recv; else if (syscall == 337) @@ -1414,7 +1423,7 @@ ppc_linux_syscall_record (struct regcache *regcache) int ret; regcache_raw_read_unsigned (regcache, tdep->ppc_gp0_regnum, &scnum); - syscall_gdb = ppc_canonicalize_syscall (scnum); + syscall_gdb = ppc_canonicalize_syscall (scnum, tdep->wordsize); if (syscall_gdb < 0) { |