[lkml]   [2011]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] Proposal for ptrace improvements
On 03/03, Oleg Nesterov wrote:
> I'll ask the questions later.

Right now I do not see any holes (but I'll try more ;)

One question, to ensure I really understand you. To simplify,
consider this particular example.


int main(void)
kill(SIGSTOP, getpid());

printf("I am running\n");

for (;;)

To simplify again, suppose that the debugger attaches when it is
already stopped, then it does PTRACE_CONT(0).

In this case the tracee remains SIGNAL_STOP_STOPPED but prints
"I am running" and enters the endless loop.

(the new debugger can do PTRACE_SEIZE after that and "return"
it to the stopped state without affecting jctl state).

Now, if SIGCONT comes (from anywhere) it clears SIGNAL_STOP_STOPPED,
the tracee traps and reports this event to debugger.


And, once again. In the mt case, I assume that SIGCONT makes
every traced thread to report this event individually, right?

(I am talking about the case when the group-stop was finished,
iow "every" probably means the threads which participated and
reported CLD_STOPPED to the debugger).

In both cases, later then this SIGCONT will be reported again
as any "normal" signal when some thread dequeues it.

Is my understanding correct?



 \ /
  Last update: 2011-03-03 21:33    [W:0.440 / U:22.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site