Messages in this thread | | | Date | Wed, 2 Mar 2011 16:25:50 +0100 | From | Tejun Heo <> | Subject | Re: [RFC] Proposal for ptrace improvements |
| |
Hey,
On Wed, Mar 02, 2011 at 04:16:50PM +0100, Denys Vlasenko wrote: > Assuming the program is run under simple debugger which > resumes execution using PTRACE_CONT(sig) on signal delivery stops, > with PTRACE_CONT(0) on ptrace stops, > and doesn't do any PTRACE_CONT on job control stops, > with your proposal the debugger will see and perform > the following actions: > > waitpid... > <------ kill -STOP 16382 > waitpid returns WSTOPPED, WSTOPSIG = SIGSTOP > ptrace(PTRACE_GETSIGINFO) doesn't fail (=> it's signal delivery) > ptrace(PTRACE_CONT, SIGSTOP) > waitpid returns WSTOPPED, WSTOPSIG = SIGSTOP > ptrace(PTRACE_GETSIGINFO) fails (=> it's job control stop) > waitpid... > <------ kill -ABRT 16382 > ...debugger doesn't wake up... > <------ kill -WINCH 16382 > ...debugger doesn't wake up... > <------ kill -CONT 16382 > waitpid returns WSTOPPED, WSTOPSIG = SIGTRAP (it's a ptrace-stop) > ptrace(PTRACE_CONT, 0) > waitpid returns WSTOPPED, WSTOPSIG = SIGWINCH > ptrace(PTRACE_CONT, SIGWINCH) > waitpid returns WSTOPPED, WSTOPSIG = SIGCONT > ptrace(PTRACE_CONT, SIGCONT) > waitpid returns WSTOPPED, WSTOPSIG = SIGABRT > ptrace(PTRACE_CONT, SIGABRT) > > Correct?
Yeah, seems correct to me.
Thanks.
-- tejun
| |