summaryrefslogtreecommitdiff
path: root/include/lldb/Host
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-07-19 07:03:07 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-07-19 07:03:07 +0000
commita884e649599e13d58ce6d2b2a0ce8091ceb48dac (patch)
treef527514e113dd4f771eef3d39e5a5d2da36b8552 /include/lldb/Host
parente75e363cb71a7339552b9d943e78ac62b737379b (diff)
Notes
Diffstat (limited to 'include/lldb/Host')
-rw-r--r--include/lldb/Host/MainLoop.h2
-rw-r--r--include/lldb/Host/PosixApi.h2
-rw-r--r--include/lldb/Host/SocketAddress.h5
-rw-r--r--include/lldb/Host/common/NativeProcessProtocol.h7
-rw-r--r--include/lldb/Host/common/NativeThreadProtocol.h6
5 files changed, 14 insertions, 8 deletions
diff --git a/include/lldb/Host/MainLoop.h b/include/lldb/Host/MainLoop.h
index a722348b8843e..5ac145ff865b6 100644
--- a/include/lldb/Host/MainLoop.h
+++ b/include/lldb/Host/MainLoop.h
@@ -12,8 +12,8 @@
#include "lldb/Host/Config.h"
#include "lldb/Host/MainLoopBase.h"
-
#include "llvm/ADT/DenseMap.h"
+#include <csignal>
#if !HAVE_PPOLL && !HAVE_SYS_EVENT_H
#define SIGNAL_POLLING_UNSUPPORTED 1
diff --git a/include/lldb/Host/PosixApi.h b/include/lldb/Host/PosixApi.h
index 02324307dc9e5..d5c48dd6d1705 100644
--- a/include/lldb/Host/PosixApi.h
+++ b/include/lldb/Host/PosixApi.h
@@ -16,6 +16,8 @@
#if defined(_WIN32)
#include "lldb/Host/windows/PosixApi.h"
+#else
+#include <unistd.h>
#endif
#endif
diff --git a/include/lldb/Host/SocketAddress.h b/include/lldb/Host/SocketAddress.h
index 8e9026ba962cb..ebc6f4e57ee8a 100644
--- a/include/lldb/Host/SocketAddress.h
+++ b/include/lldb/Host/SocketAddress.h
@@ -152,6 +152,11 @@ public:
bool IsAnyAddr() const;
//------------------------------------------------------------------
+ // Returns true if the socket is INADDR_LOOPBACK
+ //------------------------------------------------------------------
+ bool IsLocalhost() const;
+
+ //------------------------------------------------------------------
// Direct access to all of the sockaddr structures
//------------------------------------------------------------------
struct sockaddr &sockaddr() {
diff --git a/include/lldb/Host/common/NativeProcessProtocol.h b/include/lldb/Host/common/NativeProcessProtocol.h
index 5f2157510c0ac..9671d710fc024 100644
--- a/include/lldb/Host/common/NativeProcessProtocol.h
+++ b/include/lldb/Host/common/NativeProcessProtocol.h
@@ -33,8 +33,7 @@ class ResumeActionList;
//------------------------------------------------------------------
// NativeProcessProtocol
//------------------------------------------------------------------
-class NativeProcessProtocol
- : public std::enable_shared_from_this<NativeProcessProtocol> {
+class NativeProcessProtocol {
friend class SoftwareBreakpoint;
public:
@@ -268,7 +267,7 @@ public:
/// A NativeProcessProtocol shared pointer if the operation succeeded or
/// an error object if it failed.
//------------------------------------------------------------------
- virtual llvm::Expected<NativeProcessProtocolSP>
+ virtual llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
Launch(ProcessLaunchInfo &launch_info, NativeDelegate &native_delegate,
MainLoop &mainloop) const = 0;
@@ -292,7 +291,7 @@ public:
/// A NativeProcessProtocol shared pointer if the operation succeeded or
/// an error object if it failed.
//------------------------------------------------------------------
- virtual llvm::Expected<NativeProcessProtocolSP>
+ virtual llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
Attach(lldb::pid_t pid, NativeDelegate &native_delegate,
MainLoop &mainloop) const = 0;
};
diff --git a/include/lldb/Host/common/NativeThreadProtocol.h b/include/lldb/Host/common/NativeThreadProtocol.h
index 2e6c96a34cf5c..d96f713111856 100644
--- a/include/lldb/Host/common/NativeThreadProtocol.h
+++ b/include/lldb/Host/common/NativeThreadProtocol.h
@@ -23,7 +23,7 @@ namespace lldb_private {
class NativeThreadProtocol
: public std::enable_shared_from_this<NativeThreadProtocol> {
public:
- NativeThreadProtocol(NativeProcessProtocol *process, lldb::tid_t tid);
+ NativeThreadProtocol(NativeProcessProtocol &process, lldb::tid_t tid);
virtual ~NativeThreadProtocol() {}
@@ -46,7 +46,7 @@ public:
lldb::tid_t GetID() const { return m_tid; }
- NativeProcessProtocolSP GetProcess();
+ NativeProcessProtocol &GetProcess() { return m_process; }
// ---------------------------------------------------------------------
// Thread-specific watchpoints
@@ -64,7 +64,7 @@ public:
virtual Status RemoveHardwareBreakpoint(lldb::addr_t addr) = 0;
protected:
- NativeProcessProtocolWP m_process_wp;
+ NativeProcessProtocol &m_process;
lldb::tid_t m_tid;
};
}