<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - lldb is unable to pass SIGSTOP to the inferior correctly"
href="https://llvm.org/bugs/show_bug.cgi?id=23574">23574</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>lldb is unable to pass SIGSTOP to the inferior correctly
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Reporter</th>
<td>labath@google.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>