summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/POSIX
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/Plugins/Process/POSIX
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/Plugins/Process/POSIX')
-rw-r--r--lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp10
-rw-r--r--lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h10
2 files changed, 4 insertions, 16 deletions
diff --git a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
index 858d8ae608e..f340631c7d0 100644
--- a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
+++ b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
@@ -70,8 +70,8 @@ ProcessPOSIX::Initialize()
//------------------------------------------------------------------------------
// Constructors and destructors.
-ProcessPOSIX::ProcessPOSIX(Target& target, Listener &listener)
- : Process(target, listener),
+ProcessPOSIX::ProcessPOSIX(Target& target, Listener &listener, UnixSignalsSP &unix_signals_sp)
+ : Process(target, listener, unix_signals_sp),
m_byte_order(lldb::endian::InlHostByteOrder()),
m_monitor(NULL),
m_module(NULL),
@@ -878,12 +878,6 @@ ProcessPOSIX::PutSTDIN(const char *buf, size_t len, Error &error)
return status;
}
-UnixSignals &
-ProcessPOSIX::GetUnixSignals()
-{
- return m_signals;
-}
-
//------------------------------------------------------------------------------
// Utility functions.
diff --git a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h
index a429b3c8264..033accf17f2 100644
--- a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h
+++ b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h
@@ -18,7 +18,6 @@
// Other libraries and framework includes
#include "lldb/Target/Process.h"
-#include "lldb/Target/UnixSignals.h"
#include "ProcessMessage.h"
class ProcessMonitor;
@@ -33,7 +32,8 @@ public:
// Constructors and destructors
//------------------------------------------------------------------
ProcessPOSIX(lldb_private::Target& target,
- lldb_private::Listener &listener);
+ lldb_private::Listener &listener,
+ lldb_private::UnixSignalsSP &unix_signals_sp);
virtual
~ProcessPOSIX();
@@ -154,9 +154,6 @@ public:
ProcessMonitor &
GetMonitor() { assert(m_monitor); return *m_monitor; }
- lldb_private::UnixSignals &
- GetUnixSignals();
-
const char *GetFilePath(const lldb_private::FileAction *file_action, const char *default_path);
/// Stops all threads in the process.
@@ -192,9 +189,6 @@ protected:
/// Drive any exit events to completion.
bool m_exit_now;
- /// OS-specific signal set.
- lldb_private::UnixSignals m_signals;
-
/// Returns true if the process has exited.
bool HasExited();
OpenPOWER on IntegriCloud