Change ptrace_resume() to report the artificial SYSCALL_EXIT stop when needed.
This is trivial, but I am not sure yet what should we do with the stacked JCTL stops. ptrace_report_clone() is not exactly right too, will be fixed later. This and the next patches add another switch(->ev_name), I'll try to merge them into the single switch() later. --- kernel/ptrace.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) --- PU/kernel/ptrace.c~55_STACKED_EVENTS 2009-10-01 23:06:36.000000000 +0200 +++ PU/kernel/ptrace.c 2009-10-01 23:32:55.000000000 +0200 @@ -891,6 +891,20 @@ static void do_ptrace_resume(struct utra break; } + if (request == PTRACE_SYSCALL) { + switch (context->ev_name) { + case PTRACE_EVENT_EXEC: + case PTRACE_EVENT_FORK: + case PTRACE_EVENT_CLONE: + case PTRACE_EVENT_VFORK_DONE: + context->ev_name = PTRACE_EVENT_SYSCALL; + context->ev_code = (context->options & PTRACE_O_TRACESYSGOOD) ? + (SIGTRAP | 0x80) : SIGTRAP; + do_ptrace_notify_stop(context, tracee); + return; + } + } + context->ev_name = 0; context->resume = action; ptrace_wake_up(engine, tracee, action);