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_
13 #include "lldb/Core/Address.h"
14 #include "lldb/Core/ValueObject.h"
15 #include "lldb/Symbol/CompilerType.h"
16 #include "lldb/Utility/ConstString.h"
17 #include "lldb/lldb-defines.h"
18 #include "lldb/lldb-enumerations.h"
19 #include "lldb/lldb-forward.h"
20 #include "llvm/ADT/StringRef.h"
25 namespace lldb_private {
26 class ExecutionContextScope;
29 namespace lldb_private {
31 //----------------------------------------------------------------------
32 // A ValueObject that represents memory at a given address, viewed as some
34 //----------------------------------------------------------------------
35 class ValueObjectMemory : public ValueObject {
37 ~ValueObjectMemory() override;
39 static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
41 const Address &address,
42 lldb::TypeSP &type_sp);
44 static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
46 const Address &address,
47 const CompilerType &ast_type);
49 uint64_t GetByteSize() override;
51 ConstString GetTypeName() override;
53 ConstString GetDisplayTypeName() override;
55 size_t CalculateNumChildren(uint32_t max) override;
57 lldb::ValueType GetValueType() const override;
59 bool IsInScope() override;
61 lldb::ModuleSP GetModule() override;
64 bool UpdateValue() override;
66 CompilerType GetCompilerTypeImpl() override;
68 Address m_address; ///< The variable that this value object is based upon
69 lldb::TypeSP m_type_sp;
70 CompilerType m_compiler_type;
73 ValueObjectMemory(ExecutionContextScope *exe_scope, llvm::StringRef name,
74 const Address &address, lldb::TypeSP &type_sp);
76 ValueObjectMemory(ExecutionContextScope *exe_scope, llvm::StringRef name,
77 const Address &address, const CompilerType &ast_type);
78 //------------------------------------------------------------------
79 // For ValueObject only
80 //------------------------------------------------------------------
81 DISALLOW_COPY_AND_ASSIGN(ValueObjectMemory);
84 } // namespace lldb_private
86 #endif // liblldb_ValueObjectMemory_h_