[lldb-dev] [Bug 23574] New: lldb is unable to pass SIGSTOP to the inferior correctly

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 19 07:44:13 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23574

            Bug ID: 23574
           Summary: lldb is unable to pass SIGSTOP to the inferior
                    correctly
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at cs.uiuc.edu
          Reporter: labath at google.com
    Classification: Unclassified

Outside debugger SIGSTOP, SIGSTP, SIGTTIN or SIGTTOU suspend the process until
it receives a SIGCONT. Simulating this behaviour in the debugger is tricky.
>From ptrace manpage:
As  of Linux 2.6.38, after the tracer sees the tracee ptrace-stop and until it
restarts or kills it, the tracee will not run, and will not send notifications 
(except  SIGKILL death) to the tracer, even if the tracer enters into another
waitpid(2) call.

The kernel behavior described in the previous paragraph causes a problem with
transparent handling of stopping signals.  If the tracer restarts the tracee
after  group-stop, the  stopping signal is effectively ignored—the tracee
doesn't remain stopped, it runs.  If the tracer doesn't restart the tracee
before  entering  into  the  next  waitpid(2), future SIGCONT signals will not
be reported to the tracer; this would cause the SIGCONT signals to have no
effect on the tracee.


The manpage suggests this can be implemented by restarting the process with
PTRACE_LISTEN. However, this requires attaching with PTRACE_SIEZE, which is
pretty big change for such a minute feature.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150519/e327e8de/attachment.html>


More information about the lldb-dev mailing list