summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorEugene Zemtsov <ezemtsov@google.com>2017-03-07 21:34:40 +0000
committerEugene Zemtsov <ezemtsov@google.com>2017-03-07 21:34:40 +0000
commit7993cc5eed5b9da08d169e706dbcd7ee90560192 (patch)
tree492a65a616c3d7564d815cbdc23ee61b4b8c4bde /lldb/source/Target/Process.cpp
parenta03cbcc6a6030e29437543871fb78520e31cfd02 (diff)
downloadbcm5719-llvm-7993cc5eed5b9da08d169e706dbcd7ee90560192.tar.gz
bcm5719-llvm-7993cc5eed5b9da08d169e706dbcd7ee90560192.zip
Make LLDB skip server-client roundtrip for signals that don't require any actions
If QPassSignals packaet is supported by lldb-server, lldb-client will utilize it and ask the server to ignore signals that don't require stops or notifications. Such signals will be immediately re-injected into inferior to continue normal execution. Differential Revision: https://reviews.llvm.org/D30520 llvm-svn: 297231
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index d0651e6bda7..e2006f4bbc3 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -2778,6 +2778,10 @@ Error Process::Launch(ProcessLaunchInfo &launch_info) {
if (!m_os_ap)
LoadOperatingSystemPlugin(false);
+ // We successfully launched the process and stopped,
+ // now it the right time to set up signal filters before resuming.
+ UpdateAutomaticSignalFiltering();
+
// Note, the stop event was consumed above, but not handled. This
// was done
// to give DidLaunch a chance to run. The target is either stopped
@@ -3257,6 +3261,10 @@ Error Process::PrivateResume() {
m_mod_id.GetStopID(), StateAsCString(m_public_state.GetValue()),
StateAsCString(m_private_state.GetValue()));
+ // If signals handing status changed we might want to update
+ // our signal filters before resuming.
+ UpdateAutomaticSignalFiltering();
+
Error error(WillResume());
// Tell the process it is about to resume before the thread list
if (error.Success()) {
@@ -6219,3 +6227,9 @@ bool Process::RouteAsyncStructuredData(
find_it->second->HandleArrivalOfStructuredData(*this, type_name, object_sp);
return true;
}
+
+Error Process::UpdateAutomaticSignalFiltering() {
+ // Default implementation does nothign.
+ // No automatic signal filtering to speak of.
+ return Error();
+}
OpenPOWER on IntegriCloud