This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v4] Implement 'catch syscall' for gdbserver
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Josh Stone <jistone at redhat dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, Pedro Alves <palves at redhat dot com>, gdb-patches at sourceware dot org, philippe dot waroquiers at skynet dot be, sergiodj at redhat dot com, eliz at gnu dot org, xdje42 at gmail dot com, scox at redhat dot com
- Date: Fri, 01 Apr 2016 14:05:18 +0100
- Subject: Re: [PATCH v4] Implement 'catch syscall' for gdbserver
- Authentication-results: sourceware.org; auth=none
- References: <1449196006-13759-2-git-send-email-jistone at redhat dot com> <1452308954-13679-1-git-send-email-jistone at redhat dot com> <5694EC0E dot 2080904 at redhat dot com> <56954F8C dot 6010100 at redhat dot com> <56955283 dot 1060502 at redhat dot com> <56955B84 dot 7050905 at redhat dot com> <86mvphs6kv dot fsf at gmail dot com> <56FAC588 dot 6060200 at redhat dot com> <56FB1486 dot 60208 at redhat dot com> <86io04rw7k dot fsf at gmail dot com> <56FC78E3 dot 6020300 at redhat dot com>
Josh Stone <jistone@redhat.com> writes:
> Well, sure, but I have no idea where that somewhere else could be.
>
> Note these architectures do work for other syscall returns. It's just
> that execve is a bit special by switching the whole process out.
I talked with a kernel people, looks GDB can't fetch the syscall number
on execve exit.
>
> I suppose we could try to save the number on syscall entry, and just
> report that again when it returns. But it's not 100% sure that we'll
Yes, that is what I am thinking too.
> see every entry first. For instance, one could 'catch execve' first,
> which will continue until PTRACE_EVENT_EXEC mid-syscall, then turn on
> 'catch syscall' and see what returns.
> (This is similar to what test_catch_syscall_mid_vfork checks.)
Yeah, we can't guarantee syscall enter comes into first. I doubt
'lp->syscall_state' is confused in this case too, no?
--
Yao (éå)