+ if (context-siginfo)
+ return ptrace_rw_siginfo(tracee, context, info, false);
- return error;
+ memset(info, 0, sizeof(*info));
+ info-si_signo = SIGTRAP;
+ info-si_code = context-ev_code; // XXX: ev_code was already cleared!!!
+ info-si_pid =
On 10/07, Roland McGrath wrote:
+ if (context-siginfo)
+ return ptrace_rw_siginfo(tracee, context, info, false);
- return error;
+ memset(info, 0, sizeof(*info));
+ info-si_signo = SIGTRAP;
+ info-si_code = context-ev_code; // XXX: ev_code was already cleared!!!
- Change ptrace_getsiginfo() to use ptrace_rw_siginfo().
- Fix the semantics. We should return EINVAL only if the tracee
was stopped. If it didn't report the signal, we fill siginfo
like ptrace_notify() did.
Note! Currently do_ptrace_notify_stop() clears context-ev_code for
debugging