blob: 1880c5a89aca251fd7c883892a8ed72873593382 [file] [log] [blame]
Greg Clayton56d9a1b2011-08-22 02:49:39 +00001//===-- 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
15class ThreadMemory :
16 public lldb_private::Thread
17{
18public:
19
Jim Ingham4f465cf2012-10-10 18:32:14 +000020 ThreadMemory (lldb_private::Process &process,
Greg Clayton1ac04c32012-02-21 00:09:25 +000021 lldb::tid_t tid,
22 const lldb::ValueObjectSP &thread_info_valobj_sp);
Greg Clayton56d9a1b2011-08-22 02:49:39 +000023
Jim Ingham4f465cf2012-10-10 18:32:14 +000024 ThreadMemory (lldb_private::Process &process,
Greg Clayton435ce132012-08-24 05:45:15 +000025 lldb::tid_t tid,
26 const char *name,
27 const char *queue);
28
29 virtual
Greg Clayton56d9a1b2011-08-22 02:49:39 +000030 ~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
Greg Clayton435ce132012-08-24 05:45:15 +000047 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
Greg Clayton56d9a1b2011-08-22 02:49:39 +000059 virtual bool
60 WillResume (lldb::StateType resume_state);
61
62 lldb::ValueObjectSP &
63 GetValueObject ()
64 {
65 return m_thread_info_valobj_sp;
66 }
67
68protected:
69 //------------------------------------------------------------------
70 // For ThreadMemory and subclasses
71 //------------------------------------------------------------------
72 lldb::ValueObjectSP m_thread_info_valobj_sp;
Greg Clayton435ce132012-08-24 05:45:15 +000073 std::string m_name;
74 std::string m_queue;
Greg Clayton56d9a1b2011-08-22 02:49:39 +000075private:
76 //------------------------------------------------------------------
77 // For ThreadMemory only
78 //------------------------------------------------------------------
79 DISALLOW_COPY_AND_ASSIGN (ThreadMemory);
80};
81
82#endif // liblldb_ThreadMemory_h_