LLDB  mainline
ValueObjectChild.h
Go to the documentation of this file.
1 //===-- ValueObjectChild.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_ValueObjectChild_h_
10 #define liblldb_ValueObjectChild_h_
11 
12 #include "lldb/Core/ValueObject.h"
13 
16 #include "lldb/lldb-defines.h"
17 #include "lldb/lldb-enumerations.h"
19 #include "lldb/lldb-types.h"
20 
21 #include "llvm/ADT/Optional.h"
22 
23 #include <stddef.h>
24 #include <stdint.h>
25 
26 namespace lldb_private {
27 
28 // A child of another ValueObject.
29 class ValueObjectChild : public ValueObject {
30 public:
31  ~ValueObjectChild() override;
32 
33  uint64_t GetByteSize() override { return m_byte_size; }
34 
36 
38 
40 
41  lldb::ValueType GetValueType() const override;
42 
43  size_t CalculateNumChildren(uint32_t max) override;
44 
45  ConstString GetTypeName() override;
46 
48 
50 
51  bool IsInScope() override;
52 
53  bool IsBaseClass() override { return m_is_base_class; }
54 
55  bool IsDereferenceOfParent() override { return m_is_deref_of_parent; }
56 
57 protected:
58  bool UpdateValue() override;
59 
61 
63 
66  uint64_t m_byte_size;
67  int32_t m_byte_offset;
72  llvm::Optional<LazyBool> m_can_update_with_invalid_exe_ctx;
73 
74  //
75  // void
76  // ReadValueFromMemory (ValueObject* parent, lldb::addr_t address);
77 
78 protected:
79  friend class ValueObject;
80  friend class ValueObjectConstResult;
82 
83  ValueObjectChild(ValueObject &parent, const CompilerType &compiler_type,
84  ConstString name, uint64_t byte_size,
85  int32_t byte_offset, uint32_t bitfield_bit_size,
86  uint32_t bitfield_bit_offset, bool is_base_class,
87  bool is_deref_of_parent,
88  AddressType child_ptr_or_ref_addr_type,
89  uint64_t language_flags);
90 
92 };
93 
94 } // namespace lldb_private
95 
96 #endif // liblldb_ValueObjectChild_h_
ValueObjectChild(ValueObject &parent, const CompilerType &compiler_type, ConstString name, uint64_t byte_size, int32_t byte_offset, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset, bool is_base_class, bool is_deref_of_parent, AddressType child_ptr_or_ref_addr_type, uint64_t language_flags)
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
CompilerType GetCompilerTypeImpl() override
uint32_t GetBitfieldBitOffset() override
lldb::offset_t GetByteOffset() override
uint64_t GetByteSize() override
llvm::Optional< LazyBool > m_can_update_with_invalid_exe_ctx
uint64_t offset_t
Definition: lldb-types.h:87
LazyBool CanUpdateWithInvalidExecutionContext() override
lldb::ValueType GetValueType() const override
ConstString GetQualifiedTypeName() override
size_t CalculateNumChildren(uint32_t max) override
ConstString GetDisplayTypeName() override
uint32_t GetBitfieldBitSize() override
A uniqued constant string class.
Definition: ConstString.h:38
DISALLOW_COPY_AND_ASSIGN(ValueObjectChild)
ConstString GetTypeName() override