This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Implement 'catch syscall' for gdbserver
- From: Josh Stone <jistone at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org, sergiodj at redhat dot com, palves at redhat dot com, philippe dot waroquiers at skynet dot be
- Date: Fri, 30 Oct 2015 10:39:03 -0700
- Subject: Re: [PATCH] Implement 'catch syscall' for gdbserver
- Authentication-results: sourceware.org; auth=none
- References: <1446169946-28117-1-git-send-email-jistone at redhat dot com> <83d1vw22sb dot fsf at gnu dot org>
On 10/30/2015 01:12 AM, Eli Zaretskii wrote:
> The documentation parts are OK, with this minor comment and one
> question. Here's the comment:
>
>> +Note that if a syscall not member of the list is reported, @value{GDBN}
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> "a syscall not in the list" sounds simpler and more clear, and doesn't
> change the meaning.
>
>> +will filter it if this syscall is not caught. It is however more efficient
>> +to only report the needed syscalls.
>
> The question is about the same sentence: maybe because I don't really
> use this stuff, I'm not sure I understand the distinction between
> "reported" and "caught" here: what does it mean for a syscall to be
> reported, but not caught? Perhaps this text should be clarified to
> not cause such confusion.
"Reported" refers to syscall stop packets sent over the wire, whereas
"caught" refers to whether the GDB user had `catch syscall N` matching
that particular syscall.
I suppose a lazy stub could just report every syscall it finds, ignoring
the filter list, and let GDB filter what should actually be caught on
its side. The new gdbserver is properly filtering though.
Actually, if that syscall list grows too big for a single packet
request, GDB will just send an unfiltered "QCatchSyscalls:1" and do the
filtering on its own anyway. But maybe that's orthogonal to the
documentation of the packet protocol.
Should I reword it from the perspective that a stub implementation might
not respect the filter list? Or should we disallow that possibility
altogether?