1 //===-- ValueObjectMemory.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_ValueObjectMemory_h_
11 #define liblldb_ValueObjectMemory_h_
15 // Other libraries and framework includes
17 #include "lldb/Core/ValueObject.h"
18 #include "lldb/Symbol/CompilerType.h"
20 namespace lldb_private {
22 //----------------------------------------------------------------------
23 // A ValueObject that represents memory at a given address, viewed as some
25 //----------------------------------------------------------------------
26 class ValueObjectMemory : public ValueObject {
28 ~ValueObjectMemory() override;
30 static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
32 const Address &address,
33 lldb::TypeSP &type_sp);
35 static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
37 const Address &address,
38 const CompilerType &ast_type);
40 uint64_t GetByteSize() override;
42 ConstString GetTypeName() override;
44 ConstString GetDisplayTypeName() override;
46 size_t CalculateNumChildren(uint32_t max) override;
48 lldb::ValueType GetValueType() const override;
50 bool IsInScope() override;
52 lldb::ModuleSP GetModule() override;
55 bool UpdateValue() override;
57 CompilerType GetCompilerTypeImpl() override;
59 Address m_address; ///< The variable that this value object is based upon
60 lldb::TypeSP m_type_sp;
61 CompilerType m_compiler_type;
64 ValueObjectMemory(ExecutionContextScope *exe_scope, llvm::StringRef name,
65 const Address &address, lldb::TypeSP &type_sp);
67 ValueObjectMemory(ExecutionContextScope *exe_scope, llvm::StringRef name,
68 const Address &address, const CompilerType &ast_type);
69 //------------------------------------------------------------------
70 // For ValueObject only
71 //------------------------------------------------------------------
72 DISALLOW_COPY_AND_ASSIGN(ValueObjectMemory);
75 } // namespace lldb_private
77 #endif // liblldb_ValueObjectMemory_h_