LLDB  mainline
ValueObjectMemory.h
Go to the documentation of this file.
1 //===-- ValueObjectMemory.h -----------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef liblldb_ValueObjectMemory_h_
10 #define liblldb_ValueObjectMemory_h_
11 
12 #include "lldb/Core/Address.h"
13 #include "lldb/Core/ValueObject.h"
16 #include "lldb/lldb-defines.h"
17 #include "lldb/lldb-enumerations.h"
18 #include "lldb/lldb-forward.h"
19 #include "llvm/ADT/StringRef.h"
20 
21 #include <stddef.h>
22 #include <stdint.h>
23 
24 namespace lldb_private {
25 class ExecutionContextScope;
26 }
27 
28 namespace lldb_private {
29 
30 // A ValueObject that represents memory at a given address, viewed as some
31 // set lldb type.
33 public:
34  ~ValueObjectMemory() override;
35 
36  static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
37  llvm::StringRef name,
38  const Address &address,
39  lldb::TypeSP &type_sp);
40 
41  static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
42  llvm::StringRef name,
43  const Address &address,
44  const CompilerType &ast_type);
45 
46  uint64_t GetByteSize() override;
47 
48  ConstString GetTypeName() override;
49 
51 
52  size_t CalculateNumChildren(uint32_t max) override;
53 
54  lldb::ValueType GetValueType() const override;
55 
56  bool IsInScope() override;
57 
58  lldb::ModuleSP GetModule() override;
59 
60 protected:
61  bool UpdateValue() override;
62 
64 
65  Address m_address; ///< The variable that this value object is based upon
66  lldb::TypeSP m_type_sp;
68 
69 private:
70  ValueObjectMemory(ExecutionContextScope *exe_scope, llvm::StringRef name,
71  const Address &address, lldb::TypeSP &type_sp);
72 
73  ValueObjectMemory(ExecutionContextScope *exe_scope, llvm::StringRef name,
74  const Address &address, const CompilerType &ast_type);
75  // For ValueObject only
76  DISALLOW_COPY_AND_ASSIGN(ValueObjectMemory);
77 };
78 
79 } // namespace lldb_private
80 
81 #endif // liblldb_ValueObjectMemory_h_
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
lldb::ModuleSP GetModule() override
size_t CalculateNumChildren(uint32_t max) override
lldb::ValueType GetValueType() const override
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, llvm::StringRef name, const Address &address, lldb::TypeSP &type_sp)
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
A section + offset based address class.
Definition: Address.h:80
ConstString GetDisplayTypeName() override
ConstString GetTypeName() override
A uniqued constant string class.
Definition: ConstString.h:38
Address m_address
The variable that this value object is based upon.
CompilerType GetCompilerTypeImpl() override