This revision was automatically updated to reflect the committed changes.
Closed by commit rG4bcadd66864b: [lldb/driver] Fix SIGTSTP handling (authored
by labath).
Changed prior to commit:
https://reviews.llvm.org/D120320?vs=412643&id=414078#toc
Repository:
rG LLVM Github Monorepo
CHANGES S
mgorny accepted this revision.
mgorny added a comment.
This revision is now accepted and ready to land.
LGTM (but I cannot test)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120320/new/
https://reviews.llvm.org/D120320
___
labath updated this revision to Diff 412643.
labath marked 3 inline comments as done.
labath added a comment.
Address mgorny's comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120320/new/
https://reviews.llvm.org/D120320
Files:
lldb/packa
mgorny added inline comments.
Herald added a project: All.
Comment at: lldb/packages/Python/lldbsuite/test/lldbpexpect.py:27
+def launch(self, executable=None, extra_args=None, timeout=60,
+dimensions=None, run_under=None, post_spawn=None):
logfile = geta
andcarminati added inline comments.
Comment at: lldb/tools/driver/Driver.cpp:673-674
+static void sigtstp_handler(int signo) {
if (g_driver != nullptr)
g_driver->GetDebugger().SaveInputTerminalState();
labath wrote:
> JDevlieghere wrote:
> > andcarminat
labath added inline comments.
Comment at: lldb/tools/driver/Driver.cpp:673-674
+static void sigtstp_handler(int signo) {
if (g_driver != nullptr)
g_driver->GetDebugger().SaveInputTerminalState();
JDevlieghere wrote:
> andcarminati wrote:
> > JDevliegher
JDevlieghere added inline comments.
Comment at: lldb/tools/driver/Driver.cpp:673-674
+static void sigtstp_handler(int signo) {
if (g_driver != nullptr)
g_driver->GetDebugger().SaveInputTerminalState();
andcarminati wrote:
> JDevlieghere wrote:
> > labat
andcarminati added inline comments.
Comment at: lldb/tools/driver/Driver.cpp:673-674
+static void sigtstp_handler(int signo) {
if (g_driver != nullptr)
g_driver->GetDebugger().SaveInputTerminalState();
JDevlieghere wrote:
> labath wrote:
> > JDevliegher
JDevlieghere added inline comments.
Comment at: lldb/tools/driver/Driver.cpp:673-674
+static void sigtstp_handler(int signo) {
if (g_driver != nullptr)
g_driver->GetDebugger().SaveInputTerminalState();
labath wrote:
> JDevlieghere wrote:
> > I see an op
labath added inline comments.
Comment at: lldb/tools/driver/Driver.cpp:673-674
+static void sigtstp_handler(int signo) {
if (g_driver != nullptr)
g_driver->GetDebugger().SaveInputTerminalState();
JDevlieghere wrote:
> I see an opportunity for a little R
JDevlieghere added inline comments.
Comment at: lldb/tools/driver/Driver.cpp:673-674
+static void sigtstp_handler(int signo) {
if (g_driver != nullptr)
g_driver->GetDebugger().SaveInputTerminalState();
I see an opportunity for a little RAII helper.
Re
DavidSpickett added a comment.
Got it, thanks for the explanation.
> What's important is that the second signal gets delivered (not "handled",
> because at that point we have removed the handler) to the same thread, as
> that's the only one we're sure that will have it unblocked (although, in
labath marked 4 inline comments as done.
labath added a comment.
The behavior of the stop signals (SIGTTIN, SIGTTOU, SIGTSTP) is this:
- if the process has a signal handler, then the kernel picks an arbitrary
thread (which does not have the signal blocked) to handle it. As far as the
kernel is
DavidSpickett added a comment.
I think I mostly get it and the code looks fine, but my signal foo is weak so
@mgorny should give a second look.
> we use raise to send the signal, which makes sure it gets delivered to the
> thread which is running the handler
https://man7.org/linux/man-pages/ma
labath marked 4 inline comments as done.
labath added inline comments.
Comment at: lldb/test/API/driver/job_control/TestJobControl.py:9
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+from lldbsuite.test.lldbpexpect import PExpectTest
labath updated this revision to Diff 410800.
labath added a comment.
Add comments, delete unused code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120320/new/
https://reviews.llvm.org/D120320
Files:
lldb/packages/Python/lldbsuite/test/lldbpexp
DavidSpickett added inline comments.
Comment at: lldb/test/API/driver/job_control/TestJobControl.py:9
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+from lldbsuite.test.lldbpexpect import PExpectTest
Unused import?
labath created this revision.
labath added reviewers: mgorny, DavidSpickett.
labath requested review of this revision.
Herald added a project: LLDB.
Our SIGTSTP handler was working, but that was mostly accidental.
The reason it worked is because lldb is multithreaded for most of its
lifetime and
18 matches
Mail list logo