LLDB mainline
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
14#include "lldb/lldb-forward.h"
15
16namespace 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.
31public:
33
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
44protected:
46 ValueObjectManager &manager,
47 const lldb::ValueObjectSP &valobj_sp,
48 lldb::ValueType type);
49
50 bool UpdateValue() override;
51
53
56
57private:
61};
62
63} // namespace lldb_private
64
65#endif // LLDB_VALUEOBJECT_VALUEOBJECTSYNTHESIZEDVALUE_H
Generic representation of a type in a programming language.
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
llvm::Expected< uint64_t > GetByteSize() override
llvm::Expected< uint32_t > CalculateNumChildren(uint32_t max) override
Should only be called by ValueObject::GetNumChildren().
ValueObjectSynthesizedValue(ExecutionContextScope *exe_scope, ValueObjectManager &manager, const lldb::ValueObjectSP &valobj_sp, lldb::ValueType type)
ValueObjectSynthesizedValue(const ValueObjectSynthesizedValue &)=delete
static lldb::ValueObjectSP Create(ValueObject &valobj, lldb::ValueType type)
const ValueObjectSynthesizedValue & operator=(const ValueObjectSynthesizedValue &)=delete
ClusterManager< ValueObject > ValueObjectManager
ValueObject(ExecutionContextScope *exe_scope, ValueObjectManager &manager, AddressType child_ptr_or_ref_addr_type=eAddressTypeLoad)
Use this constructor to create a "root variable object".
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP