aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-linux-tdep.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-05-09 10:42:16 +0200
committerTom de Vries <tdevries@suse.de>2022-05-09 10:42:16 +0200
commitcd02db09d26959ea58771c946b44e56fe8c0d36e (patch)
tree605a94d83fa98f2d4514084a36e57d04d749c4c4 /gdb/amd64-linux-tdep.c
parent2dc60c77108cad22c270cec3f88d01fd20716a35 (diff)
downloadgdb-cd02db09d26959ea58771c946b44e56fe8c0d36e.zip
gdb-cd02db09d26959ea58771c946b44e56fe8c0d36e.tar.gz
gdb-cd02db09d26959ea58771c946b44e56fe8c0d36e.tar.bz2
[gdb/tdep] Handle pipe2 syscall for amd64
When running test-case gdb.reverse/pipe-reverse.exp on openSUSE Tumbleweed, I run into: ... (gdb) continue^M Continuing.^M Process record and replay target doesn't support syscall number 293^M Process record: failed to record execution log.^M ^M Program stopped.^M 0x00007ffff7daabdb in pipe () from /lib64/libc.so.6^M (gdb) FAIL: gdb.reverse/pipe-reverse.exp: continue to breakpoint: marker2 ... The current glibc on Tumbleweed is 2.35, which contains commit "linux: Implement pipe in terms of __NR_pipe2", and consequently syscall pipe2 is used in stead of syscall pipe. There is already support added for syscall pipe2 for aarch64 (which only has syscall pipe2, not syscall pipe), so enable the same for amd64, by: - adding amd64_sys_pipe2 in enum amd64_syscall - translating amd64_sys_pipe2 to gdb_sys_pipe2 in amd64_canonicalize_syscall Tested on x86_64-linux, specifically on: - openSUSE Tumbleweed (with glibc 2.35), and - openSUSE Leap 15.3 (with glibc 2.31). Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29056
Diffstat (limited to 'gdb/amd64-linux-tdep.c')
-rw-r--r--gdb/amd64-linux-tdep.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index 0e5194f..9a0759d 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -460,6 +460,9 @@ amd64_canonicalize_syscall (enum amd64_syscall syscall_number)
case amd64_x32_sys_pipe:
return gdb_sys_pipe;
+ case amd64_sys_pipe2:
+ return gdb_sys_pipe2;
+
case amd64_sys_select:
case amd64_x32_sys_select:
return gdb_sys_select;