1 //===-- ValueObjectRegister.h -----------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_ValueObjectRegister_h_
11 #define liblldb_ValueObjectRegister_h_
15 // Other libraries and framework includes
17 #include "lldb/lldb-private.h"
18 #include "lldb/Core/RegisterValue.h"
19 #include "lldb/Core/ValueObject.h"
21 namespace lldb_private {
23 //----------------------------------------------------------------------
24 // A ValueObject that contains a root variable that may or may not
26 //----------------------------------------------------------------------
27 class ValueObjectRegisterContext : public ValueObject
32 ~ValueObjectRegisterContext();
37 virtual lldb::ValueType
40 return lldb::eValueTypeRegisterSet;
47 GetQualifiedTypeName();
50 CalculateNumChildren();
53 CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index);
62 lldb::RegisterContextSP m_reg_ctx_sp;
65 ValueObjectRegisterContext (ValueObject &parent, lldb::RegisterContextSP ®_ctx_sp);
66 //------------------------------------------------------------------
67 // For ValueObject only
68 //------------------------------------------------------------------
69 DISALLOW_COPY_AND_ASSIGN (ValueObjectRegisterContext);
72 class ValueObjectRegisterSet : public ValueObject
75 static lldb::ValueObjectSP
76 Create (ExecutionContextScope *exe_scope, lldb::RegisterContextSP ®_ctx_sp, uint32_t set_idx);
79 ~ValueObjectRegisterSet();
84 virtual lldb::ValueType
87 return lldb::eValueTypeRegisterSet;
94 GetQualifiedTypeName();
97 CalculateNumChildren();
100 CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index);
102 virtual lldb::ValueObjectSP
103 GetChildMemberWithName (const ConstString &name, bool can_create);
106 GetIndexOfChildWithName (const ConstString &name);
116 lldb::RegisterContextSP m_reg_ctx_sp;
117 const RegisterSet *m_reg_set;
118 uint32_t m_reg_set_idx;
121 friend class ValueObjectRegisterContext;
122 ValueObjectRegisterSet (ExecutionContextScope *exe_scope, lldb::RegisterContextSP ®_ctx_sp, uint32_t set_idx);
124 //------------------------------------------------------------------
125 // For ValueObject only
126 //------------------------------------------------------------------
127 DISALLOW_COPY_AND_ASSIGN (ValueObjectRegisterSet);
130 class ValueObjectRegister : public ValueObject
133 static lldb::ValueObjectSP
134 Create (ExecutionContextScope *exe_scope, lldb::RegisterContextSP ®_ctx_sp, uint32_t reg_num);
137 ~ValueObjectRegister();
142 virtual lldb::ValueType
143 GetValueType () const
145 return lldb::eValueTypeRegister;
152 CalculateNumChildren();
155 SetValueFromCString (const char *value_str, Error& error);
158 SetData (DataExtractor &data, Error &error);
161 ResolveValue (Scalar &scalar);
164 GetExpressionPath (Stream &s, bool qualify_cxx_base_classes, GetExpressionPathFormat epformat = eGetExpressionPathFormatDereferencePointers);
173 lldb::RegisterContextSP m_reg_ctx_sp;
174 RegisterInfo m_reg_info;
175 RegisterValue m_reg_value;
176 ConstString m_type_name;
177 ClangASTType m_clang_type;
181 ConstructObject (uint32_t reg_num);
183 friend class ValueObjectRegisterSet;
184 ValueObjectRegister (ValueObject &parent, lldb::RegisterContextSP ®_ctx_sp, uint32_t reg_num);
185 ValueObjectRegister (ExecutionContextScope *exe_scope, lldb::RegisterContextSP ®_ctx_sp, uint32_t reg_num);
187 //------------------------------------------------------------------
188 // For ValueObject only
189 //------------------------------------------------------------------
190 DISALLOW_COPY_AND_ASSIGN (ValueObjectRegister);
193 } // namespace lldb_private
195 #endif // liblldb_ValueObjectRegister_h_