LLDB  mainline
ValueObjectConstResultChild.cpp
Go to the documentation of this file.
1 //===-- ValueObjectConstResultChild.cpp -----------------------------------===//
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 
10 
12 namespace lldb_private {
13 class DataExtractor;
14 }
15 namespace lldb_private {
16 class Status;
17 }
18 namespace lldb_private {
19 class ValueObject;
20 }
21 
22 using namespace lldb_private;
23 
25  ValueObject &parent, const CompilerType &compiler_type,
26  ConstString name, uint32_t byte_size, int32_t byte_offset,
27  uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
28  bool is_base_class, bool is_deref_of_parent, lldb::addr_t live_address,
29  uint64_t language_flags)
30  : ValueObjectChild(parent, compiler_type, name, byte_size, byte_offset,
31  bitfield_bit_size, bitfield_bit_offset, is_base_class,
32  is_deref_of_parent, eAddressTypeLoad, language_flags),
33  m_impl(this, live_address) {
34  m_name = name;
35 }
36 
38 
40  return m_impl.Dereference(error);
41 }
42 
44  uint32_t offset, const CompilerType &type, bool can_create,
45  ConstString name_const_str) {
46  return m_impl.GetSyntheticChildAtOffset(offset, type, can_create,
47  name_const_str);
48 }
49 
51  return m_impl.AddressOf(error);
52 }
53 
55  bool scalar_is_load_address, AddressType* address_type) {
56  return m_impl.GetAddressOf(scalar_is_load_address, address_type);
57 }
58 
60  size_t idx, bool synthetic_array_member, int32_t synthetic_index) {
61  return m_impl.CreateChildAtIndex(idx, synthetic_array_member,
62  synthetic_index);
63 }
64 
66  uint32_t item_idx,
67  uint32_t item_count) {
68  return m_impl.GetPointeeData(data, item_idx, item_count);
69 }
70 
71 lldb::ValueObjectSP
73  return m_impl.Cast(compiler_type);
74 }
lldb_private::ValueObjectConstResultImpl::AddressOf
lldb::ValueObjectSP AddressOf(Status &error)
Definition: ValueObjectConstResultImpl.cpp:115
lldb_private::ValueObjectConstResultImpl::Dereference
lldb::ValueObjectSP Dereference(Status &error)
Definition: ValueObjectConstResultImpl.cpp:40
lldb_private::ValueObjectConstResultImpl::Cast
lldb::ValueObjectSP Cast(const CompilerType &compiler_type)
Definition: ValueObjectConstResultImpl.cpp:144
lldb_private::AddressType
AddressType
Definition: lldb-private-enumerations.h:30
lldb_private::ValueObject::m_name
ConstString m_name
The name of this object.
Definition: ValueObject.h:849
lldb_private::ValueObjectConstResultChild::~ValueObjectConstResultChild
~ValueObjectConstResultChild() override
lldb_private::ValueObjectConstResultImpl::GetSyntheticChildAtOffset
lldb::ValueObjectSP GetSyntheticChildAtOffset(uint32_t offset, const CompilerType &type, bool can_create, ConstString name_const_str=ConstString())
Definition: ValueObjectConstResultImpl.cpp:105
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb-private-enumerations.h
lldb_private::ValueObjectConstResultImpl::GetPointeeData
virtual size_t GetPointeeData(DataExtractor &data, uint32_t item_idx=0, uint32_t item_count=1)
Definition: ValueObjectConstResultImpl.cpp:172
lldb_private::ValueObjectConstResultChild::GetAddressOf
lldb::addr_t GetAddressOf(bool scalar_is_load_address=true, AddressType *address_type=nullptr) override
Definition: ValueObjectConstResultChild.cpp:54
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
lldb_private::ValueObjectConstResultImpl::CreateChildAtIndex
ValueObject * CreateChildAtIndex(size_t idx, bool synthetic_array_member, int32_t synthetic_index)
Definition: ValueObjectConstResultImpl.cpp:47
lldb_private::ValueObjectConstResultImpl::GetAddressOf
virtual lldb::addr_t GetAddressOf(bool scalar_is_load_address=true, AddressType *address_type=nullptr)
Definition: ValueObjectConstResultImpl.cpp:155
lldb_private::eAddressTypeLoad
@ eAddressTypeLoad
Address is an address as in the current target inferior process.
Definition: lldb-private-enumerations.h:34
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_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::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::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_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
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
ValueObjectConstResultChild.h