]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectMemory.h
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / llvm / tools / lldb / 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/ClangASTType.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 {
28 public:
29     static lldb::ValueObjectSP
30     Create (ExecutionContextScope *exe_scope, 
31             const char *name,
32             const Address &address, 
33             lldb::TypeSP &type_sp);
34
35     static lldb::ValueObjectSP
36     Create (ExecutionContextScope *exe_scope, 
37             const char *name,
38             const Address &address, 
39             const ClangASTType &ast_type);
40
41     virtual
42     ~ValueObjectMemory();
43
44     virtual uint64_t
45     GetByteSize();
46
47     virtual ConstString
48     GetTypeName();
49
50     virtual size_t
51     CalculateNumChildren();
52
53     virtual lldb::ValueType
54     GetValueType() const;
55
56     virtual bool
57     IsInScope ();
58
59     virtual lldb::ModuleSP
60     GetModule();
61
62 protected:
63     virtual bool
64     UpdateValue ();
65     
66     virtual ClangASTType
67     GetClangTypeImpl ();
68
69     Address  m_address;  ///< The variable that this value object is based upon
70     lldb::TypeSP m_type_sp;
71     ClangASTType m_clang_type;
72
73 private:
74     ValueObjectMemory (ExecutionContextScope *exe_scope, 
75                        const char *name,
76                        const Address &address, 
77                        lldb::TypeSP &type_sp);
78
79     ValueObjectMemory (ExecutionContextScope *exe_scope,
80                        const char *name, 
81                        const Address &address,
82                        const ClangASTType &ast_type);
83     //------------------------------------------------------------------
84     // For ValueObject only
85     //------------------------------------------------------------------
86     DISALLOW_COPY_AND_ASSIGN (ValueObjectMemory);
87 };
88
89 } // namespace lldb_private
90
91 #endif  // liblldb_ValueObjectMemory_h_