[PATCH][gdb/tdep] Support catch syscall pipe2 for i386

Tom de Vries tdevries@suse.de
Thu May 5 11:49:03 GMT 2022


[ was: Re: [PATCH, v2][gdb/testsuite] Handle pipe2 syscall in 
gdb.base/catch-syscall.exp ]

On 5/5/22 13:47, Tom de Vries wrote:
> On 5/3/22 16:57, Tom de Vries wrote:
>> Hi,
>>
>> When running test-case gdb.reverse/pipe-reverse.exp on openSUSE 
>> Tumbleweed,
>> I run into:
>> ...
>> (gdb) continue^M
>> Continuing.^M
>> ^M
>> Catchpoint 2 (returned from syscall pipe2), in pipe () from 
>> /lib64/libc.so.6^M
>> (gdb) FAIL: gdb.base/catch-syscall.exp: without arguments: \
>>    syscall pipe has returned
>> ...
>>
>> 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.
>>
>> Fix this by detecting whether syscall pipe or pipe2 is used before 
>> running the tests.
>>
>> 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
>>
>> Any comments?
>>
> 
> I'm submitting a v2.  I found out that with target board unix/-m32, 
> pipe2 is not recognized as syscall name (which I'll fix in a follow-up 
> patch), so I made the test robust against this, by using the syscall 
> number instead.

And this is that follow-up patch.

Any comments?

Thanks,
- Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-gdb-tdep-Support-catch-syscall-pipe2-for-i386.patch
Type: text/x-patch
Size: 1585 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/gdb-patches/attachments/20220505/8826c971/attachment.bin>


More information about the Gdb-patches mailing list