]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/lldb/Core/ValueObjectMemory.h
Vendor import of lldb trunk r290819:
[FreeBSD/FreeBSD.git] / include / lldb / Core / ValueObjectMemory.h
1 //===-- ValueObjectMemory.h -----------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_ValueObjectMemory_h_
11 #define liblldb_ValueObjectMemory_h_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/Core/ValueObject.h"
18 #include "lldb/Symbol/CompilerType.h"
19
20 namespace lldb_private {
21
22 //----------------------------------------------------------------------
23 // A ValueObject that represents memory at a given address, viewed as some
24 // set lldb type.
25 //----------------------------------------------------------------------
26 class ValueObjectMemory : public ValueObject {
27 public:
28   ~ValueObjectMemory() override;
29
30   static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
31                                     llvm::StringRef name,
32                                     const Address &address,
33                                     lldb::TypeSP &type_sp);
34
35   static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
36                                     llvm::StringRef name,
37                                     const Address &address,
38                                     const CompilerType &ast_type);
39
40   uint64_t GetByteSize() override;
41
42   ConstString GetTypeName() override;
43
44   ConstString GetDisplayTypeName() override;
45
46   size_t CalculateNumChildren(uint32_t max) override;
47
48   lldb::ValueType GetValueType() const override;
49
50   bool IsInScope() override;
51
52   lldb::ModuleSP GetModule() override;
53
54 protected:
55   bool UpdateValue() override;
56
57   CompilerType GetCompilerTypeImpl() override;
58
59   Address m_address; ///< The variable that this value object is based upon
60   lldb::TypeSP m_type_sp;
61   CompilerType m_compiler_type;
62
63 private:
64   ValueObjectMemory(ExecutionContextScope *exe_scope, llvm::StringRef name,
65                     const Address &address, lldb::TypeSP &type_sp);
66
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);
73 };
74
75 } // namespace lldb_private
76
77 #endif // liblldb_ValueObjectMemory_h_