1 //===-- ValueObjectVariable.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_ValueObjectVariable_h_
11 #define liblldb_ValueObjectVariable_h_
15 // Other libraries and framework includes
17 #include "lldb/Core/ValueObject.h"
19 namespace lldb_private {
21 //----------------------------------------------------------------------
22 // A ValueObject that contains a root variable that may or may not
24 //----------------------------------------------------------------------
25 class ValueObjectVariable : public ValueObject {
27 ~ValueObjectVariable() override;
29 static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
30 const lldb::VariableSP &var_sp);
32 uint64_t GetByteSize() override;
34 ConstString GetTypeName() override;
36 ConstString GetQualifiedTypeName() override;
38 ConstString GetDisplayTypeName() override;
40 size_t CalculateNumChildren(uint32_t max) override;
42 lldb::ValueType GetValueType() const override;
44 bool IsInScope() override;
46 lldb::ModuleSP GetModule() override;
48 SymbolContextScope *GetSymbolContextScope() override;
50 bool GetDeclaration(Declaration &decl) override;
52 const char *GetLocationAsCString() override;
54 bool SetValueFromCString(const char *value_str, Error &error) override;
56 bool SetData(DataExtractor &data, Error &error) override;
58 virtual lldb::VariableSP GetVariable() override { return m_variable_sp; }
61 bool UpdateValue() override;
63 CompilerType GetCompilerTypeImpl() override;
66 m_variable_sp; ///< The variable that this value object is based upon
67 Value m_resolved_value; ///< The value that DWARFExpression resolves this
68 ///variable to before we patch it up
71 ValueObjectVariable(ExecutionContextScope *exe_scope,
72 const lldb::VariableSP &var_sp);
73 //------------------------------------------------------------------
74 // For ValueObject only
75 //------------------------------------------------------------------
76 DISALLOW_COPY_AND_ASSIGN(ValueObjectVariable);
79 } // namespace lldb_private
81 #endif // liblldb_ValueObjectVariable_h_