19#include "llvm/Support/ErrorHandling.h"
56 :
ValueObject(exe_scope, manager), m_address(address), m_type_sp(type_sp),
84 :
ValueObject(exe_scope, manager), m_address(address), m_type_sp(),
85 m_compiler_type(ast_type) {
113 return m_type_sp->GetForwardCompilerType();
125 return m_type_sp->GetForwardCompilerType().GetDisplayTypeName();
131 auto child_count =
m_type_sp->GetNumChildren(
true);
134 return *child_count <= max ? *child_count : max;
138 const bool omit_empty_base_classes =
true;
143 return *child_count <= max ? *child_count : max;
174 switch (value_type) {
A section + offset based address class.
lldb::addr_t GetLoadAddress(Target *target) const
Get the load address.
lldb::ModuleSP GetModule() const
Get accessor for the module for this address.
lldb::addr_t GetFileAddress() const
Get the file address.
lldb::addr_t GetOffset() const
Get the section relative offset value.
bool IsValid() const
Check if the object state is valid.
uint32_t GetAddressByteSize() const
Returns the size in bytes of an address of the current architecture.
lldb::ByteOrder GetByteOrder() const
Returns the byte order for the architecture specification.
static std::shared_ptr< ClusterManager > Create()
Generic representation of a type in a programming language.
std::optional< uint64_t > GetByteSize(ExecutionContextScope *exe_scope) const
Return the size of the type in bytes.
ConstString GetDisplayTypeName() const
ConstString GetTypeName(bool BaseOnly=false) const
llvm::Expected< uint32_t > GetNumChildren(bool omit_empty_base_classes, const ExecutionContext *exe_ctx) const
A uniqued constant string class.
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
ExecutionContextScope * GetBestExecutionContextScope() const
Target * GetTargetPtr() const
Returns a pointer to the target object.
Process * GetProcessPtr() const
Returns a pointer to the process object.
void Clear()
Clear the object state.
void SetErrorString(llvm::StringRef err_str)
Set the current error string to err_str.
bool Success() const
Test for success condition.
const ArchSpec & GetArchitecture() const
A ValueObject that represents memory at a given address, viewed as some set lldb type.
~ValueObjectMemory() override
llvm::Expected< uint32_t > CalculateNumChildren(uint32_t max) override
Should only be called by ValueObject::GetNumChildren().
bool IsInScope() override
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, llvm::StringRef name, const Address &address, lldb::TypeSP &type_sp)
lldb::ValueType GetValueType() const override
CompilerType m_compiler_type
lldb::ModuleSP GetModule() override
Return the module associated with this value object in case the value is from an executable file and ...
bool UpdateValue() override
std::optional< uint64_t > GetByteSize() override
Address m_address
The variable that this value object is based upon.
ValueObjectMemory(ExecutionContextScope *exe_scope, ValueObjectManager &manager, llvm::StringRef name, const Address &address, lldb::TypeSP &type_sp)
CompilerType GetCompilerTypeImpl() override
ConstString GetTypeName() override
ConstString GetDisplayTypeName() override
void SetValueIsValid(bool valid)
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)
void SetName(ConstString name)
Change the name of the current ValueObject.
lldb::TargetSP GetTargetSP() const
const ExecutionContextRef & GetExecutionContextRef() const
virtual bool CanProvideValue()
const Scalar & GetScalar() const
Status GetValueAsData(ExecutionContext *exe_ctx, DataExtractor &data, Module *module)
ValueType
Type that describes Value::m_value.
@ HostAddress
A host address value (for memory in the process that < A is using liblldb).
@ FileAddress
A file address value.
@ LoadAddress
A load address value.
@ Scalar
A raw scalar value.
ValueType GetValueType() const
void SetCompilerType(const CompilerType &compiler_type)
void SetContext(ContextType context_type, void *p)
void SetValueType(ValueType value_type)
@ LLDBType
lldb_private::Type *.
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::Type > TypeSP
std::shared_ptr< lldb_private::Target > TargetSP
std::shared_ptr< lldb_private::Module > ModuleSP
@ eValueTypeVariableGlobal
globals variable