[lkml]   [2011]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] Proposal for ptrace improvements
On Tue, Mar 01, 2011 at 06:21:49PM +0100, Denys Vlasenko wrote:
> I'm not saying that I like that other proposal more -
> I am saying that your proposal needs to specify whether strace
> needs to be changed, and how exactly, to correctly handle
> SIGSTOPs under this proposal.

Yeah, definitely.

> > gdb can do whatever it wants to do but I don't think the above needs
> > fixing.  In the first case, the user is explicitly telling gdb to
> > continue the tracee, so it continues as it always has.
> It does not look like that to me.
> User attached to some process. User might be unaware that
> the process is currently stopped (imagine a group of processes
> which use SIGSTOP/SIGCONT in their normal interactions).
> User peeked some state, and then wants to let process
> continue whatever process was doing, but remain in the debugger.
> What user did not know is that "whatever process was doing" =
> "being stopped by SIGSTOP, waiting to be woken up".
> Therefore, if "continue" makes process run, it does not
> return process to whatever process was doing.
> > In the latter
> > case, the debugging session is over.  The tracee now should do
> > whatever it's supposed to do.
> It should do that in both cases.

Maybe it should, maybe not, but that's mostly irrelevant because the
described behavior is the current behavior. There is no
continue-if-not-job-control-stopped operation and we shouldn't change
that beneath gdb because otherwise not only the behavior changes
unexpectedly but also the user doesn't have a way to resume the tracee
from within gdb. The user has to go to another terminal and send
SIGCONT explicitly. If gdb wants to improve the behavior, it sure can
implement proper job control behavior using the proposed changes.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2011-03-01 19:37    [W:0.110 / U:11.116 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site