summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/linux/Host.cpp
diff options
context:
space:
mode:
authorTodd Fiala <todd.fiala@gmail.com>2014-08-29 17:35:57 +0000
committerTodd Fiala <todd.fiala@gmail.com>2014-08-29 17:35:57 +0000
commit4ceced3f597f71e3b28d9e4f208d2786fff1ff45 (patch)
tree362e9f32a697d2b21c9f68c67e09646f00249e4c /lldb/source/Host/linux/Host.cpp
parentb5796cb40e6f7a5e504d8da41d0f31d4539d7110 (diff)
downloadbcm5719-llvm-4ceced3f597f71e3b28d9e4f208d2786fff1ff45.tar.gz
bcm5719-llvm-4ceced3f597f71e3b28d9e4f208d2786fff1ff45.zip
Consolidate UnixSignals setting/getting in Process.
See http://reviews.llvm.org/D5108 for details. This change does the following: * eliminates the Process::GetUnixSignals() virtual method and replaces with a fixed getter. * replaces the Process UnixSignals storage with a shared pointer. * adds a Process constructor variant that can be passed the UnixSignalsSP. When the constructor without the UnixSignalsSP is specified, the Host's default UnixSignals is used. * adds a host-specific version of GetUnixSignals() that is used when we need the host's appropriate UnixSignals variant. * replaces GetUnixSignals() overrides in PlatformElfCore, ProcessGDBRemote, ProcessFreeBSD and ProcessLinux with code that appropriately sets the Process::UnixSignals for the process. This change also enables some future patches that will enable llgs to be used for local Linux debugging. llvm-svn: 216748
Diffstat (limited to 'lldb/source/Host/linux/Host.cpp')
-rw-r--r--lldb/source/Host/linux/Host.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Host/linux/Host.cpp b/lldb/source/Host/linux/Host.cpp
index a7cca2cb44f..0bad90ee22e 100644
--- a/lldb/source/Host/linux/Host.cpp
+++ b/lldb/source/Host/linux/Host.cpp
@@ -30,6 +30,7 @@
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Symbol/ObjectFile.h"
#include "Plugins/Process/Linux/ProcFileReader.h"
+#include "Plugins/Process/Utility/LinuxSignals.h"
using namespace lldb;
using namespace lldb_private;
@@ -424,3 +425,11 @@ Host::GetEnvironment (StringList &env)
env.AppendString(env_entry);
return i;
}
+
+const lldb_private::UnixSignalsSP&
+Host::GetUnixSignals ()
+{
+ static const lldb_private::UnixSignalsSP s_unix_signals_sp (new process_linux::LinuxSignals ());
+ return s_unix_signals_sp;
+}
+
OpenPOWER on IntegriCloud