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
28 ~ValueObjectVariable() override;
30 static lldb::ValueObjectSP
31 Create (ExecutionContextScope *exe_scope, const lldb::VariableSP &var_sp);
34 GetByteSize() override;
37 GetTypeName() override;
40 GetQualifiedTypeName() override;
43 GetDisplayTypeName() override;
46 CalculateNumChildren(uint32_t max) override;
49 GetValueType() const override;
58 GetSymbolContextScope() override;
61 GetDeclaration(Declaration &decl) override;
64 GetLocationAsCString() override;
67 SetValueFromCString(const char *value_str, Error& error) override;
70 SetData(DataExtractor &data, Error &error) override;
72 virtual lldb::VariableSP
73 GetVariable () override
80 UpdateValue() override;
83 GetCompilerTypeImpl() override;
85 lldb::VariableSP m_variable_sp; ///< The variable that this value object is based upon
86 Value m_resolved_value; ///< The value that DWARFExpression resolves this variable to before we patch it up
89 ValueObjectVariable (ExecutionContextScope *exe_scope, const lldb::VariableSP &var_sp);
90 //------------------------------------------------------------------
91 // For ValueObject only
92 //------------------------------------------------------------------
93 DISALLOW_COPY_AND_ASSIGN (ValueObjectVariable);
96 } // namespace lldb_private
98 #endif // liblldb_ValueObjectVariable_h_