LLDB  mainline
ValueObjectConstResultCast.cpp
Go to the documentation of this file.
1 //===-- ValueObjectConstResultCast.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 
11 namespace lldb_private {
12 class DataExtractor;
13 }
14 namespace lldb_private {
15 class Status;
16 }
17 namespace lldb_private {
18 class ValueObject;
19 }
20 
21 using namespace lldb_private;
22 
24  ValueObject &parent, ConstString name, const CompilerType &cast_type,
25  lldb::addr_t live_address)
26  : ValueObjectCast(parent, name, cast_type), m_impl(this, live_address) {
27  m_name = name;
28 }
29 
31 
33  return m_impl.Dereference(error);
34 }
35 
37  uint32_t offset, const CompilerType &type, bool can_create,
38  ConstString name_const_str) {
39  return m_impl.GetSyntheticChildAtOffset(offset, type, can_create,
40  name_const_str);
41 }
42 
44  return m_impl.AddressOf(error);
45 }
46 
48  size_t idx, bool synthetic_array_member, int32_t synthetic_index) {
49  return m_impl.CreateChildAtIndex(idx, synthetic_array_member,
50  synthetic_index);
51 }
52 
54  uint32_t item_idx,
55  uint32_t item_count) {
56  return m_impl.GetPointeeData(data, item_idx, item_count);
57 }
58 
59 lldb::ValueObjectSP
61  return m_impl.Cast(compiler_type);
62 }
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::ValueObjectConstResultCast::~ValueObjectConstResultCast
~ValueObjectConstResultCast() override
lldb_private::ValueObject::m_name
ConstString m_name
The name of this object.
Definition: ValueObject.h:849
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
ValueObjectConstResultCast.h
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
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::ValueObjectConstResultCast::Dereference
lldb::ValueObjectSP Dereference(Status &error) override
Definition: ValueObjectConstResultCast.cpp:32
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::DataExtractor
Definition: DataExtractor.h:48
lldb_private::ValueObjectConstResultCast::m_impl
ValueObjectConstResultImpl m_impl
Definition: ValueObjectConstResultCast.h:57
lldb_private::ValueObjectCast
A ValueObject that represents a given value represented as a different type.
Definition: ValueObjectCast.h:25
lldb_private::ValueObjectConstResultCast::ValueObjectConstResultCast
ValueObjectConstResultCast(ValueObject &parent, ConstString name, const CompilerType &cast_type, lldb::addr_t live_address=LLDB_INVALID_ADDRESS)
Definition: ValueObjectConstResultCast.cpp:23
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::ValueObjectConstResultCast::GetPointeeData
size_t GetPointeeData(DataExtractor &data, uint32_t item_idx=0, uint32_t item_count=1) override
Definition: ValueObjectConstResultCast.cpp:53
lldb_private::Status
Definition: Status.h:44
lldb_private::ValueObject
ValueObject:
Definition: ValueObject.h:105
uint32_t
lldb_private::ValueObjectConstResultCast::Cast
lldb::ValueObjectSP Cast(const CompilerType &compiler_type) override
Definition: ValueObjectConstResultCast.cpp:60
lldb_private::ValueObjectConstResultCast::CreateChildAtIndex
ValueObject * CreateChildAtIndex(size_t idx, bool synthetic_array_member, int32_t synthetic_index) override
Should only be called by ValueObject::GetChildAtIndex().
Definition: ValueObjectConstResultCast.cpp:47
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::ValueObjectConstResultCast::GetSyntheticChildAtOffset
lldb::ValueObjectSP GetSyntheticChildAtOffset(uint32_t offset, const CompilerType &type, bool can_create, ConstString name_const_str=ConstString()) override
Definition: ValueObjectConstResultCast.cpp:36
lldb_private::ValueObjectConstResultCast::AddressOf
lldb::ValueObjectSP AddressOf(Status &error) override
Definition: ValueObjectConstResultCast.cpp:43