lkml.org 
[lkml]   [2011]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    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.

    Thanks.

    --
    tejun
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2011-03-01 19:37    [W:0.025 / U:92.256 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site