PowerPC, add support for recording pipe2 system call.

Message ID ddb5f38d6a68d5ede3fbef44d8cd5bc4c1125269.camel@us.ibm.com
State Committed
Commit 15a1e4e2a7dac11fdf338c70efc355348d8a6d49
Headers
Series PowerPC, add support for recording pipe2 system call. |

Commit Message

Carl Love Oct. 20, 2022, 11:58 p.m. UTC
  GCC maintainers:

The pipe2 system call support for gdb record is missing.  The missing
support results in gdb.reverse/pipe-reverse.exp a single test failure.

This patch adds the needed support for the pipe2 system call on Power
10 with the Fedora 36 distro.

The patch has been tested on Power 10 with no regression failures.

Please let me know if this patch is acceptable for mainline.  Thanks.

                 Carl Love


---------------------------
PowerPC, add support for recording pipe2 system call.

Test gdb.reverse/pipe-reverse.exp fails on Power 10 running the fedora 36
distro.  The gdb record error message is:

  Process record and replay target doesn't support syscall number 317.

System call 317 on PowerPC maps to the pipe2 system call.

This patch adds support for the missing pipe2 system call for PowerPC.

Patch fixes the test failure in gdb.reverse/pipe-reverse.exp.

The patch has been tested on Power 10 with no regression failures.
---
 gdb/ppc-linux-tdep.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Tom Tromey Oct. 21, 2022, 3:20 p.m. UTC | #1
Carl> GCC maintainers:

Hmmm.... :)

Carl> The pipe2 system call support for gdb record is missing.  The missing
Carl> support results in gdb.reverse/pipe-reverse.exp a single test failure.

Carl> This patch adds the needed support for the pipe2 system call on Power
Carl> 10 with the Fedora 36 distro.

Carl> The patch has been tested on Power 10 with no regression failures.

Carl> Please let me know if this patch is acceptable for mainline.  Thanks.

Looks good to me.  Thank you for doing this.

Tom
  

Patch

diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 14800619cbe..cc5a26431ba 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -1400,6 +1400,8 @@  ppc_canonicalize_syscall (int syscall, int wordsize)
       else
 	result = gdb_sys_fstatat64;
     }
+  else if (syscall == 317)
+    result = gdb_sys_pipe2;
   else if (syscall == 336)
     result = gdb_sys_recv;
   else if (syscall == 337)