[ Re: [PATCH][gdb/tdep] Support catch syscall pipe2 for i386 ] On 5/5/22 15:20, Simon Marchi wrote: >> [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". > > The patch LGTM, assuming this is the right number for pipe2 :). > Thanks for the review, committed. And, I'd say, yes, the correct number: ... $ grep pipe2 ./arch/x86/entry/syscalls/syscall_32.tbl 331 i386 pipe2 sys_pipe2 ... > I suppose we are missing more syscalls than that, given that new > syscalls are added regularly, e.g. rseq: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d7822b1e24f2 > > As long as rseq is not listed in this file, it means a user wouldn't be > able to use "catch syscall rseq", I suppose? We would need a procedure > to add new syscalls periodically. > > Could we add a simple Makefile (as a separate patch) that contains these > xslt commands? I think you searched a little bit how those files were > originally generated, so it would be nice to save the trouble in the > future. Good idea, how about this? Thanks, - Tom