LLDB mainline
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
lldb_private::ValueObjectSynthetic Class Reference

A ValueObject that obtains its children from some source other than real information. More...

#include <ValueObjectSyntheticFilter.h>

Inheritance diagram for lldb_private::ValueObjectSynthetic:
Inheritance graph
[legend]

Public Member Functions

 ~ValueObjectSynthetic () override
 
std::optional< uint64_t > GetByteSize () override
 
ConstString GetTypeName () override
 
ConstString GetQualifiedTypeName () override
 
ConstString GetDisplayTypeName () override
 
bool MightHaveChildren () override
 Find out if a ValueObject might have children.
 
llvm::Expected< uint32_t > CalculateNumChildren (uint32_t max) override
 Should only be called by ValueObject::GetNumChildren().
 
lldb::ValueType GetValueType () const override
 
lldb::ValueObjectSP GetChildAtIndex (uint32_t idx, bool can_create=true) override
 
lldb::ValueObjectSP GetChildMemberWithName (llvm::StringRef name, bool can_create=true) override
 
size_t GetIndexOfChildWithName (llvm::StringRef name) override
 
lldb::ValueObjectSP GetDynamicValue (lldb::DynamicValueType valueType) override
 
bool IsInScope () override
 
bool HasSyntheticValue () override
 
bool IsSynthetic () override
 
void CalculateSyntheticValue () override
 
bool IsDynamic () override
 
lldb::ValueObjectSP GetStaticValue () override
 
virtual lldb::DynamicValueType GetDynamicValueType ()
 
lldb::VariableSP GetVariable () override
 
ValueObjectGetParent () override
 
const ValueObjectGetParent () const override
 
lldb::ValueObjectSP GetNonSyntheticValue () override
 
bool CanProvideValue () override
 
bool DoesProvideSyntheticValue () override
 
bool GetIsConstant () const override
 
bool SetValueFromCString (const char *value_str, Status &error) override
 
void SetFormat (lldb::Format format) override
 
lldb::LanguageType GetPreferredDisplayLanguage () override
 
void SetPreferredDisplayLanguage (lldb::LanguageType)
 
bool IsSyntheticChildrenGenerated () override
 
void SetSyntheticChildrenGenerated (bool b) override
 
bool GetDeclaration (Declaration &decl) override
 
uint64_t GetLanguageFlags () override
 
void SetLanguageFlags (uint64_t flags) override
 
- Public Member Functions inherited from lldb_private::ValueObject
virtual ~ValueObject ()
 
const EvaluationPointGetUpdatePoint () const
 
EvaluationPointGetUpdatePoint ()
 
const ExecutionContextRefGetExecutionContextRef () const
 
lldb::TargetSP GetTargetSP () const
 
lldb::ProcessSP GetProcessSP () const
 
lldb::ThreadSP GetThreadSP () const
 
lldb::StackFrameSP GetFrameSP () const
 
void SetNeedsUpdate ()
 
CompilerType GetCompilerType ()
 
virtual TypeImpl GetTypeImpl ()
 
virtual bool CanProvideValue ()
 
virtual std::optional< uint64_t > GetByteSize ()=0
 
virtual lldb::ValueType GetValueType () const =0
 
virtual ConstString GetTypeName ()
 
virtual ConstString GetDisplayTypeName ()
 
virtual ConstString GetQualifiedTypeName ()
 
lldb::LanguageType GetObjectRuntimeLanguage ()
 
uint32_t GetTypeInfo (CompilerType *pointee_or_element_compiler_type=nullptr)
 
bool IsPointerType ()
 
bool IsArrayType ()
 
bool IsScalarType ()
 
bool IsPointerOrReferenceType ()
 
bool IsPossibleDynamicType ()
 
bool IsNilReference ()
 
bool IsUninitializedReference ()
 
virtual bool IsBaseClass ()
 
bool IsBaseClass (uint32_t &depth)
 
virtual bool IsDereferenceOfParent ()
 
bool IsIntegerType (bool &is_signed)
 
virtual void GetExpressionPath (Stream &s, GetExpressionPathFormat=eGetExpressionPathFormatDereferencePointers)
 
lldb::ValueObjectSP GetValueForExpressionPath (llvm::StringRef expression, ExpressionPathScanEndReason *reason_to_stop=nullptr, ExpressionPathEndResultType *final_value_type=nullptr, const GetValueForExpressionPathOptions &options=GetValueForExpressionPathOptions::DefaultOptions(), ExpressionPathAftermath *final_task_on_target=nullptr)
 
virtual bool IsInScope ()
 
virtual lldb::offset_t GetByteOffset ()
 
virtual uint32_t GetBitfieldBitSize ()
 
virtual uint32_t GetBitfieldBitOffset ()
 
bool IsBitfield ()
 
virtual const char * GetValueAsCString ()
 
virtual bool GetValueAsCString (const lldb_private::TypeFormatImpl &format, std::string &destination)
 
bool GetValueAsCString (lldb::Format format, std::string &destination)
 
virtual uint64_t GetValueAsUnsigned (uint64_t fail_value, bool *success=nullptr)
 
virtual int64_t GetValueAsSigned (int64_t fail_value, bool *success=nullptr)
 
llvm::Expected< llvm::APSInt > GetValueAsAPSInt ()
 If the current ValueObject is of an appropriate type, convert the value to an APSInt and return that.
 
llvm::Expected< llvm::APFloat > GetValueAsAPFloat ()
 If the current ValueObject is of an appropriate type, convert the value to an APFloat and return that.
 
llvm::Expected< bool > GetValueAsBool ()
 If the current ValueObject is of an appropriate type, convert the value to a boolean and return that.
 
void SetValueFromInteger (const llvm::APInt &value, Status &error)
 Update an existing integer ValueObject with a new integer value.
 
void SetValueFromInteger (lldb::ValueObjectSP new_val_sp, Status &error)
 Update an existing integer ValueObject with an integer value created frome 'new_val_sp'.
 
virtual bool SetValueFromCString (const char *value_str, Status &error)
 
virtual lldb::ModuleSP GetModule ()
 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.
 
ValueObjectGetRoot ()
 
ValueObjectFollowParentChain (std::function< bool(ValueObject *)>)
 Given a ValueObject, loop over itself and its parent, and its parent's parent, .
 
virtual bool GetDeclaration (Declaration &decl)
 
const StatusGetError ()
 
ConstString GetName () const
 
lldb::user_id_t GetID () const
 Returns a unique id for this ValueObject.
 
virtual lldb::ValueObjectSP GetChildAtIndex (uint32_t idx, bool can_create=true)
 
lldb::ValueObjectSP GetChildAtNamePath (llvm::ArrayRef< llvm::StringRef > names)
 
virtual lldb::ValueObjectSP GetChildMemberWithName (llvm::StringRef name, bool can_create=true)
 
virtual size_t GetIndexOfChildWithName (llvm::StringRef name)
 
llvm::Expected< uint32_t > GetNumChildren (uint32_t max=UINT32_MAX)
 
uint32_t GetNumChildrenIgnoringErrors (uint32_t max=UINT32_MAX)
 Like GetNumChildren but returns 0 on error.
 
bool HasChildren ()
 
const ValueGetValue () const
 
ValueGetValue ()
 
virtual bool ResolveValue (Scalar &scalar)
 
virtual bool IsLogicalTrue (Status &error)
 
virtual const char * GetLocationAsCString ()
 
const char * GetSummaryAsCString (lldb::LanguageType lang=lldb::eLanguageTypeUnknown)
 
bool GetSummaryAsCString (TypeSummaryImpl *summary_ptr, std::string &destination, lldb::LanguageType lang=lldb::eLanguageTypeUnknown)
 
bool GetSummaryAsCString (std::string &destination, const TypeSummaryOptions &options)
 
bool GetSummaryAsCString (TypeSummaryImpl *summary_ptr, std::string &destination, const TypeSummaryOptions &options)
 
llvm::Expected< std::string > GetObjectDescription ()
 
bool HasSpecialPrintableRepresentation (ValueObjectRepresentationStyle val_obj_display, lldb::Format custom_format)
 
bool DumpPrintableRepresentation (Stream &s, ValueObjectRepresentationStyle val_obj_display=eValueObjectRepresentationStyleSummary, lldb::Format custom_format=lldb::eFormatInvalid, PrintableRepresentationSpecialCases special=PrintableRepresentationSpecialCases::eAllow, bool do_dump_error=true)
 
bool GetValueIsValid () const
 
bool GetValueDidChange ()
 
bool UpdateValueIfNeeded (bool update_format=true)
 
bool UpdateFormatsIfNeeded ()
 
lldb::ValueObjectSP GetSP ()
 
void SetName (ConstString name)
 Change the name of the current ValueObject.
 
virtual lldb::addr_t GetAddressOf (bool scalar_is_load_address=true, AddressType *address_type=nullptr)
 
lldb::addr_t GetPointerValue (AddressType *address_type=nullptr)
 
lldb::ValueObjectSP GetSyntheticChild (ConstString key) const
 
lldb::ValueObjectSP GetSyntheticArrayMember (size_t index, bool can_create)
 
lldb::ValueObjectSP GetSyntheticBitFieldChild (uint32_t from, uint32_t to, bool can_create)
 
lldb::ValueObjectSP GetSyntheticExpressionPathChild (const char *expression, bool can_create)
 
virtual lldb::ValueObjectSP GetSyntheticChildAtOffset (uint32_t offset, const CompilerType &type, bool can_create, ConstString name_const_str=ConstString())
 
virtual lldb::ValueObjectSP GetSyntheticBase (uint32_t offset, const CompilerType &type, bool can_create, ConstString name_const_str=ConstString())
 
virtual lldb::ValueObjectSP GetDynamicValue (lldb::DynamicValueType valueType)
 
lldb::DynamicValueType GetDynamicValueType ()
 
virtual lldb::ValueObjectSP GetStaticValue ()
 
virtual lldb::ValueObjectSP GetNonSyntheticValue ()
 
lldb::ValueObjectSP GetSyntheticValue ()
 
virtual bool HasSyntheticValue ()
 
virtual bool IsSynthetic ()
 
lldb::ValueObjectSP GetQualifiedRepresentationIfAvailable (lldb::DynamicValueType dynValue, bool synthValue)
 
virtual lldb::ValueObjectSP CreateConstantValue (ConstString name)
 
virtual lldb::ValueObjectSP Dereference (Status &error)
 
virtual lldb::ValueObjectSP Clone (ConstString new_name)
 Creates a copy of the ValueObject with a new name and setting the current ValueObject as its parent.
 
virtual lldb::ValueObjectSP AddressOf (Status &error)
 
virtual lldb::addr_t GetLiveAddress ()
 
virtual void SetLiveAddress (lldb::addr_t addr=LLDB_INVALID_ADDRESS, AddressType address_type=eAddressTypeLoad)
 
lldb::ValueObjectSP Cast (const CompilerType &compiler_type)
 
virtual lldb::ValueObjectSP DoCast (const CompilerType &compiler_type)
 
virtual lldb::ValueObjectSP CastPointerType (const char *name, CompilerType &ast_type)
 
virtual lldb::ValueObjectSP CastPointerType (const char *name, lldb::TypeSP &type_sp)
 
lldb::addr_t GetLoadAddress ()
 Return the target load address associated with this value object.
 
llvm::Expected< lldb::ValueObjectSPCastDerivedToBaseType (CompilerType type, const llvm::ArrayRef< uint32_t > &base_type_indices)
 Take a ValueObject whose type is an inherited class, and cast it to 'type', which should be one of its base classes.
 
llvm::Expected< lldb::ValueObjectSPCastBaseToDerivedType (CompilerType type, uint64_t offset)
 Take a ValueObject whose type is a base class, and cast it to 'type', which should be one of its derived classes.
 
lldb::ValueObjectSP CastToBasicType (CompilerType type)
 
lldb::ValueObjectSP CastToEnumType (CompilerType type)
 
lldb::ValueObjectSP GetVTable ()
 If this object represents a C++ class with a vtable, return an object that represents the virtual function table.
 
void ValueUpdated ()
 
virtual bool IsDynamic ()
 
virtual bool DoesProvideSyntheticValue ()
 
virtual bool IsSyntheticChildrenGenerated ()
 
virtual void SetSyntheticChildrenGenerated (bool b)
 
virtual SymbolContextScopeGetSymbolContextScope ()
 
llvm::Error Dump (Stream &s)
 
llvm::Error Dump (Stream &s, const DumpValueObjectOptions &options)
 
lldb::ValueObjectSP Persist ()
 
bool IsCStringContainer (bool check_pointer=false)
 Returns true if this is a char* or a char[] if it is a char* and check_pointer is true, it also checks that the pointer is valid.
 
std::pair< size_t, bool > ReadPointedString (lldb::WritableDataBufferSP &buffer_sp, Status &error, bool honor_array)
 
virtual size_t GetPointeeData (DataExtractor &data, uint32_t item_idx=0, uint32_t item_count=1)
 
virtual uint64_t GetData (DataExtractor &data, Status &error)
 
virtual bool SetData (DataExtractor &data, Status &error)
 
virtual bool GetIsConstant () const
 
bool NeedsUpdating ()
 
void SetIsConstant ()
 
lldb::Format GetFormat () const
 
virtual void SetFormat (lldb::Format format)
 
virtual lldb::LanguageType GetPreferredDisplayLanguage ()
 
void SetPreferredDisplayLanguage (lldb::LanguageType lt)
 
lldb::TypeSummaryImplSP GetSummaryFormat ()
 
void SetSummaryFormat (lldb::TypeSummaryImplSP format)
 
void SetDerefValobj (ValueObject *deref)
 
ValueObjectGetDerefValobj ()
 
void SetValueFormat (lldb::TypeFormatImplSP format)
 
lldb::TypeFormatImplSP GetValueFormat ()
 
void SetSyntheticChildren (const lldb::SyntheticChildrenSP &synth_sp)
 
lldb::SyntheticChildrenSP GetSyntheticChildren ()
 
virtual ValueObjectGetParent ()
 
virtual const ValueObjectGetParent () const
 
ValueObjectGetNonBaseClassParent ()
 
void SetAddressTypeOfChildren (AddressType at)
 
AddressType GetAddressTypeOfChildren ()
 
void SetHasCompleteType ()
 
virtual bool MightHaveChildren ()
 Find out if a ValueObject might have children.
 
virtual lldb::VariableSP GetVariable ()
 
virtual bool IsRuntimeSupportValue ()
 
virtual uint64_t GetLanguageFlags ()
 
virtual void SetLanguageFlags (uint64_t flags)
 

Protected Types

typedef std::map< uint32_t, ValueObject * > ByIndexMap
 
typedef std::map< const char *, uint32_t > NameToIndexMap
 
typedef std::vector< lldb::ValueObjectSPSyntheticChildrenCache
 
typedef ByIndexMap::iterator ByIndexIterator
 
typedef NameToIndexMap::iterator NameToIndexIterator
 
- Protected Types inherited from lldb_private::ValueObject
typedef ClusterManager< ValueObjectValueObjectManager
 

Protected Member Functions

bool UpdateValue () override
 
LazyBool CanUpdateWithInvalidExecutionContext () override
 
CompilerType GetCompilerTypeImpl () override
 
virtual void CreateSynthFilter ()
 
- Protected Member Functions inherited from lldb_private::ValueObject
 ValueObject (ExecutionContextScope *exe_scope, ValueObjectManager &manager, AddressType child_ptr_or_ref_addr_type=eAddressTypeLoad)
 Use this constructor to create a "root variable object".
 
 ValueObject (ValueObject &parent)
 Use this constructor to create a ValueObject owned by another ValueObject.
 
ValueObjectManagerGetManager ()
 
virtual bool UpdateValue ()=0
 
virtual LazyBool CanUpdateWithInvalidExecutionContext ()
 
virtual void CalculateDynamicValue (lldb::DynamicValueType use_dynamic)
 
virtual lldb::DynamicValueType GetDynamicValueTypeImpl ()
 
virtual bool HasDynamicValueTypeInfo ()
 
virtual void CalculateSyntheticValue ()
 
virtual ValueObjectCreateChildAtIndex (size_t idx)
 Should only be called by ValueObject::GetChildAtIndex().
 
virtual ValueObjectCreateSyntheticArrayMember (size_t idx)
 Should only be called by ValueObject::GetSyntheticArrayMember().
 
virtual llvm::Expected< uint32_t > CalculateNumChildren (uint32_t max=UINT32_MAX)=0
 Should only be called by ValueObject::GetNumChildren().
 
void SetNumChildren (uint32_t num_children)
 
void SetValueDidChange (bool value_changed)
 
void SetValueIsValid (bool valid)
 
void ClearUserVisibleData (uint32_t items=ValueObject::eClearUserVisibleDataItemsAllStrings)
 
void AddSyntheticChild (ConstString key, ValueObject *valobj)
 
DataExtractorGetDataExtractor ()
 
void ClearDynamicTypeInformation ()
 
virtual CompilerType GetCompilerTypeImpl ()=0
 
const char * GetLocationAsCStringImpl (const Value &value, const DataExtractor &data)
 
bool IsChecksumEmpty ()
 
void SetPreferredDisplayLanguageIfNeeded (lldb::LanguageType)
 
virtual void DoUpdateChildrenAddressType (ValueObject &valobj)
 

Protected Attributes

lldb::SyntheticChildrenSP m_synth_sp
 
std::unique_ptr< SyntheticChildrenFrontEndm_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
ValueObjectm_parent = nullptr
 The parent value object, or nullptr if this has no parent.
 
ValueObjectm_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.
 
ValueObjectManagerm_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
 
ValueObjectm_dynamic_value = nullptr
 
ValueObjectm_synthetic_value = nullptr
 
ValueObjectm_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 ValueObjectSyntheticoperator= (const ValueObjectSynthetic &)=delete
 

Friends

class ValueObject
 

Additional Inherited Members

- Public Types inherited from lldb_private::ValueObject
enum  GetExpressionPathFormat { eGetExpressionPathFormatDereferencePointers = 1 , eGetExpressionPathFormatHonorPointers }
 
enum  ValueObjectRepresentationStyle {
  eValueObjectRepresentationStyleValue = 1 , eValueObjectRepresentationStyleSummary , eValueObjectRepresentationStyleLanguageSpecific , eValueObjectRepresentationStyleLocation ,
  eValueObjectRepresentationStyleChildrenCount , eValueObjectRepresentationStyleType , eValueObjectRepresentationStyleName , eValueObjectRepresentationStyleExpressionPath
}
 
enum  ExpressionPathScanEndReason {
  eExpressionPathScanEndReasonEndOfString = 1 , eExpressionPathScanEndReasonNoSuchChild , eExpressionPathScanEndReasonNoSuchSyntheticChild , eExpressionPathScanEndReasonEmptyRangeNotAllowed ,
  eExpressionPathScanEndReasonDotInsteadOfArrow , eExpressionPathScanEndReasonArrowInsteadOfDot , eExpressionPathScanEndReasonFragileIVarNotAllowed , eExpressionPathScanEndReasonRangeOperatorNotAllowed ,
  eExpressionPathScanEndReasonRangeOperatorInvalid , eExpressionPathScanEndReasonArrayRangeOperatorMet , eExpressionPathScanEndReasonBitfieldRangeOperatorMet , eExpressionPathScanEndReasonUnexpectedSymbol ,
  eExpressionPathScanEndReasonTakingAddressFailed , eExpressionPathScanEndReasonDereferencingFailed , eExpressionPathScanEndReasonRangeOperatorExpanded , eExpressionPathScanEndReasonSyntheticValueMissing ,
  eExpressionPathScanEndReasonUnknown = 0xFFFF
}
 
enum  ExpressionPathEndResultType {
  eExpressionPathEndResultTypePlain = 1 , eExpressionPathEndResultTypeBitfield , eExpressionPathEndResultTypeBoundedRange , eExpressionPathEndResultTypeUnboundedRange ,
  eExpressionPathEndResultTypeValueObjectList , eExpressionPathEndResultTypeInvalid = 0xFFFF
}
 
enum  ExpressionPathAftermath { eExpressionPathAftermathNothing = 1 , eExpressionPathAftermathDereference , eExpressionPathAftermathTakeAddress }
 
enum  ClearUserVisibleDataItems {
  eClearUserVisibleDataItemsNothing = 1u << 0 , eClearUserVisibleDataItemsValue = 1u << 1 , eClearUserVisibleDataItemsSummary = 1u << 2 , eClearUserVisibleDataItemsLocation = 1u << 3 ,
  eClearUserVisibleDataItemsDescription = 1u << 4 , eClearUserVisibleDataItemsSyntheticChildren = 1u << 5 , eClearUserVisibleDataItemsAllStrings , eClearUserVisibleDataItemsAll = 0xFFFF
}
 
enum class  PrintableRepresentationSpecialCases : bool { eDisable = false , eAllow = true }
 
- 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 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).
 

Detailed Description

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 ValueObjectSyntheticFilter.h.

Member Typedef Documentation

◆ ByIndexIterator

typedef ByIndexMap::iterator lldb_private::ValueObjectSynthetic::ByIndexIterator
protected

Definition at line 146 of file ValueObjectSyntheticFilter.h.

◆ ByIndexMap

typedef std::map<uint32_t, ValueObject *> lldb_private::ValueObjectSynthetic::ByIndexMap
protected

Definition at line 142 of file ValueObjectSyntheticFilter.h.

◆ NameToIndexIterator

typedef NameToIndexMap::iterator lldb_private::ValueObjectSynthetic::NameToIndexIterator
protected

Definition at line 147 of file ValueObjectSyntheticFilter.h.

◆ NameToIndexMap

typedef std::map<const char *, uint32_t> lldb_private::ValueObjectSynthetic::NameToIndexMap
protected

Definition at line 143 of file ValueObjectSyntheticFilter.h.

◆ SyntheticChildrenCache

Definition at line 144 of file ValueObjectSyntheticFilter.h.

Constructor & Destructor Documentation

◆ ~ValueObjectSynthetic()

ValueObjectSynthetic::~ValueObjectSynthetic ( )
overridedefault

◆ ValueObjectSynthetic() [1/2]

ValueObjectSynthetic::ValueObjectSynthetic ( ValueObject parent,
lldb::SyntheticChildrenSP  filter 
)
private

◆ ValueObjectSynthetic() [2/2]

lldb_private::ValueObjectSynthetic::ValueObjectSynthetic ( const ValueObjectSynthetic )
privatedelete

Member Function Documentation

◆ CalculateNumChildren()

llvm::Expected< uint32_t > ValueObjectSynthetic::CalculateNumChildren ( uint32_t  max)
overridevirtual

◆ CalculateSyntheticValue()

void lldb_private::ValueObjectSynthetic::CalculateSyntheticValue ( )
inlineoverridevirtual

Reimplemented from lldb_private::ValueObject.

Definition at line 71 of file ValueObjectSyntheticFilter.h.

◆ CanProvideValue()

bool ValueObjectSynthetic::CanProvideValue ( )
overridevirtual

◆ CanUpdateWithInvalidExecutionContext()

LazyBool lldb_private::ValueObjectSynthetic::CanUpdateWithInvalidExecutionContext ( )
inlineoverrideprotectedvirtual

Reimplemented from lldb_private::ValueObject.

Definition at line 129 of file ValueObjectSyntheticFilter.h.

References lldb_private::eLazyBoolYes.

◆ CopyValueData()

void ValueObjectSynthetic::CopyValueData ( ValueObject source)
private

◆ CreateSynthFilter()

void ValueObjectSynthetic::CreateSynthFilter ( )
protectedvirtual

◆ DoesProvideSyntheticValue()

bool lldb_private::ValueObjectSynthetic::DoesProvideSyntheticValue ( )
inlineoverridevirtual

◆ GetByteSize()

std::optional< uint64_t > ValueObjectSynthetic::GetByteSize ( )
overridevirtual

◆ GetChildAtIndex()

lldb::ValueObjectSP ValueObjectSynthetic::GetChildAtIndex ( uint32_t  idx,
bool  can_create = true 
)
overridevirtual

◆ GetChildMemberWithName()

lldb::ValueObjectSP ValueObjectSynthetic::GetChildMemberWithName ( llvm::StringRef  name,
bool  can_create = true 
)
overridevirtual

◆ GetCompilerTypeImpl()

CompilerType ValueObjectSynthetic::GetCompilerTypeImpl ( )
overrideprotectedvirtual

◆ GetDeclaration()

bool ValueObjectSynthetic::GetDeclaration ( Declaration decl)
overridevirtual

◆ GetDisplayTypeName()

ConstString ValueObjectSynthetic::GetDisplayTypeName ( )
overridevirtual

◆ GetDynamicValue()

lldb::ValueObjectSP ValueObjectSynthetic::GetDynamicValue ( lldb::DynamicValueType  valueType)
overridevirtual

◆ GetDynamicValueType()

virtual lldb::DynamicValueType lldb_private::ValueObjectSynthetic::GetDynamicValueType ( )
inlinevirtual

◆ GetIndexOfChildWithName()

size_t ValueObjectSynthetic::GetIndexOfChildWithName ( llvm::StringRef  name)
overridevirtual

◆ GetIsConstant()

bool lldb_private::ValueObjectSynthetic::GetIsConstant ( ) const
inlineoverridevirtual

Reimplemented from lldb_private::ValueObject.

Definition at line 106 of file ValueObjectSyntheticFilter.h.

◆ GetLanguageFlags()

uint64_t ValueObjectSynthetic::GetLanguageFlags ( )
overridevirtual

◆ GetNonSyntheticValue()

lldb::ValueObjectSP ValueObjectSynthetic::GetNonSyntheticValue ( )
overridevirtual

◆ GetParent() [1/2]

const ValueObject * lldb_private::ValueObjectSynthetic::GetParent ( ) const
inlineoverridevirtual

◆ GetParent() [2/2]

ValueObject * lldb_private::ValueObjectSynthetic::GetParent ( )
inlineoverridevirtual

◆ GetPreferredDisplayLanguage()

lldb::LanguageType ValueObjectSynthetic::GetPreferredDisplayLanguage ( )
overridevirtual

◆ GetQualifiedTypeName()

ConstString ValueObjectSynthetic::GetQualifiedTypeName ( )
overridevirtual

◆ GetStaticValue()

lldb::ValueObjectSP lldb_private::ValueObjectSynthetic::GetStaticValue ( )
inlineoverridevirtual

◆ GetTypeName()

ConstString ValueObjectSynthetic::GetTypeName ( )
overridevirtual

◆ GetValueType()

lldb::ValueType ValueObjectSynthetic::GetValueType ( ) const
overridevirtual

◆ GetVariable()

lldb::VariableSP lldb_private::ValueObjectSynthetic::GetVariable ( )
inlineoverridevirtual

◆ HasSyntheticValue()

bool lldb_private::ValueObjectSynthetic::HasSyntheticValue ( )
inlineoverridevirtual

Reimplemented from lldb_private::ValueObject.

Definition at line 67 of file ValueObjectSyntheticFilter.h.

◆ IsDynamic()

bool lldb_private::ValueObjectSynthetic::IsDynamic ( )
inlineoverridevirtual

◆ IsInScope()

bool ValueObjectSynthetic::IsInScope ( )
overridevirtual

◆ IsSynthetic()

bool lldb_private::ValueObjectSynthetic::IsSynthetic ( )
inlineoverridevirtual

Reimplemented from lldb_private::ValueObject.

Definition at line 69 of file ValueObjectSyntheticFilter.h.

◆ IsSyntheticChildrenGenerated()

bool ValueObjectSynthetic::IsSyntheticChildrenGenerated ( )
overridevirtual

◆ MightHaveChildren()

bool ValueObjectSynthetic::MightHaveChildren ( )
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.

Returns
Returns true if the ValueObject might have children, or false otherwise.

Reimplemented from lldb_private::ValueObject.

Definition at line 129 of file ValueObjectSyntheticFilter.cpp.

References lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, m_might_have_children, and m_synth_filter_up.

◆ operator=()

const ValueObjectSynthetic & lldb_private::ValueObjectSynthetic::operator= ( const ValueObjectSynthetic )
privatedelete

◆ SetFormat()

void ValueObjectSynthetic::SetFormat ( lldb::Format  format)
overridevirtual

◆ SetLanguageFlags()

void ValueObjectSynthetic::SetLanguageFlags ( uint64_t  flags)
overridevirtual

◆ SetPreferredDisplayLanguage()

void ValueObjectSynthetic::SetPreferredDisplayLanguage ( lldb::LanguageType  lang)

◆ SetSyntheticChildrenGenerated()

void ValueObjectSynthetic::SetSyntheticChildrenGenerated ( bool  b)
overridevirtual

◆ SetValueFromCString()

bool ValueObjectSynthetic::SetValueFromCString ( const char *  value_str,
Status error 
)
overridevirtual

◆ UpdateValue()

bool ValueObjectSynthetic::UpdateValue ( )
overrideprotectedvirtual

Friends And Related Function Documentation

◆ ValueObject

friend class ValueObject
friend

Definition at line 168 of file ValueObjectSyntheticFilter.h.

Member Data Documentation

◆ m_child_mutex

std::mutex lldb_private::ValueObjectSynthetic::m_child_mutex
protected

◆ m_children_byindex

ByIndexMap lldb_private::ValueObjectSynthetic::m_children_byindex
protected

Guarded by m_child_mutex;.

Definition at line 151 of file ValueObjectSyntheticFilter.h.

Referenced by GetChildAtIndex(), and UpdateValue().

◆ m_might_have_children

LazyBool lldb_private::ValueObjectSynthetic::m_might_have_children
protected

Definition at line 163 of file ValueObjectSyntheticFilter.h.

Referenced by MightHaveChildren(), and UpdateValue().

◆ m_name_toindex

NameToIndexMap lldb_private::ValueObjectSynthetic::m_name_toindex
protected

Guarded by m_child_mutex;.

Definition at line 153 of file ValueObjectSyntheticFilter.h.

Referenced by GetIndexOfChildWithName(), and UpdateValue().

◆ m_parent_type_name

ConstString lldb_private::ValueObjectSynthetic::m_parent_type_name
protected

Definition at line 161 of file ValueObjectSyntheticFilter.h.

Referenced by UpdateValue().

◆ m_provides_value

LazyBool lldb_private::ValueObjectSynthetic::m_provides_value
protected

◆ m_synth_filter_up

std::unique_ptr<SyntheticChildrenFrontEnd> lldb_private::ValueObjectSynthetic::m_synth_filter_up
protected

◆ m_synth_sp

lldb::SyntheticChildrenSP lldb_private::ValueObjectSynthetic::m_synth_sp
protected

Definition at line 139 of file ValueObjectSyntheticFilter.h.

Referenced by CreateSynthFilter().

◆ m_synthetic_children_cache

SyntheticChildrenCache lldb_private::ValueObjectSynthetic::m_synthetic_children_cache
protected

Guarded by m_child_mutex;.

Definition at line 155 of file ValueObjectSyntheticFilter.h.

Referenced by GetChildAtIndex(), and UpdateValue().

◆ m_synthetic_children_count

uint32_t lldb_private::ValueObjectSynthetic::m_synthetic_children_count
protected

Definition at line 159 of file ValueObjectSyntheticFilter.h.

Referenced by CalculateNumChildren(), and UpdateValue().


The documentation for this class was generated from the following files: