LLDB mainline
|
A ValueObject that contains a root variable that may or may not have children. More...
#include <ValueObjectVariable.h>
Static Public Member Functions | |
static lldb::ValueObjectSP | Create (ExecutionContextScope *exe_scope, const lldb::VariableSP &var_sp) |
![]() | |
static lldb::ValueObjectSP | CreateValueObjectFromExpression (llvm::StringRef name, llvm::StringRef expression, const ExecutionContext &exe_ctx) |
static lldb::ValueObjectSP | CreateValueObjectFromExpression (llvm::StringRef name, llvm::StringRef expression, const ExecutionContext &exe_ctx, const EvaluateExpressionOptions &options) |
static lldb::ValueObjectSP | CreateValueObjectFromAddress (llvm::StringRef name, uint64_t address, const ExecutionContext &exe_ctx, CompilerType type) |
static lldb::ValueObjectSP | CreateValueObjectFromData (llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type) |
Protected Attributes | |
lldb::VariableSP | m_variable_sp |
The variable that this value object is based upon. | |
Value | m_resolved_value |
![]() | |
ValueObject * | m_parent = nullptr |
The parent value object, or nullptr if this has no parent. | |
ValueObject * | m_root = nullptr |
The root of the hierarchy for this ValueObject (or nullptr if never calculated). | |
EvaluationPoint | m_update_point |
Stores both the stop id and the full context at which this value was last updated. | |
ConstString | m_name |
The name of this object. | |
DataExtractor | m_data |
A data extractor that can be used to extract the value. | |
Value | m_value |
Status | m_error |
An error object that can describe any errors that occur when updating values. | |
std::string | m_value_str |
Cached value string that will get cleared if/when the value is updated. | |
std::string | m_old_value_str |
Cached old value string from the last time the value was gotten. | |
std::string | m_location_str |
Cached location string that will get cleared if/when the value is updated. | |
std::string | m_summary_str |
Cached summary string that will get cleared if/when the value is updated. | |
std::string | m_object_desc_str |
Cached result of the "object printer". | |
CompilerType | m_override_type |
If the type of the value object should be overridden, the type to impose. | |
ValueObjectManager * | m_manager = nullptr |
This object is managed by the root object (any ValueObject that gets created without a parent.) The manager gets passed through all the generations of dependent objects, and will keep the whole cluster of objects alive as long as a shared pointer to any of them has been handed out. | |
ChildrenManager | m_children |
std::map< ConstString, ValueObject * > | m_synthetic_children |
ValueObject * | m_dynamic_value = nullptr |
ValueObject * | m_synthetic_value = nullptr |
ValueObject * | m_deref_valobj = nullptr |
lldb::ValueObjectSP | m_addr_of_valobj_sp |
We have to hold onto a shared pointer to this one because it is created as an independent ValueObjectConstResult, which isn't managed by us. | |
lldb::Format | m_format = lldb::eFormatDefault |
lldb::Format | m_last_format = lldb::eFormatDefault |
uint32_t | m_last_format_mgr_revision = 0 |
lldb::TypeSummaryImplSP | m_type_summary_sp |
lldb::TypeFormatImplSP | m_type_format_sp |
lldb::SyntheticChildrenSP | m_synthetic_children_sp |
ProcessModID | m_user_id_of_forced_summary |
AddressType | m_address_type_of_ptr_or_ref_children = eAddressTypeInvalid |
llvm::SmallVector< uint8_t, 16 > | m_value_checksum |
lldb::LanguageType | m_preferred_display_language = lldb::eLanguageTypeUnknown |
uint64_t | m_language_flags = 0 |
UserID | m_id |
Unique identifier for every value object. | |
struct lldb_private::ValueObject::Bitflags | m_flags |
Private Member Functions | |
ValueObjectVariable (ExecutionContextScope *exe_scope, ValueObjectManager &manager, const lldb::VariableSP &var_sp) | |
ValueObjectVariable (const ValueObjectVariable &)=delete | |
const ValueObjectVariable & | operator= (const ValueObjectVariable &)=delete |
A ValueObject that contains a root variable that may or may not have children.
Definition at line 34 of file ValueObjectVariable.h.
|
overridedefault |
|
private |
Definition at line 58 of file ValueObjectVariable.cpp.
References lldb_private::ValueObject::m_name, and m_variable_sp.
|
privatedelete |
|
overridevirtual |
Should only be called by ValueObject::GetNumChildren().
Implements lldb_private::ValueObject.
Definition at line 97 of file ValueObjectVariable.cpp.
References lldb_private::ValueObject::GetCompilerType(), lldb_private::ValueObject::GetExecutionContextRef(), lldb_private::CompilerType::GetNumChildren(), and lldb_private::CompilerType::IsValid().
|
static |
Definition at line 52 of file ValueObjectVariable.cpp.
References lldb_private::ClusterManager< T >::Create().
Referenced by CommandObjectTargetVariable::DoExecute(), CommandObjectTargetVariable::DumpGlobalVariableList(), lldb_private::ClangExpressionDeclMap::FindExternalVisibleDecls(), lldb::SBTarget::FindGlobalVariables(), lldb::SBModule::FindGlobalVariables(), lldb_private::StackFrame::GetValueObjectForFrameVariable(), lldb_private::Variable::GetValuesForVariableExpressionPath(), lldb::SBBlock::GetVariables(), lldb_private::ClangExpressionDeclMap::LookupLocalVariable(), lldb_private::FormatEntity::PrettyPrintFunctionArguments(), and EntityVariable::SetupValueObject().
|
overrideprotectedvirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 253 of file ValueObjectVariable.cpp.
References lldb_private::eAddressTypeFile, lldb_private::eAddressTypeHost, lldb_private::eAddressTypeLoad, lldb_private::Value::FileAddress, lldb_private::ValueObject::GetCompilerType(), lldb_private::ValueObject::GetExecutionContextRef(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::CompilerType::GetTypeInfo(), lldb_private::ValueObject::GetValue(), lldb_private::Value::GetValueType(), lldb_private::Value::HostAddress, lldb_private::Value::Invalid, lldb_private::Process::IsAlive(), lldb_private::Value::LoadAddress, lldb_private::Value::Scalar, and lldb_private::ValueObject::SetAddressTypeOfChildren().
|
overridevirtual |
Implements lldb_private::ValueObject.
Definition at line 109 of file ValueObjectVariable.cpp.
References lldb_private::ExecutionContext::GetBestExecutionContextScope(), lldb_private::CompilerType::GetByteSize(), lldb_private::ValueObject::GetCompilerType(), lldb_private::ValueObject::GetExecutionContextRef(), and lldb_private::CompilerType::IsValid().
|
overrideprotectedvirtual |
Implements lldb_private::ValueObject.
Definition at line 69 of file ValueObjectVariable.cpp.
References lldb_private::Type::GetForwardCompilerType(), and m_variable_sp.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 342 of file ValueObjectVariable.cpp.
References m_variable_sp.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 83 of file ValueObjectVariable.cpp.
References lldb_private::CompilerType::GetDisplayTypeName(), lldb_private::Type::GetForwardCompilerType(), and m_variable_sp.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 350 of file ValueObjectVariable.cpp.
References lldb_private::Value::GetContextType(), lldb_private::ValueObject::GetLocationAsCString(), lldb_private::ValueObject::GetLocationAsCStringImpl(), lldb_private::ValueObject::m_data, m_resolved_value, and lldb_private::Value::RegisterInfo.
|
overridevirtual |
Return the module associated with this value object in case the value is from an executable file and might have its data in sections of the file.
This can be used for variables.
Reimplemented from lldb_private::ValueObject.
Definition at line 326 of file ValueObjectVariable.cpp.
References lldb_private::SymbolContextScope::CalculateSymbolContextModule(), and m_variable_sp.
Referenced by UpdateValue().
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 90 of file ValueObjectVariable.cpp.
References lldb_private::Type::GetQualifiedName(), and m_variable_sp.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 336 of file ValueObjectVariable.cpp.
References m_variable_sp.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 76 of file ValueObjectVariable.cpp.
References lldb_private::Type::GetName(), and m_variable_sp.
|
overridevirtual |
Implements lldb_private::ValueObject.
Definition at line 120 of file ValueObjectVariable.cpp.
References lldb::eValueTypeInvalid, and m_variable_sp.
|
inlineoverridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 67 of file ValueObjectVariable.h.
References m_variable_sp.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 308 of file ValueObjectVariable.cpp.
References lldb_private::ValueObject::GetExecutionContextRef(), lldb_private::ExecutionContext::GetFramePtr(), lldb_private::ExecutionContextRef::HasFrameRef(), and m_variable_sp.
|
privatedelete |
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 387 of file ValueObjectVariable.cpp.
References error(), lldb_private::Value::GetContextType(), lldb_private::ValueObject::GetExecutionContextRef(), lldb_private::ExecutionContext::GetRegisterContext(), lldb_private::Value::GetRegisterInfo(), m_resolved_value, lldb_private::Value::RegisterInfo, lldb_private::ValueObject::SetData(), lldb_private::ValueObject::SetNeedsUpdate(), lldb_private::RegisterValue::SetValueFromData(), lldb_private::ValueObject::UpdateValueIfNeeded(), and lldb_private::RegisterContext::WriteRegister().
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 357 of file ValueObjectVariable.cpp.
References error(), lldb_private::Value::GetContextType(), lldb_private::ValueObject::GetExecutionContextRef(), lldb_private::ExecutionContext::GetRegisterContext(), lldb_private::Value::GetRegisterInfo(), m_resolved_value, lldb_private::Value::RegisterInfo, lldb_private::ValueObject::SetNeedsUpdate(), lldb_private::ValueObject::SetValueFromCString(), lldb_private::RegisterValue::SetValueFromString(), lldb_private::ValueObject::UpdateValueIfNeeded(), and lldb_private::RegisterContext::WriteRegister().
|
overrideprotectedvirtual |
Implements lldb_private::ValueObject.
Definition at line 126 of file ValueObjectVariable.cpp.
References lldb_private::Variable::CalculateSymbolContext(), lldb_private::ValueObject::CanProvideValue(), lldb_private::Status::Clear(), lldb_private::Value::ConvertToLoadAddress(), lldb_private::DWARFExpressionList::Evaluate(), lldb_private::Value::FileAddress, lldb_private::SymbolContext::function, lldb_private::ArchSpec::GetAddressByteSize(), lldb_private::Function::GetAddressRange(), lldb_private::Target::GetArchitecture(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::Value::GetBuffer(), lldb_private::ArchSpec::GetByteOrder(), lldb_private::DataExtractor::GetByteSize(), lldb_private::DataBufferHeap::GetByteSize(), lldb_private::ValueObject::GetCompilerType(), lldb_private::DataExtractor::GetDataStart(), lldb_private::ValueObject::GetExecutionContextRef(), lldb_private::DWARFExpressionList::GetExpressionData(), lldb_private::Address::GetLoadAddress(), lldb_private::Variable::GetLocationIsConstantValueData(), GetModule(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Value::GetScalar(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::Value::GetValueAsData(), lldb_private::Value::GetValueByteSize(), lldb_private::Value::GetValueType(), lldb_private::Value::HostAddress, lldb_private::Value::Invalid, lldb_private::Process::IsAlive(), lldb_private::DWARFExpressionList::IsAlwaysValidSingleExpr(), lldb_private::CompilerType::IsValid(), LLDB_INVALID_ADDRESS, lldb_private::Value::LoadAddress, lldb_private::Variable::LocationExpressionList(), lldb_private::ValueObject::m_data, lldb_private::ValueObject::m_error, m_resolved_value, lldb_private::ValueObject::m_value, m_variable_sp, lldb_private::Value::ResizeData(), lldb_private::Value::Scalar, lldb_private::DataExtractor::SetAddressByteSize(), lldb_private::DataExtractor::SetByteOrder(), lldb_private::Value::SetBytes(), lldb_private::Value::SetCompilerType(), lldb_private::Value::SetContext(), lldb_private::Status::SetErrorString(), lldb_private::ValueObject::SetValueDidChange(), lldb_private::ValueObject::SetValueIsValid(), lldb_private::Status::Success(), and lldb_private::Value::Variable.
|
protected |
Definition at line 80 of file ValueObjectVariable.h.
Referenced by GetLocationAsCString(), SetData(), SetValueFromCString(), and UpdateValue().
|
protected |
The variable that this value object is based upon.
The value that DWARFExpression resolves this variable to before we patch it up.
Definition at line 77 of file ValueObjectVariable.h.
Referenced by GetCompilerTypeImpl(), GetDeclaration(), GetDisplayTypeName(), GetModule(), GetQualifiedTypeName(), GetSymbolContextScope(), GetTypeName(), GetValueType(), GetVariable(), IsInScope(), UpdateValue(), and ValueObjectVariable().