diff options
Diffstat (limited to 'source/Plugins/Process/Utility/ThreadMemory.h')
| -rw-r--r-- | source/Plugins/Process/Utility/ThreadMemory.h | 92 | 
1 files changed, 43 insertions, 49 deletions
| diff --git a/source/Plugins/Process/Utility/ThreadMemory.h b/source/Plugins/Process/Utility/ThreadMemory.h index 07eb45dcb431b..1e7cbfa448153 100644 --- a/source/Plugins/Process/Utility/ThreadMemory.h +++ b/source/Plugins/Process/Utility/ThreadMemory.h @@ -1,4 +1,4 @@ -//===-- ThreadMemory.h -----------------------------------------*- C++ -*-===// +//===-- ThreadMemory.h ------------------------------------------*- C++ -*-===//  //  //                     The LLVM Compiler Infrastructure  // @@ -10,13 +10,18 @@  #ifndef liblldb_ThreadMemory_h_  #define liblldb_ThreadMemory_h_ +// C Includes +// C++ Includes +#include <string> + +// Other libraries and framework includes +// Project includes  #include "lldb/Target/Thread.h"  class ThreadMemory :      public lldb_private::Thread  {  public: -      ThreadMemory (lldb_private::Process &process,                    lldb::tid_t tid,                    const lldb::ValueObjectSP &thread_info_valobj_sp); @@ -27,69 +32,65 @@ public:                    const char *queue,                    lldb::addr_t register_data_addr); -    virtual -    ~ThreadMemory(); +    ~ThreadMemory() override; -    //------------------------------------------------------------------ -    // lldb_private::Thread methods -    //------------------------------------------------------------------ -    virtual lldb::RegisterContextSP -    GetRegisterContext (); +    lldb::RegisterContextSP +    GetRegisterContext() override; -    virtual lldb::RegisterContextSP -    CreateRegisterContextForFrame (lldb_private::StackFrame *frame); +    lldb::RegisterContextSP +    CreateRegisterContextForFrame(lldb_private::StackFrame *frame) override; -    virtual bool -    CalculateStopInfo (); +    bool +    CalculateStopInfo() override; -    virtual const char * -    GetInfo () +    const char * +    GetInfo() override      {          if (m_backing_thread_sp)              m_backing_thread_sp->GetInfo(); -        return NULL; +        return nullptr;      } -    virtual const char * -    GetName () +    const char * +    GetName() override      {          if (!m_name.empty())              return m_name.c_str();          if (m_backing_thread_sp)              m_backing_thread_sp->GetName(); -        return NULL; +        return nullptr;      } -    virtual const char * -    GetQueueName () +    const char * +    GetQueueName() override      {          if (!m_queue.empty())              return m_queue.c_str();          if (m_backing_thread_sp)              m_backing_thread_sp->GetQueueName(); -        return NULL; +        return nullptr;      } -    virtual void -    WillResume (lldb::StateType resume_state); +    void +    WillResume(lldb::StateType resume_state) override; -    virtual void -    DidResume () +    void +    DidResume() override      {          if (m_backing_thread_sp)              m_backing_thread_sp->DidResume();      } -    virtual lldb::user_id_t -    GetProtocolID () const +    lldb::user_id_t +    GetProtocolID() const override      {          if (m_backing_thread_sp)              return m_backing_thread_sp->GetProtocolID();          return Thread::GetProtocolID();      } -    virtual void -    RefreshStateAfterStop(); +    void +    RefreshStateAfterStop() override;      lldb::ValueObjectSP &      GetValueObject () @@ -97,41 +98,36 @@ public:          return m_thread_info_valobj_sp;      } -    virtual void -    ClearStackFrames (); +    void +    ClearStackFrames() override; -    virtual void -    ClearBackingThread () +    void +    ClearBackingThread() override      {          m_backing_thread_sp.reset();      } -    virtual bool -    SetBackingThread (const lldb::ThreadSP &thread_sp) +    bool +    SetBackingThread(const lldb::ThreadSP &thread_sp) override      {          //printf ("Thread 0x%llx is being backed by thread 0x%llx\n", GetID(), thread_sp->GetID());          m_backing_thread_sp = thread_sp;          return (bool)thread_sp;      } -    virtual lldb::ThreadSP -    GetBackingThread () const +    lldb::ThreadSP +    GetBackingThread() const override      {          return m_backing_thread_sp;      }  protected: -     -    virtual bool -    IsOperatingSystemPluginThread () const +    bool +    IsOperatingSystemPluginThread() const override      {          return true;      } - -    //------------------------------------------------------------------ -    // For ThreadMemory and subclasses -    //------------------------------------------------------------------      // If this memory thread is actually represented by a thread from the      // lldb_private::Process subclass, then fill in the thread here and      // all APIs will be routed through this thread object. If m_backing_thread_sp @@ -142,11 +138,9 @@ protected:      std::string m_name;      std::string m_queue;      lldb::addr_t m_register_data_addr; +  private: -    //------------------------------------------------------------------ -    // For ThreadMemory only -    //------------------------------------------------------------------      DISALLOW_COPY_AND_ASSIGN (ThreadMemory);  }; -#endif  // liblldb_ThreadMemory_h_ +#endif // liblldb_ThreadMemory_h_ | 
