diff options
Diffstat (limited to 'include/lldb/Host/common/NativeProcessProtocol.h')
-rw-r--r-- | include/lldb/Host/common/NativeProcessProtocol.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/include/lldb/Host/common/NativeProcessProtocol.h b/include/lldb/Host/common/NativeProcessProtocol.h index 9671d710fc024..bd8b8744b115d 100644 --- a/include/lldb/Host/common/NativeProcessProtocol.h +++ b/include/lldb/Host/common/NativeProcessProtocol.h @@ -10,8 +10,12 @@ #ifndef liblldb_NativeProcessProtocol_h_ #define liblldb_NativeProcessProtocol_h_ +#include "NativeBreakpointList.h" +#include "NativeThreadProtocol.h" +#include "NativeWatchpointList.h" #include "lldb/Host/Host.h" #include "lldb/Host/MainLoop.h" +#include "lldb/Utility/ArchSpec.h" #include "lldb/Utility/Status.h" #include "lldb/Utility/TraceOptions.h" #include "lldb/lldb-private-forward.h" @@ -23,9 +27,6 @@ #include "llvm/Support/MemoryBuffer.h" #include <vector> -#include "NativeBreakpointList.h" -#include "NativeWatchpointList.h" - namespace lldb_private { class MemoryRegionInfo; class ResumeActionList; @@ -100,7 +101,7 @@ public: virtual size_t UpdateThreads() = 0; - virtual bool GetArchitecture(ArchSpec &arch) const = 0; + virtual const ArchSpec &GetArchitecture() const = 0; //---------------------------------------------------------------------- // Breakpoint functions @@ -151,7 +152,9 @@ public: bool CanResume() const { return m_state == lldb::eStateStopped; } - bool GetByteOrder(lldb::ByteOrder &byte_order) const; + lldb::ByteOrder GetByteOrder() const { + return GetArchitecture().GetByteOrder(); + } virtual llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> GetAuxvData() const = 0; @@ -166,15 +169,15 @@ public: //---------------------------------------------------------------------- // Access to threads //---------------------------------------------------------------------- - NativeThreadProtocolSP GetThreadAtIndex(uint32_t idx); + NativeThreadProtocol *GetThreadAtIndex(uint32_t idx); - NativeThreadProtocolSP GetThreadByID(lldb::tid_t tid); + NativeThreadProtocol *GetThreadByID(lldb::tid_t tid); void SetCurrentThreadID(lldb::tid_t tid) { m_current_thread_id = tid; } lldb::tid_t GetCurrentThreadID() { return m_current_thread_id; } - NativeThreadProtocolSP GetCurrentThread() { + NativeThreadProtocol *GetCurrentThread() { return GetThreadByID(m_current_thread_id); } @@ -401,7 +404,7 @@ public: protected: lldb::pid_t m_pid; - std::vector<NativeThreadProtocolSP> m_threads; + std::vector<std::unique_ptr<NativeThreadProtocol>> m_threads; lldb::tid_t m_current_thread_id = LLDB_INVALID_THREAD_ID; mutable std::recursive_mutex m_threads_mutex; @@ -461,7 +464,7 @@ protected: // ----------------------------------------------------------- void NotifyDidExec(); - NativeThreadProtocolSP GetThreadByIDUnlocked(lldb::tid_t tid); + NativeThreadProtocol *GetThreadByIDUnlocked(lldb::tid_t tid); // ----------------------------------------------------------- // Static helper methods for derived classes. |