LLDB  mainline
ValueObjectConstResultChild.h
Go to the documentation of this file.
1 //===-- ValueObjectConstResultChild.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 LLDB_CORE_VALUEOBJECTCONSTRESULTCHILD_H
10 #define LLDB_CORE_VALUEOBJECTCONSTRESULTCHILD_H
11 
16 #include "lldb/lldb-defines.h"
17 #include "lldb/lldb-forward.h"
18 #include "lldb/lldb-types.h"
19 
20 #include <cstddef>
21 #include <cstdint>
22 
23 namespace lldb_private {
24 class DataExtractor;
25 class Status;
26 class ValueObject;
27 
28 // A child of a ValueObjectConstResult.
30 public:
32  const CompilerType &compiler_type,
33  ConstString name, uint32_t byte_size,
34  int32_t byte_offset, uint32_t bitfield_bit_size,
35  uint32_t bitfield_bit_offset, bool is_base_class,
36  bool is_deref_of_parent,
37  lldb::addr_t live_address,
38  uint64_t language_flags);
39 
41 
42  lldb::ValueObjectSP Dereference(Status &error) override;
43 
44  ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
45  int32_t synthetic_index) override;
46 
49  }
50 
51  lldb::ValueObjectSP GetSyntheticChildAtOffset(
52  uint32_t offset, const CompilerType &type, bool can_create,
53  ConstString name_const_str = ConstString()) override;
54 
55  lldb::ValueObjectSP AddressOf(Status &error) override;
56 
57  lldb::addr_t GetAddressOf(bool scalar_is_load_address = true,
58  AddressType *address_type = nullptr) override;
59 
60  size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
61  uint32_t item_count = 1) override;
62 
63  lldb::ValueObjectSP Cast(const CompilerType &compiler_type) override;
64 
65 protected:
67 
68 private:
69  friend class ValueObject;
70  friend class ValueObjectConstResult;
72 
75  operator=(const ValueObjectConstResultChild &) = delete;
76 };
77 
78 } // namespace lldb_private
79 
80 #endif // LLDB_CORE_VALUEOBJECTCONSTRESULTCHILD_H
lldb-defines.h
lldb_private::AddressType
AddressType
Definition: lldb-private-enumerations.h:30
lldb_private::ValueObjectConstResultChild::~ValueObjectConstResultChild
~ValueObjectConstResultChild() override
lldb_private::ValueObjectConstResultChild
Definition: ValueObjectConstResultChild.h:29
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::ValueObjectConstResultChild::GetAddressOf
lldb::addr_t GetAddressOf(bool scalar_is_load_address=true, AddressType *address_type=nullptr) override
Definition: ValueObjectConstResultChild.cpp:54
ValueObjectConstResultImpl.h
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::ValueObjectConstResultChild::ValueObjectConstResultChild
ValueObjectConstResultChild(ValueObject &parent, const CompilerType &compiler_type, ConstString name, uint32_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, lldb::addr_t live_address, uint64_t language_flags)
Definition: ValueObjectConstResultChild.cpp:24
lldb_private::DataExtractor
Definition: DataExtractor.h:48
lldb_private::ConstString
Definition: ConstString.h:40
CompilerType.h
lldb_private::ValueObjectConstResultChild::GetPointeeData
size_t GetPointeeData(DataExtractor &data, uint32_t item_idx=0, uint32_t item_count=1) override
Definition: ValueObjectConstResultChild.cpp:65
lldb_private::ValueObjectConstResultChild::m_impl
ValueObjectConstResultImpl m_impl
Definition: ValueObjectConstResultChild.h:66
lldb-types.h
lldb_private::ValueObjectConstResultChild::Cast
lldb::ValueObjectSP Cast(const CompilerType &compiler_type) override
Definition: ValueObjectConstResultChild.cpp:72
lldb_private::Status
Definition: Status.h:44
lldb_private::ValueObject
ValueObject:
Definition: ValueObject.h:105
uint32_t
lldb_private::ValueObjectConstResultImpl
A class wrapping common implementation details for operations in ValueObjectConstResult ( & Child ) t...
Definition: ValueObjectConstResultImpl.h:32
lldb_private::ValueObjectConstResultChild::GetSyntheticChildAtOffset
lldb::ValueObjectSP GetSyntheticChildAtOffset(uint32_t offset, const CompilerType &type, bool can_create, ConstString name_const_str=ConstString()) override
Definition: ValueObjectConstResultChild.cpp:43
lldb_private::ValueObject::GetCompilerType
CompilerType GetCompilerType()
Definition: ValueObject.h:352
ValueObjectChild.h
lldb_private::ValueObjectConstResult
A frozen ValueObject copied into host memory.
Definition: ValueObjectConstResult.h:33
lldb_private::ValueObjectConstResultChild::Dereference
lldb::ValueObjectSP Dereference(Status &error) override
Definition: ValueObjectConstResultChild.cpp:39
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:33
lldb-forward.h
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::ValueObjectConstResultChild::GetCompilerType
virtual CompilerType GetCompilerType()
Definition: ValueObjectConstResultChild.h:47
lldb_private::ValueObjectConstResultChild::operator=
const ValueObjectConstResultChild & operator=(const ValueObjectConstResultChild &)=delete
ConstString.h
lldb_private::ValueObjectConstResultChild::AddressOf
lldb::ValueObjectSP AddressOf(Status &error) override
Definition: ValueObjectConstResultChild.cpp:50
lldb_private::ValueObjectChild
A child of another ValueObject.
Definition: ValueObjectChild.h:29
lldb_private::ValueObjectConstResultChild::CreateChildAtIndex
ValueObject * CreateChildAtIndex(size_t idx, bool synthetic_array_member, int32_t synthetic_index) override
Should only be called by ValueObject::GetChildAtIndex().
Definition: ValueObjectConstResultChild.cpp:59
lldb_private::LineStatus::Status
@ Status