|
LLDB mainline
|
A class that represents a virtual function table for a C++ class. More...
#include <ValueObjectVTable.h>
Static Public Member Functions | |
| static lldb::ValueObjectSP | Create (ValueObject &parent) |
| Static Public Member Functions inherited from lldb_private::ValueObject | |
| 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, bool do_deref=true) |
| Given an address either create a value object containing the value at that address, or create a value object containing the address itself (pointer value), depending on whether the parameter 'do_deref' is true or false. | |
| static lldb::ValueObjectSP | CreateValueObjectFromData (llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type) |
| static lldb::ValueObjectSP | CreateValueObjectFromAPInt (lldb::TargetSP target, const llvm::APInt &v, CompilerType type, llvm::StringRef name) |
| Create a value object containing the given APInt value. | |
| static lldb::ValueObjectSP | CreateValueObjectFromAPFloat (lldb::TargetSP target, const llvm::APFloat &v, CompilerType type, llvm::StringRef name) |
| Create a value object containing the given APFloat value. | |
| static lldb::ValueObjectSP | CreateValueObjectFromScalar (lldb::TargetSP target, Scalar &s, CompilerType type, llvm::StringRef name) |
| Create a value object containing the given Scalar value. | |
| static lldb::ValueObjectSP | CreateValueObjectFromBool (lldb::TargetSP target, bool value, llvm::StringRef name) |
| Create a value object containing the given boolean value. | |
| static lldb::ValueObjectSP | CreateValueObjectFromNullptr (lldb::TargetSP target, CompilerType type, llvm::StringRef name) |
| Create a nullptr value object with the specified type (must be a nullptr type). | |
Protected Attributes | |
| const Symbol * | m_vtable_symbol = nullptr |
| The symbol for the C++ virtual function table. | |
| uint32_t | m_num_vtable_entries = 0 |
| Cache the number of vtable children when we update the value. | |
| uint32_t | m_addr_size = 0 |
| Cache the address size in bytes to avoid checking with the process to many times. | |
| Protected Attributes inherited from lldb_private::ValueObject | |
| 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 | |
| ValueObjectVTable (ValueObject &parent) | |
| ValueObject * | CreateChildAtIndex (size_t idx) override |
| Should only be called by ValueObject::GetChildAtIndex(). | |
| ValueObject * | CreateSyntheticArrayMember (size_t idx) override |
| Should only be called by ValueObject::GetSyntheticArrayMember(). | |
| ValueObjectVTable (const ValueObjectVTable &)=delete | |
| const ValueObjectVTable & | operator= (const ValueObjectVTable &)=delete |
A class that represents a virtual function table for a C++ class.
ValueObject::GetError() will be in the success state if this value represents a C++ class with a vtable, or an appropriate error describing that the object isn't a C++ class with a vtable or not a C++ class.
ValueObject::GetName() will be the demangled symbol name for the virtual function table like "vtable for <classname>".
ValueObject::GetValueAsCString() will be the address of the first vtable entry if the current ValueObject is a class with a vtable, or nothing the current ValueObject is not a C++ class or not a C++ class that has a vtable.
ValueObject::GetValueAtUnsigned(...) will return the address of the first vtable entry.
ValueObject::GetAddressOf() will return the address of the vtable pointer found in the parent ValueObject.
ValueObject::GetNumChildren() will return the number of virtual function pointers in the vtable, or zero on error.
ValueObject::GetChildAtIndex(...) will return each virtual function pointer as a ValueObject object.
The child ValueObjects will have the following values:
ValueObject::GetError() will indicate success if the vtable entry was successfully read from memory, or an error if not.
ValueObject::GetName() will be the vtable function index in the form "[%u]" where u is the index.
ValueObject::GetValueAsCString() will be the virtual function pointer value
ValueObject::GetValueAtUnsigned(...) will return the virtual function pointer value.
ValueObject::GetAddressOf() will return the address of the virtual function pointer.
ValueObject::GetNumChildren() returns 0
Definition at line 59 of file ValueObjectVTable.h.
|
overridedefault |
References lldb_private::ValueObject::ValueObject().
|
private |
Definition at line 152 of file ValueObjectVTable.cpp.
References lldb::eFormatPointer, lldb_private::ValueObject::SetFormat(), and lldb_private::ValueObject::ValueObject().
Referenced by Create(), operator=(), and ValueObjectVTable().
|
privatedelete |
References ValueObjectVTable().
|
overridevirtual |
Should only be called by ValueObject::GetNumChildren().
Implements lldb_private::ValueObject.
Definition at line 163 of file ValueObjectVTable.cpp.
References m_num_vtable_entries, and lldb_private::ValueObject::UpdateValueIfNeeded().
|
static |
Definition at line 148 of file ValueObjectVTable.cpp.
References lldb_private::ValueObject::ValueObject(), and ValueObjectVTable().
Referenced by lldb_private::ValueObject::GetVTable().
|
overrideprivatevirtual |
Should only be called by ValueObject::GetChildAtIndex().
Reimplemented from lldb_private::ValueObject.
Definition at line 187 of file ValueObjectVTable.cpp.
References m_addr_size, and lldb_private::ValueObject::ValueObject().
|
inlineoverrideprivatevirtual |
Should only be called by ValueObject::GetSyntheticArrayMember().
Reimplemented from lldb_private::ValueObject.
Definition at line 96 of file ValueObjectVTable.h.
References lldb_private::ValueObject::ValueObject().
|
overridevirtual |
Implements lldb_private::ValueObject.
Definition at line 157 of file ValueObjectVTable.cpp.
References m_vtable_symbol.
|
overrideprotectedvirtual |
Implements lldb_private::ValueObject.
Definition at line 269 of file ValueObjectVTable.cpp.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 179 of file ValueObjectVTable.cpp.
References m_vtable_symbol.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 177 of file ValueObjectVTable.cpp.
References GetTypeName().
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 171 of file ValueObjectVTable.cpp.
References m_vtable_symbol.
Referenced by GetQualifiedTypeName(), and UpdateValue().
|
overridevirtual |
Implements lldb_private::ValueObject.
Definition at line 169 of file ValueObjectVTable.cpp.
References lldb::eValueTypeVTable.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 185 of file ValueObjectVTable.cpp.
References lldb_private::ValueObject::GetParent(), and lldb_private::ValueObject::IsInScope().
|
privatedelete |
References ValueObjectVTable().
|
overrideprotectedvirtual |
Implements lldb_private::ValueObject.
Definition at line 191 of file ValueObjectVTable.cpp.
References lldb_private::ValueObject::AddrAndType::address, lldb::eBasicTypeUnsignedLong, lldb::eLanguageTypeC_plus_plus, lldb_private::Status::FromError(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::ValueObject::GetAddressOf(), lldb_private::Language::GetNameForLanguageType(), lldb_private::ValueObject::GetObjectRuntimeLanguage(), lldb_private::ValueObject::GetParent(), lldb_private::ValueObject::GetProcessSP(), lldb_private::ValueObject::GetTargetSP(), GetTypeName(), lldb_private::LanguageRuntime::GetVTableInfo(), lldb_private::Value::LoadAddress, m_addr_size, lldb_private::ValueObject::m_error, lldb_private::ValueObject::m_flags, m_num_vtable_entries, lldb_private::ValueObject::m_value, m_vtable_symbol, lldb_private::ValueObject::SetName(), lldb_private::ValueObject::SetValueDidChange(), lldb_private::ValueObject::SetValueIsValid(), and lldb_private::ValueObject::ValueObject().
|
protected |
Cache the address size in bytes to avoid checking with the process to many times.
Definition at line 90 of file ValueObjectVTable.h.
Referenced by CreateChildAtIndex(), and UpdateValue().
|
protected |
Cache the number of vtable children when we update the value.
Definition at line 87 of file ValueObjectVTable.h.
Referenced by CalculateNumChildren(), and UpdateValue().
|
protected |
The symbol for the C++ virtual function table.
Definition at line 85 of file ValueObjectVTable.h.
Referenced by GetByteSize(), GetDisplayTypeName(), GetTypeName(), and UpdateValue().