LLDB
mainline
llvm-project
lldb
include
lldb
ValueObject
ValueObjectSynthesizedValue.h
Go to the documentation of this file.
1
//===-- ValueObjectSynthesizedValue.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_VALUEOBJECT_VALUEOBJECTSYNTHESIZEDVALUE_H
10
#define LLDB_VALUEOBJECT_VALUEOBJECTSYNTHESIZEDVALUE_H
11
12
#include "
lldb/ValueObject/ValueObject.h
"
13
#include "
lldb/lldb-enumerations.h
"
14
#include "
lldb/lldb-forward.h
"
15
16
namespace
lldb_private
{
17
18
/// \class ValueObjectSynthesizedValue
19
///
20
/// Presents another ValueObject under the given ValueType.
21
///
22
/// A ValueObject reports the ValueType that follows from how it was produced,
23
/// which is not always what it is being presented as: a frame that synthesizes
24
/// variables, or a frame recognizer naming an argument, knows a ValueType the
25
/// ValueObject cannot report for itself. This ValueObject subclass reports that
26
/// ValueType and forwards everything else to the ValueObject it presents.
27
///
28
/// The presented ValueObject is not a parent. It is the same ValueObject seen
29
/// differently, so this is a root and reports no parent.
30
class
ValueObjectSynthesizedValue
:
public
ValueObject
{
31
public
:
32
static
lldb::ValueObjectSP
Create
(
ValueObject
&valobj,
lldb::ValueType
type);
33
34
~ValueObjectSynthesizedValue
()
override
;
35
36
lldb::ValueType
GetValueType
()
const override
{
return
m_type
; }
37
38
llvm::Expected<uint64_t>
GetByteSize
()
override
;
39
40
llvm::Expected<uint32_t>
CalculateNumChildren
(uint32_t max)
override
;
41
42
bool
IsInScope
()
override
;
43
44
protected
:
45
ValueObjectSynthesizedValue
(
ExecutionContextScope
*exe_scope,
46
ValueObjectManager
&manager,
47
const
lldb::ValueObjectSP
&valobj_sp,
48
lldb::ValueType
type);
49
50
bool
UpdateValue
()
override
;
51
52
CompilerType
GetCompilerTypeImpl
()
override
;
53
54
lldb::ValueObjectSP
m_valobj_sp
;
55
lldb::ValueType
m_type
;
56
57
private
:
58
ValueObjectSynthesizedValue
(
const
ValueObjectSynthesizedValue
&) =
delete
;
59
const
ValueObjectSynthesizedValue
&
60
operator=
(
const
ValueObjectSynthesizedValue
&) =
delete
;
61
};
62
63
}
// namespace lldb_private
64
65
#endif
// LLDB_VALUEOBJECT_VALUEOBJECTSYNTHESIZEDVALUE_H
ValueObject.h
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition
CompilerType.h:37
lldb_private::ExecutionContextScope
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
Definition
ExecutionContextScope.h:31
lldb_private::ValueObjectSynthesizedValue::m_valobj_sp
lldb::ValueObjectSP m_valobj_sp
Definition
ValueObjectSynthesizedValue.h:54
lldb_private::ValueObjectSynthesizedValue::GetByteSize
llvm::Expected< uint64_t > GetByteSize() override
Definition
ValueObjectSynthesizedValue.cpp:36
lldb_private::ValueObjectSynthesizedValue::IsInScope
bool IsInScope() override
Definition
ValueObjectSynthesizedValue.cpp:45
lldb_private::ValueObjectSynthesizedValue::m_type
lldb::ValueType m_type
Definition
ValueObjectSynthesizedValue.h:55
lldb_private::ValueObjectSynthesizedValue::GetValueType
lldb::ValueType GetValueType() const override
Definition
ValueObjectSynthesizedValue.h:36
lldb_private::ValueObjectSynthesizedValue::CalculateNumChildren
llvm::Expected< uint32_t > CalculateNumChildren(uint32_t max) override
Should only be called by ValueObject::GetNumChildren().
Definition
ValueObjectSynthesizedValue.cpp:41
lldb_private::ValueObjectSynthesizedValue::ValueObjectSynthesizedValue
ValueObjectSynthesizedValue(ExecutionContextScope *exe_scope, ValueObjectManager &manager, const lldb::ValueObjectSP &valobj_sp, lldb::ValueType type)
Definition
ValueObjectSynthesizedValue.cpp:27
lldb_private::ValueObjectSynthesizedValue::ValueObjectSynthesizedValue
ValueObjectSynthesizedValue(const ValueObjectSynthesizedValue &)=delete
lldb_private::ValueObjectSynthesizedValue::Create
static lldb::ValueObjectSP Create(ValueObject &valobj, lldb::ValueType type)
Definition
ValueObjectSynthesizedValue.cpp:17
lldb_private::ValueObjectSynthesizedValue::UpdateValue
bool UpdateValue() override
Definition
ValueObjectSynthesizedValue.cpp:53
lldb_private::ValueObjectSynthesizedValue::operator=
const ValueObjectSynthesizedValue & operator=(const ValueObjectSynthesizedValue &)=delete
lldb_private::ValueObjectSynthesizedValue::~ValueObjectSynthesizedValue
~ValueObjectSynthesizedValue() override
lldb_private::ValueObjectSynthesizedValue::GetCompilerTypeImpl
CompilerType GetCompilerTypeImpl() override
Definition
ValueObjectSynthesizedValue.cpp:49
lldb_private::ValueObject::ValueObjectManager
ClusterManager< ValueObject > ValueObjectManager
Definition
ValueObject.h:1008
lldb_private::ValueObject::ValueObject
ValueObject(ExecutionContextScope *exe_scope, ValueObjectManager &manager, AddressType child_ptr_or_ref_addr_type=eAddressTypeLoad)
Use this constructor to create a "root variable object".
Definition
ValueObject.cpp:101
lldb-enumerations.h
lldb-forward.h
lldb_private
A class that represents a running process on the host machine.
Definition
SBAddressRange.h:14
lldb::ValueObjectSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Definition
lldb-forward.h:521
lldb::ValueType
ValueType
Definition
lldb-enumerations.h:401
Generated on
for LLDB by
1.14.0