26 return cast_valobj_ptr->
GetSP();
33 m_value.SetCompilerType(cast_type);
44 return children_count;
45 return *children_count <= max ? *children_count : max;
50 return m_value.GetValueByteSize(
nullptr, &exe_ctx);
62 if (
m_parent->UpdateValueIfNeeded(
false)) {
67 m_value.SetCompilerType(compiler_type);
70 if (
m_parent->GetCompilerType().HasPointerAuthQualifier() &&
72 if (
auto stripped =
m_parent->GetStrippedPointerValue(
73 m_parent->GetPointerValue().address)) {
74 m_value.GetScalar() = *stripped;
104 m_parent->GetAddressOf(
false).type !=
111 return m_parent->GetAddressOf(scalar_is_load_address);
117 return m_parent->GetLocationAsCString();
123 if (
m_parent->GetCompilerType().HasPointerAuthQualifier() &&
125 return llvm::createStringError(
126 "cannot modify a value through a cast that drops __ptrauth");
Generic representation of a type in a programming language.
bool HasPointerAuthQualifier() const
llvm::Expected< uint32_t > GetNumChildren(bool omit_empty_base_classes, const ExecutionContext *exe_ctx) const
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
CompilerType GetCompilerTypeImpl() override
llvm::Expected< uint32_t > CalculateNumChildren(uint32_t max) override
Should only be called by ValueObject::GetNumChildren().
llvm::Expected< uint64_t > GetByteSize() override
bool IsInScope() override
static lldb::ValueObjectSP Create(ValueObject &parent, llvm::StringRef name, const CompilerType &cast_type)
bool LivesInParentStorage()
True if the value is a scalar but the cast lives in the parent's storage.
bool UpdateValue() override
llvm::Error CanSetValue() override
Check if the value may be writable.
ValueObjectCast(ValueObject &parent, llvm::StringRef name, const CompilerType &cast_type)
AddrAndType GetAddressOf(bool scalar_is_load_address=true) override
~ValueObjectCast() override
const char * GetLocationAsCString() override
lldb::ValueType GetValueType() const override
void SetValueIsValid(bool valid)
EvaluationPoint m_update_point
Stores both the stop id and the full context at which this value was last updated.
ValueObject(ExecutionContextScope *exe_scope, ValueObjectManager &manager, AddressType child_ptr_or_ref_addr_type=eAddressTypeLoad)
Use this constructor to create a "root variable object".
lldb::ValueObjectSP GetSP()
virtual llvm::Error CanSetValue()
Check if the value may be writable.
Status m_error
An error object that can describe any errors that occur when updating values.
DataExtractor m_data
A data extractor that can be used to extract the value.
void SetValueDidChange(bool value_changed)
virtual lldb::ModuleSP GetModule()
Return the module associated with this value object in case the value is from an executable file and ...
ValueObject * m_parent
The parent value object, or nullptr if this has no parent.
void SetName(llvm::StringRef name)
Change the name of the current ValueObject.
bool UpdateValueIfNeeded(bool update_format=true)
CompilerType GetCompilerType()
virtual const char * GetLocationAsCString()
const ExecutionContextRef & GetExecutionContextRef() const
virtual AddrAndType GetAddressOf(bool scalar_is_load_address=true)
virtual bool CanProvideValue()
void SetAddressTypeOfChildren(AddressType at)
const Scalar & GetScalar() const
See comment on m_scalar to understand what GetScalar returns.
@ Scalar
A raw scalar value.
ValueType GetValueType() const
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP