gdb/gdb-tdep-support-catch-syscall-pipe2-for-i386.patch
Tom de Vries 96cf5fb95f - patches added (trunk backport):
* gdb-testsuite-make-gdb.base-annota1.exp-more-robust.patch
  * gdb-testsuite-fix-gdb.base-annota1.exp-with-pie.patch
- patches added (gdb-patches ml backport):
  * gdb-tdep-handle-pipe2-syscall-for-amd64.patch
  * gdb-testsuite-handle-pipe2-syscall-in-gdb.base-catch-syscall.exp.patch
  * gdb-tdep-support-catch-syscall-pipe2-for-i386.patch
- Maintenance script qa.sh:
  * Add Leap 15.4 x86_64 to know good configs.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=322
2022-05-05 13:53:30 +00:00

45 lines
1.5 KiB
Diff

[gdb/tdep] Support catch syscall pipe2 for i386
With test-case gdb.base/catch-syscall.exp and target board unix/-m32, we run
into:
...
(gdb) catch syscall pipe2^M
Unknown syscall name 'pipe2'.^M
(gdb) FAIL: gdb.base/catch-syscall.exp: determine pipe syscall: catch syscall pipe2
...
Fix this by:
- adding a pipe2 entry in gdb/syscalls/i386-linux.xml.in, and
- regenerating gdb/syscalls/i386-linux.xml using
"xsltproc --output i386-linux.xml apply-defaults.xsl i386-linux.xml.in".
Tested on x86_64-linux with native and unix/-m32.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29056
---
gdb/syscalls/i386-linux.xml | 1 +
gdb/syscalls/i386-linux.xml.in | 1 +
2 files changed, 2 insertions(+)
diff --git a/gdb/syscalls/i386-linux.xml b/gdb/syscalls/i386-linux.xml
index a783dd10af3..4a7a2345186 100644
--- a/gdb/syscalls/i386-linux.xml
+++ b/gdb/syscalls/i386-linux.xml
@@ -334,4 +334,5 @@
<syscall name="eventfd" number="323" groups="descriptor"/>
<syscall name="fallocate" number="324" groups="descriptor"/>
<syscall name="timerfd_settime" number="325" groups="descriptor"/>
+ <syscall name="pipe2" number="331" groups="descriptor"/>
</syscalls_info>
diff --git a/gdb/syscalls/i386-linux.xml.in b/gdb/syscalls/i386-linux.xml.in
index e778ab54043..13c4d1d99d4 100644
--- a/gdb/syscalls/i386-linux.xml.in
+++ b/gdb/syscalls/i386-linux.xml.in
@@ -337,4 +337,5 @@
<syscall name="eventfd" number="323"/>
<syscall name="fallocate" number="324"/>
<syscall name="timerfd_settime" number="325"/>
+ <syscall name="pipe2" number="331"/>
</syscalls_info>