This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 1/4] 'catch syscall' feature -- Architecture-independent part
On Friday 07 November 2008 03:29:25, Sérgio Durigan Júnior wrote:
> Ok, I'll try to put the syscall_state in 'struct lwp_info'. Honestly, I
> don't remember now why I've chosen to put this variable inside
> thread_info, but of course you're way more capable of telling me how to
> make my design be more clever (and look more like GDB) :-).
Nah, you're doing yourself just fine. :-)
An alternative would be to add a new TARGET_WAITKIND_SYSCALL, for
targets that don't distinguish entry/exit, but this leaves me yet
If there any other way to distinguish entry/exit other than a toggle?
Toggles are prone to be fallible. E.g., if you *attach* to a program that
is doing a long syscall, and then start tracing that syscall,
is it possible that you hit the syscall exit first, so your toggle will
be inverted? That is, you'll report a syscall entry, when in fact, it
was a syscall exit, and so on for the following syscalls of the same lwp.