1 //===-- ThreadMemory.h -----------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef liblldb_ThreadMemory_h_ 11 #define liblldb_ThreadMemory_h_ 12 13 #include "lldb/Target/Thread.h" 14 15 class ThreadMemory : 16 public lldb_private::Thread 17 { 18 public: 19 20 ThreadMemory (lldb_private::Process &process, 21 lldb::tid_t tid, 22 const lldb::ValueObjectSP &thread_info_valobj_sp); 23 24 ThreadMemory (lldb_private::Process &process, 25 lldb::tid_t tid, 26 const char *name, 27 const char *queue); 28 29 virtual 30 ~ThreadMemory(); 31 32 //------------------------------------------------------------------ 33 // lldb_private::Thread methods 34 //------------------------------------------------------------------ 35 virtual void 36 RefreshStateAfterStop(); 37 38 virtual lldb::RegisterContextSP 39 GetRegisterContext (); 40 41 virtual lldb::RegisterContextSP 42 CreateRegisterContextForFrame (lldb_private::StackFrame *frame); 43 44 virtual lldb::StopInfoSP 45 GetPrivateStopReason (); 46 47 virtual const char * 48 GetName () 49 { 50 return m_name.c_str(); 51 } 52 53 virtual const char * 54 GetQueueName () 55 { 56 return m_queue.c_str(); 57 } 58 59 virtual bool 60 WillResume (lldb::StateType resume_state); 61 62 lldb::ValueObjectSP & 63 GetValueObject () 64 { 65 return m_thread_info_valobj_sp; 66 } 67 68 protected: 69 //------------------------------------------------------------------ 70 // For ThreadMemory and subclasses 71 //------------------------------------------------------------------ 72 lldb::ValueObjectSP m_thread_info_valobj_sp; 73 std::string m_name; 74 std::string m_queue; 75 private: 76 //------------------------------------------------------------------ 77 // For ThreadMemory only 78 //------------------------------------------------------------------ 79 DISALLOW_COPY_AND_ASSIGN (ThreadMemory); 80 }; 81 82 #endif // liblldb_ThreadMemory_h_ 83