jingham created this revision.
jingham added reviewers: labath, JDevlieghere, krytarowski, emaste.
Herald added subscribers: lldb-commits, atanasyan, jrtc27, sdardis.
Herald added a project: LLDB.
jingham requested review of this revision.

The macOS LaunchServices agent sends a SIGCONT to the process it is managing in 
the process of starting up.  This means processes that lldb attaches to when 
run by this agent stop somewhere in their startup with a SIGCONT.  That's a bit 
annoying if you are trying to debug, and really annoying if you are running 
batch tests in the debugger, for instance.

That can be fixed by changing your "SIGCONT" handling, but when the issue came 
to my attention, it got me wondering whether stopping in the debugger for 
SIGCONT is really useful behavior?  For the most part this means some job 
control operation was going on, but do you actually want to stop again after 
something, for instance, stopped & resumed your app?  It seems to me unless you 
are explicitly debugging an interaction with this job control, stopping is just 
an annoyance.

So I'm proposing to change the default behavior to nonstop/noprint/pass from 
stop/print/pass.

I'm adding folks that are responsible for some of the other Unixen platforms as 
reviewers.  If anybody has a good use case where this would be useful as a 
default, please speak up and I'll ditch this revision (and just get the clients 
that deal with LS to change the handling on their own.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89019

Files:
  lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
  lldb/source/Plugins/Process/Utility/MipsLinuxSignals.cpp
  lldb/source/Target/UnixSignals.cpp


Index: lldb/source/Target/UnixSignals.cpp
===================================================================
--- lldb/source/Target/UnixSignals.cpp
+++ lldb/source/Target/UnixSignals.cpp
@@ -94,7 +94,7 @@
   AddSignal(16,     "SIGURG",     false,    false,  false,  "urgent condition 
on IO channel");
   AddSignal(17,     "SIGSTOP",    true,     true,   true,   "sendable stop 
signal not from tty");
   AddSignal(18,     "SIGTSTP",    false,    true,   true,   "stop signal from 
tty");
-  AddSignal(19,     "SIGCONT",    false,    true,   true,   "continue a 
stopped process");
+  AddSignal(19,     "SIGCONT",    false,    false,  false,   "continue a 
stopped process");
   AddSignal(20,     "SIGCHLD",    false,    false,  false,  "to parent on 
child stop or exit");
   AddSignal(21,     "SIGTTIN",    false,    true,   true,   "to readers 
process group upon background tty read");
   AddSignal(22,     "SIGTTOU",    false,    true,   true,   "to readers 
process group upon background tty write");
Index: lldb/source/Plugins/Process/Utility/MipsLinuxSignals.cpp
===================================================================
--- lldb/source/Plugins/Process/Utility/MipsLinuxSignals.cpp
+++ lldb/source/Plugins/Process/Utility/MipsLinuxSignals.cpp
@@ -45,7 +45,7 @@
             "SIGPOLL");
   AddSignal(23, "SIGSTOP", true, true, true, "process stop");
   AddSignal(24, "SIGTSTP", false, true, true, "tty stop");
-  AddSignal(25, "SIGCONT", false, true, true, "process continue");
+  AddSignal(25, "SIGCONT", false, false, false, "process continue");
   AddSignal(26, "SIGTTIN", false, true, true, "background tty read");
   AddSignal(27, "SIGTTOU", false, true, true, "background tty write");
   AddSignal(28, "SIGVTALRM", false, true, true, "virtual time alarm");
Index: lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
===================================================================
--- lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
+++ lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
@@ -37,7 +37,7 @@
   AddSignal(16, "SIGSTKFLT", false, true, true, "stack fault");
   AddSignal(17, "SIGCHLD", false, false, true, "child status has changed",
             "SIGCLD");
-  AddSignal(18, "SIGCONT", false, true, true, "process continue");
+  AddSignal(18, "SIGCONT", false, false, false, "process continue");
   AddSignal(19, "SIGSTOP", true, true, true, "process stop");
   AddSignal(20, "SIGTSTP", false, true, true, "tty stop");
   AddSignal(21, "SIGTTIN", false, true, true, "background tty read");


Index: lldb/source/Target/UnixSignals.cpp
===================================================================
--- lldb/source/Target/UnixSignals.cpp
+++ lldb/source/Target/UnixSignals.cpp
@@ -94,7 +94,7 @@
   AddSignal(16,     "SIGURG",     false,    false,  false,  "urgent condition on IO channel");
   AddSignal(17,     "SIGSTOP",    true,     true,   true,   "sendable stop signal not from tty");
   AddSignal(18,     "SIGTSTP",    false,    true,   true,   "stop signal from tty");
-  AddSignal(19,     "SIGCONT",    false,    true,   true,   "continue a stopped process");
+  AddSignal(19,     "SIGCONT",    false,    false,  false,   "continue a stopped process");
   AddSignal(20,     "SIGCHLD",    false,    false,  false,  "to parent on child stop or exit");
   AddSignal(21,     "SIGTTIN",    false,    true,   true,   "to readers process group upon background tty read");
   AddSignal(22,     "SIGTTOU",    false,    true,   true,   "to readers process group upon background tty write");
Index: lldb/source/Plugins/Process/Utility/MipsLinuxSignals.cpp
===================================================================
--- lldb/source/Plugins/Process/Utility/MipsLinuxSignals.cpp
+++ lldb/source/Plugins/Process/Utility/MipsLinuxSignals.cpp
@@ -45,7 +45,7 @@
             "SIGPOLL");
   AddSignal(23, "SIGSTOP", true, true, true, "process stop");
   AddSignal(24, "SIGTSTP", false, true, true, "tty stop");
-  AddSignal(25, "SIGCONT", false, true, true, "process continue");
+  AddSignal(25, "SIGCONT", false, false, false, "process continue");
   AddSignal(26, "SIGTTIN", false, true, true, "background tty read");
   AddSignal(27, "SIGTTOU", false, true, true, "background tty write");
   AddSignal(28, "SIGVTALRM", false, true, true, "virtual time alarm");
Index: lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
===================================================================
--- lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
+++ lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
@@ -37,7 +37,7 @@
   AddSignal(16, "SIGSTKFLT", false, true, true, "stack fault");
   AddSignal(17, "SIGCHLD", false, false, true, "child status has changed",
             "SIGCLD");
-  AddSignal(18, "SIGCONT", false, true, true, "process continue");
+  AddSignal(18, "SIGCONT", false, false, false, "process continue");
   AddSignal(19, "SIGSTOP", true, true, true, "process stop");
   AddSignal(20, "SIGTSTP", false, true, true, "tty stop");
   AddSignal(21, "SIGTTIN", false, true, true, "background tty read");
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to