LLDB mainline
|
A ValueObject that obtains its children from some source other than real information. More...
#include <ValueObjectSynthetic.h>
Protected Types | |
typedef std::map< uint32_t, ValueObject * > | ByIndexMap |
typedef std::map< const char *, uint32_t > | NameToIndexMap |
typedef std::vector< lldb::ValueObjectSP > | SyntheticChildrenCache |
typedef ByIndexMap::iterator | ByIndexIterator |
typedef NameToIndexMap::iterator | NameToIndexIterator |
Protected Types inherited from lldb_private::ValueObject | |
typedef ClusterManager< ValueObject > | ValueObjectManager |
Protected Attributes | |
lldb::SyntheticChildrenSP | m_synth_sp |
std::unique_ptr< SyntheticChildrenFrontEnd > | m_synth_filter_up |
std::mutex | m_child_mutex |
ByIndexMap | m_children_byindex |
Guarded by m_child_mutex;. | |
NameToIndexMap | m_name_toindex |
Guarded by m_child_mutex;. | |
SyntheticChildrenCache | m_synthetic_children_cache |
Guarded by m_child_mutex;. | |
uint32_t | m_synthetic_children_count |
ConstString | m_parent_type_name |
LazyBool | m_might_have_children |
LazyBool | m_provides_value |
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 | |
ValueObjectSynthetic (ValueObject &parent, lldb::SyntheticChildrenSP filter) | |
void | CopyValueData (ValueObject *source) |
ValueObjectSynthetic (const ValueObjectSynthetic &)=delete | |
const ValueObjectSynthetic & | operator= (const ValueObjectSynthetic &)=delete |
Friends | |
class | ValueObject |
A ValueObject that obtains its children from some source other than real information.
This is currently used to implement Python-based children and filters but you can bind it to any source of synthetic information and have it behave accordingly.
Definition at line 36 of file ValueObjectSynthetic.h.
|
protected |
Definition at line 146 of file ValueObjectSynthetic.h.
|
protected |
Definition at line 142 of file ValueObjectSynthetic.h.
|
protected |
Definition at line 147 of file ValueObjectSynthetic.h.
|
protected |
Definition at line 143 of file ValueObjectSynthetic.h.
|
protected |
Definition at line 144 of file ValueObjectSynthetic.h.
|
overridedefault |
|
private |
Definition at line 53 of file ValueObjectSynthetic.cpp.
References CopyValueData(), CreateSynthFilter(), lldb_private::eLazyBoolCalculate, lldb_private::ValueObject::GetName(), GetTypeName(), m_children_byindex, m_might_have_children, m_name_toindex, lldb_private::ValueObject::m_parent, m_parent_type_name, m_provides_value, m_synth_sp, m_synthetic_children_cache, m_synthetic_children_count, lldb_private::ValueObject::SetName(), UINT32_MAX, and ValueObject.
Referenced by operator=(), and ValueObjectSynthetic().
|
privatedelete |
References ValueObjectSynthetic().
|
overridevirtual |
Should only be called by ValueObject::GetNumChildren().
Implements lldb_private::ValueObject.
Definition at line 90 of file ValueObjectSynthetic.cpp.
References lldb_private::DataFormatters, lldb_private::GetLog(), lldb_private::ValueObject::GetName(), GetTypeName(), LLDB_LOGF, m_synth_filter_up, m_synthetic_children_count, UINT32_MAX, and lldb_private::ValueObject::UpdateValueIfNeeded().
|
inlineoverridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 71 of file ValueObjectSynthetic.h.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 377 of file ValueObjectSynthetic.cpp.
References lldb_private::eLazyBoolYes, lldb_private::ValueObject::m_parent, m_provides_value, and lldb_private::ValueObject::UpdateValueIfNeeded().
|
inlineoverrideprotectedvirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 129 of file ValueObjectSynthetic.h.
References lldb_private::eLazyBoolYes.
|
private |
Definition at line 369 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::GetExecutionContextRef(), lldb_private::ValueObject::GetModule(), lldb_private::ValueObject::GetValue(), lldb_private::ValueObject::m_data, lldb_private::ValueObject::m_error, lldb_private::ValueObject::m_value, lldb_private::ValueObject::UpdateValueIfNeeded(), and ValueObject.
Referenced by UpdateValue(), and ValueObjectSynthetic().
|
protectedvirtual |
Definition at line 144 of file ValueObjectSynthetic.cpp.
References error(), lldb_private::CompilerType::IsPointerOrReferenceType(), lldb_private::CompilerType::IsValid(), lldb_private::ValueObject::m_parent, m_synth_filter_up, m_synth_sp, and ValueObject.
Referenced by UpdateValue(), and ValueObjectSynthetic().
|
inlineoverridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 102 of file ValueObjectSynthetic.h.
References lldb_private::eLazyBoolYes, m_provides_value, and lldb_private::ValueObject::UpdateValueIfNeeded().
|
overridevirtual |
Implements lldb_private::ValueObject.
Definition at line 136 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::m_parent.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 245 of file ValueObjectSynthetic.cpp.
References lldb_private::DataFormatters, lldb_private::GetLog(), lldb_private::ValueObject::GetName(), GetPreferredDisplayLanguage(), lldb_private::ValueObject::GetSP(), LLDB_LOGF, m_child_mutex, m_children_byindex, m_synth_filter_up, m_synthetic_children_cache, lldb_private::ValueObject::UpdateValueIfNeeded(), and ValueObject.
Referenced by GetChildMemberWithName().
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 318 of file ValueObjectSynthetic.cpp.
References GetChildAtIndex(), GetIndexOfChildWithName(), and lldb_private::ValueObject::UpdateValueIfNeeded().
|
overrideprotectedvirtual |
Implements lldb_private::ValueObject.
Definition at line 70 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::m_parent.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 427 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::GetDeclaration(), and lldb_private::ValueObject::m_parent.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 82 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::m_parent, and m_synth_filter_up.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 121 of file ValueObjectSynthetic.cpp.
References GetDynamicValueType(), lldb_private::ValueObject::GetSP(), IsDynamic(), and lldb_private::ValueObject::m_parent.
|
inlinevirtual |
Definition at line 81 of file ValueObjectSynthetic.h.
References lldb::eNoDynamicValues, and lldb_private::ValueObject::m_parent.
Referenced by GetDynamicValue().
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 333 of file ValueObjectSynthetic.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::ConstString::GetCString(), m_child_mutex, m_name_toindex, m_synth_filter_up, and lldb_private::ValueObject::UpdateValueIfNeeded().
Referenced by GetChildMemberWithName().
|
inlineoverridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 106 of file ValueObjectSynthetic.h.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 434 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::GetLanguageFlags(), and lldb_private::ValueObject::m_parent.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 365 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::m_parent.
|
inlineoverridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 94 of file ValueObjectSynthetic.h.
References lldb_private::ValueObject::m_parent, and ValueObject.
|
inlineoverridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 90 of file ValueObjectSynthetic.h.
References lldb_private::ValueObject::m_parent, and ValueObject.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 406 of file ValueObjectSynthetic.cpp.
References lldb::eLanguageTypeUnknown, lldb_private::ValueObject::m_parent, and lldb_private::ValueObject::m_preferred_display_language.
Referenced by GetChildAtIndex().
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 78 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::m_parent.
|
inlineoverridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 77 of file ValueObjectSynthetic.h.
References lldb_private::ValueObject::GetSP(), and lldb_private::ValueObject::m_parent.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 74 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::m_parent.
Referenced by CalculateNumChildren(), and ValueObjectSynthetic().
|
overridevirtual |
Implements lldb_private::ValueObject.
Definition at line 140 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::m_parent.
|
inlineoverridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 86 of file ValueObjectSynthetic.h.
References lldb_private::ValueObject::m_parent.
|
inlineoverridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 67 of file ValueObjectSynthetic.h.
|
inlineoverridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 73 of file ValueObjectSynthetic.h.
References lldb_private::ValueObject::m_parent.
Referenced by GetDynamicValue().
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 363 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::m_parent.
|
inlineoverridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 69 of file ValueObjectSynthetic.h.
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 415 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::m_parent.
|
overridevirtual |
Find out if a ValueObject might have children.
This call is much more efficient than CalculateNumChildren() as it doesn't need to complete the underlying type. This is designed to be used in a UI environment in order to detect if the disclosure triangle should be displayed or not.
This function returns true for class, union, structure, pointers, references, arrays and more. Again, it does so without doing any expensive type completion.
Reimplemented from lldb_private::ValueObject.
Definition at line 129 of file ValueObjectSynthetic.cpp.
References lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, m_might_have_children, and m_synth_filter_up.
|
privatedelete |
References ValueObjectSynthetic().
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 390 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::ClearUserVisibleData(), lldb_private::ValueObject::eClearUserVisibleDataItemsAll, lldb_private::ValueObject::m_parent, and lldb_private::ValueObject::SetFormat().
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 440 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::m_parent, and lldb_private::ValueObject::SetLanguageFlags().
void ValueObjectSynthetic::SetPreferredDisplayLanguage | ( | lldb::LanguageType | lang | ) |
Definition at line 399 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::m_parent, and lldb_private::ValueObject::SetPreferredDisplayLanguage().
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 421 of file ValueObjectSynthetic.cpp.
References lldb_private::ValueObject::m_parent, and lldb_private::ValueObject::SetSyntheticChildrenGenerated().
|
overridevirtual |
Reimplemented from lldb_private::ValueObject.
Definition at line 385 of file ValueObjectSynthetic.cpp.
References error(), and lldb_private::ValueObject::m_parent.
|
overrideprotectedvirtual |
Implements lldb_private::ValueObject.
Definition at line 160 of file ValueObjectSynthetic.cpp.
References lldb_private::ConstString::AsCString(), CopyValueData(), CreateSynthFilter(), lldb_private::DataFormatters, lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb::eRefetch, lldb_private::GetLog(), lldb_private::ValueObject::GetName(), LLDB_LOGF, m_child_mutex, m_children_byindex, lldb_private::ValueObject::m_error, lldb_private::ValueObject::m_flags, m_might_have_children, m_name_toindex, lldb_private::ValueObject::m_parent, m_parent_type_name, m_provides_value, m_synth_filter_up, m_synthetic_children_cache, m_synthetic_children_count, lldb_private::ValueObject::SetValueIsValid(), and UINT32_MAX.
|
friend |
Definition at line 168 of file ValueObjectSynthetic.h.
References ValueObject.
Referenced by CopyValueData(), CreateSynthFilter(), GetChildAtIndex(), GetParent(), GetParent(), ValueObject, and ValueObjectSynthetic().
|
protected |
Definition at line 149 of file ValueObjectSynthetic.h.
Referenced by GetChildAtIndex(), GetIndexOfChildWithName(), and UpdateValue().
|
protected |
Guarded by m_child_mutex;.
Definition at line 151 of file ValueObjectSynthetic.h.
Referenced by GetChildAtIndex(), UpdateValue(), and ValueObjectSynthetic().
|
protected |
Definition at line 163 of file ValueObjectSynthetic.h.
Referenced by MightHaveChildren(), UpdateValue(), and ValueObjectSynthetic().
|
protected |
Guarded by m_child_mutex;.
Definition at line 153 of file ValueObjectSynthetic.h.
Referenced by GetIndexOfChildWithName(), UpdateValue(), and ValueObjectSynthetic().
|
protected |
Definition at line 161 of file ValueObjectSynthetic.h.
Referenced by UpdateValue(), and ValueObjectSynthetic().
|
protected |
Definition at line 165 of file ValueObjectSynthetic.h.
Referenced by CanProvideValue(), DoesProvideSyntheticValue(), UpdateValue(), and ValueObjectSynthetic().
|
protected |
Definition at line 140 of file ValueObjectSynthetic.h.
Referenced by CalculateNumChildren(), CreateSynthFilter(), GetChildAtIndex(), GetDisplayTypeName(), GetIndexOfChildWithName(), MightHaveChildren(), and UpdateValue().
|
protected |
Definition at line 139 of file ValueObjectSynthetic.h.
Referenced by CreateSynthFilter(), and ValueObjectSynthetic().
|
protected |
Guarded by m_child_mutex;.
Definition at line 155 of file ValueObjectSynthetic.h.
Referenced by GetChildAtIndex(), UpdateValue(), and ValueObjectSynthetic().
|
protected |
Definition at line 159 of file ValueObjectSynthetic.h.
Referenced by CalculateNumChildren(), UpdateValue(), and ValueObjectSynthetic().