LLDB mainline
lldb_private::ValueObject Class Referenceabstract

ValueObject: More...

#include <ValueObject.h>

Inheritance diagram for lldb_private::ValueObject:
[legend]

Classes

struct  AddrAndType
struct  Bitflags
class  ChildrenManager
class  EvaluationPoint
struct  GetValueForExpressionPathOptions

Public Types

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 }

Public Member Functions

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 llvm::Expected< 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< boolGetValueAsBool ()
 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 llvm::Expected< 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 AddrAndType GetAddressOf (bool scalar_is_load_address=true)
AddrAndType GetPointerValue ()
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, boolReadPointedString (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)
llvm::ArrayRef< uint8_t > GetLocalBuffer () const
 Returns the local buffer that this ValueObject points to if it's available.

Static Public Member Functions

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 Types

typedef ClusterManager< ValueObjectValueObjectManager

Protected Member Functions

 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

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

virtual CompilerType MaybeCalculateCompleteType ()
void UpdateChildrenAddressType ()
lldb::ValueObjectSP GetValueForExpressionPath_Impl (llvm::StringRef expression_cstr, ExpressionPathScanEndReason *reason_to_stop, ExpressionPathEndResultType *final_value_type, const GetValueForExpressionPathOptions &options, ExpressionPathAftermath *final_task_on_target)
 ValueObject (const ValueObject &)=delete
const ValueObjectoperator= (const ValueObject &)=delete

Friends

class ValueObjectChild
class ExpressionVariable
class Target
class ValueObjectConstResultImpl
class ValueObjectSynthetic

Detailed Description

ValueObject:

This abstract class provides an interface to a particular value, be it a register, a local or global variable, that is evaluated in some particular scope. The ValueObject also has the capability of being the "child" of some other variable object, and in turn of having children. If a ValueObject is a root variable object - having no parent - then it must be constructed with respect to some particular ExecutionContextScope. If it is a child, it inherits the ExecutionContextScope from its parent. The ValueObject will update itself if necessary before fetching its value, summary, object description, etc. But it will always update itself in the ExecutionContextScope with which it was originally created. A brief note on life cycle management for ValueObjects. This is a little tricky because a ValueObject can contain various other ValueObjects - the Dynamic Value, its children, the dereference value, etc. Any one of these can be handed out as a shared pointer, but for that contained value object to be valid, the root object and potentially other of the value objects need to stay around. We solve this problem by handing out shared pointers to the Value Object and any of its dependents using a shared ClusterManager. This treats each shared pointer handed out for the entire cluster as a reference to the whole cluster. The whole cluster will stay around until the last reference is released.

The ValueObject mostly handle this automatically, if a value object is made with a Parent ValueObject, then it adds itself to the ClusterManager of the parent. It does mean that external to the ValueObjects we should only ever make available ValueObjectSP's, never ValueObjects or pointers to them. So all the "Root level" ValueObject derived constructors should be private, and should implement a Create function that new's up object and returns a Shared Pointer that it gets from the GetSP() method.

However, if you are making an derived ValueObject that will be contained in a parent value object, you should just hold onto a pointer to it internally, and by virtue of passing the parent ValueObject into its constructor, it will be added to the ClusterManager for the parent. Then if you ever hand out a Shared Pointer to the contained ValueObject, just do so by calling GetSP() on the contained object.

Definition at line 105 of file ValueObject.h.

Member Typedef Documentation

◆ ValueObjectManager

Member Enumeration Documentation

◆ ClearUserVisibleDataItems

Enumerator
eClearUserVisibleDataItemsNothing 
eClearUserVisibleDataItemsValue 
eClearUserVisibleDataItemsSummary 
eClearUserVisibleDataItemsLocation 
eClearUserVisibleDataItemsDescription 
eClearUserVisibleDataItemsSyntheticChildren 
eClearUserVisibleDataItemsAllStrings 
eClearUserVisibleDataItemsAll 

Definition at line 182 of file ValueObject.h.

◆ ExpressionPathAftermath

Enumerator
eExpressionPathAftermathNothing 

Just return it.

eExpressionPathAftermathDereference 

Dereference the target.

eExpressionPathAftermathTakeAddress 

Take target's address.

Definition at line 173 of file ValueObject.h.

◆ ExpressionPathEndResultType

Enumerator
eExpressionPathEndResultTypePlain 

Anything but...

eExpressionPathEndResultTypeBitfield 

A bitfield.

eExpressionPathEndResultTypeBoundedRange 

A range [low-high].

eExpressionPathEndResultTypeUnboundedRange 

A range [].

eExpressionPathEndResultTypeValueObjectList 

Several items in a VOList.

eExpressionPathEndResultTypeInvalid 

Definition at line 159 of file ValueObject.h.

◆ ExpressionPathScanEndReason

Enumerator
eExpressionPathScanEndReasonEndOfString 

Out of data to parse.

eExpressionPathScanEndReasonNoSuchChild 

Child element not found.

eExpressionPathScanEndReasonNoSuchSyntheticChild 

(Synthetic) child element not found.

eExpressionPathScanEndReasonEmptyRangeNotAllowed 

[] only allowed for arrays.

eExpressionPathScanEndReasonDotInsteadOfArrow 

. used when -> should be used.

eExpressionPathScanEndReasonArrowInsteadOfDot 

-> used when . should be used.

eExpressionPathScanEndReasonFragileIVarNotAllowed 

ObjC ivar expansion not allowed.

eExpressionPathScanEndReasonRangeOperatorNotAllowed 

[] not allowed by options.

eExpressionPathScanEndReasonRangeOperatorInvalid 

[] not valid on objects other than scalars, pointers or arrays.

eExpressionPathScanEndReasonArrayRangeOperatorMet 

[] is good for arrays, but I cannot parse it.

eExpressionPathScanEndReasonBitfieldRangeOperatorMet 

[] is good for bitfields, but I cannot parse after it.

eExpressionPathScanEndReasonUnexpectedSymbol 

Something is malformed in he expression.

eExpressionPathScanEndReasonTakingAddressFailed 

Impossible to apply & operator.

eExpressionPathScanEndReasonDereferencingFailed 

Impossible to apply * operator.

eExpressionPathScanEndReasonRangeOperatorExpanded 

[] was expanded into a VOList.

eExpressionPathScanEndReasonSyntheticValueMissing 

getting the synthetic children failed.

eExpressionPathScanEndReasonUnknown 

Definition at line 123 of file ValueObject.h.

◆ GetExpressionPathFormat

Enumerator
eGetExpressionPathFormatDereferencePointers 
eGetExpressionPathFormatHonorPointers 

Definition at line 107 of file ValueObject.h.

◆ PrintableRepresentationSpecialCases

Enumerator
eDisable 
eAllow 

Definition at line 546 of file ValueObject.h.

◆ ValueObjectRepresentationStyle

Enumerator
eValueObjectRepresentationStyleValue 
eValueObjectRepresentationStyleSummary 
eValueObjectRepresentationStyleLanguageSpecific 
eValueObjectRepresentationStyleLocation 
eValueObjectRepresentationStyleChildrenCount 
eValueObjectRepresentationStyleType 
eValueObjectRepresentationStyleName 
eValueObjectRepresentationStyleExpressionPath 

Definition at line 112 of file ValueObject.h.

Constructor & Destructor Documentation

◆ ~ValueObject()

ValueObject::~ValueObject ( )
virtualdefault

◆ ValueObject() [1/3]

ValueObject::ValueObject ( ExecutionContextScope * exe_scope,
ValueObjectManager & manager,
AddressType child_ptr_or_ref_addr_type = eAddressTypeLoad )
protected

Use this constructor to create a "root variable object".

The ValueObject will be locked to this context through-out its lifespan.

Definition at line 91 of file ValueObject.cpp.

References lldb_private::ExecutionContextScope::CalculateTarget(), g_value_obj_uid, lldb_private::ArchSpec::GetAddressByteSize(), lldb_private::ArchSpec::GetByteOrder(), m_address_type_of_ptr_or_ref_children, m_data, m_id, m_manager, and m_update_point.

Referenced by AddSyntheticChild(), lldb_private::ValueObjectCast::Create(), lldb_private::ValueObjectRecognizerSynthesizedValue::Create(), lldb_private::ValueObjectVTable::Create(), CreateChildAtIndex(), lldb_private::ValueObjectConstResult::CreateChildAtIndex(), lldb_private::ValueObjectRegisterSet::CreateChildAtIndex(), lldb_private::ValueObjectVTable::CreateChildAtIndex(), CreateSyntheticArrayMember(), lldb_private::ValueObjectConstResult::CreateSyntheticArrayMember(), lldb_private::ValueObjectRegisterSet::CreateSyntheticArrayMember(), lldb_private::ValueObjectVTable::CreateSyntheticArrayMember(), DoUpdateChildrenAddressType(), lldb_private::ValueObjectVariable::DoUpdateChildrenAddressType(), FollowParentChain(), GetAddressTypeOfChildren(), lldb_private::ValueObject::ChildrenManager::GetChildAtIndex(), GetChildAtIndex(), lldb_private::ValueObjectRegisterSet::GetChildMemberWithName(), GetDerefValobj(), GetDynamicValueType(), GetExpressionPath(), GetFormat(), GetModule(), GetNonBaseClassParent(), GetParent(), GetParent(), lldb_private::ValueObjectCast::GetParent(), lldb_private::ValueObjectCast::GetParent(), GetRoot(), GetSyntheticArrayMember(), GetValueForExpressionPath_Impl(), ValueObjectVTableChild::IsInScope(), operator=(), lldb_private::ValueObject::ChildrenManager::SetChildAtIndex(), SetDerefValobj(), lldb_private::ValueObjectVTable::UpdateValue(), ValueObjectVTableChild::UpdateValue(), ValueObject(), ValueObject(), lldb_private::ValueObjectCast::ValueObjectCast(), lldb_private::ValueObjectConstResult::ValueObjectConstResult(), lldb_private::ValueObjectConstResult::ValueObjectConstResult(), lldb_private::ValueObjectConstResult::ValueObjectConstResult(), lldb_private::ValueObjectConstResult::ValueObjectConstResult(), lldb_private::ValueObjectConstResult::ValueObjectConstResult(), lldb_private::ValueObjectConstResult::ValueObjectConstResult(), lldb_private::ValueObjectConstResult::ValueObjectConstResult(), lldb_private::ValueObjectMemory::ValueObjectMemory(), lldb_private::ValueObjectMemory::ValueObjectMemory(), lldb_private::ValueObjectRecognizerSynthesizedValue::ValueObjectRecognizerSynthesizedValue(), lldb_private::ValueObjectRegister::ValueObjectRegister(), lldb_private::ValueObjectRegister::ValueObjectRegister(), lldb_private::ValueObjectRegisterSet::ValueObjectRegisterContext, lldb_private::ValueObjectRegister::ValueObjectRegisterSet, lldb_private::ValueObjectRegisterSet::ValueObjectRegisterSet(), ValueObjectSynthetic, lldb_private::ValueObjectVariable::ValueObjectVariable(), lldb_private::ValueObjectVTable::ValueObjectVTable(), ValueObjectVTableChild::ValueObjectVTableChild(), lldb_private::ValueObjectCast::~ValueObjectCast(), and lldb_private::ValueObjectVTable::~ValueObjectVTable().

◆ ValueObject() [2/3]

◆ ValueObject() [3/3]

lldb_private::ValueObject::ValueObject ( const ValueObject & )
privatedelete

References ValueObject().

Member Function Documentation

◆ AddressOf()

◆ AddSyntheticChild()

void ValueObject::AddSyntheticChild ( ConstString key,
ValueObject * valobj )
protected

◆ CalculateDynamicValue()

◆ CalculateNumChildren()

◆ CalculateSyntheticValue()

void ValueObject::CalculateSyntheticValue ( )
protectedvirtual

◆ CanProvideValue()

◆ CanUpdateWithInvalidExecutionContext()

virtual LazyBool lldb_private::ValueObject::CanUpdateWithInvalidExecutionContext ( )
inlineprotectedvirtual

◆ Cast()

◆ CastBaseToDerivedType()

llvm::Expected< lldb::ValueObjectSP > ValueObject::CastBaseToDerivedType ( CompilerType type,
uint64_t offset )

◆ CastDerivedToBaseType()

llvm::Expected< lldb::ValueObjectSP > ValueObject::CastDerivedToBaseType ( 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.

'base_type_indices' contains the indices of direct base classes on the path from the ValueObject's current type to 'type'

Definition at line 2993 of file ValueObject.cpp.

References lldb_private::CompilerType::CompareTypes(), CreateValueObjectFromAddress(), GetCompilerType(), lldb_private::CompilerType::GetNonReferenceType(), lldb_private::CompilerType::GetPointeeType(), GetSP(), GetTargetSP(), lldb_private::CompilerType::IsPointerType(), and lldb_private::CompilerType::IsReferenceType().

◆ CastPointerType() [1/2]

◆ CastPointerType() [2/2]

◆ CastToBasicType()

◆ CastToEnumType()

◆ ClearDynamicTypeInformation()

void ValueObject::ClearDynamicTypeInformation ( )
protected

◆ ClearUserVisibleData()

◆ Clone()

lldb::ValueObjectSP ValueObject::Clone ( ConstString new_name)
virtual

Creates a copy of the ValueObject with a new name and setting the current ValueObject as its parent.

It should be used when we want to change the name of a ValueObject without modifying the actual ValueObject itself (e.g. sythetic child provider).

Definition at line 2941 of file ValueObject.cpp.

References lldb_private::ValueObjectCast::Create(), and GetCompilerType().

◆ CreateChildAtIndex()

◆ CreateConstantValue()

◆ CreateSyntheticArrayMember()

◆ CreateValueObjectFromAddress()

lldb::ValueObjectSP ValueObject::CreateValueObjectFromAddress ( llvm::StringRef name,
uint64_t address,
const ExecutionContext & exe_ctx,
CompilerType type,
bool do_deref = true )
static

◆ CreateValueObjectFromAPFloat()

lldb::ValueObjectSP ValueObject::CreateValueObjectFromAPFloat ( lldb::TargetSP target,
const llvm::APFloat & v,
CompilerType type,
llvm::StringRef name )
static

Create a value object containing the given APFloat value.

Definition at line 3587 of file ValueObject.cpp.

References CreateValueObjectFromAPInt().

Referenced by CastToBasicType().

◆ CreateValueObjectFromAPInt()

lldb::ValueObjectSP ValueObject::CreateValueObjectFromAPInt ( lldb::TargetSP target,
const llvm::APInt & v,
CompilerType type,
llvm::StringRef name )
static

◆ CreateValueObjectFromBool()

lldb::ValueObjectSP ValueObject::CreateValueObjectFromBool ( lldb::TargetSP target,
bool value,
llvm::StringRef name )
static

◆ CreateValueObjectFromData()

◆ CreateValueObjectFromExpression() [1/2]

lldb::ValueObjectSP ValueObject::CreateValueObjectFromExpression ( llvm::StringRef name,
llvm::StringRef expression,
const ExecutionContext & exe_ctx )
static

◆ CreateValueObjectFromExpression() [2/2]

lldb::ValueObjectSP ValueObject::CreateValueObjectFromExpression ( llvm::StringRef name,
llvm::StringRef expression,
const ExecutionContext & exe_ctx,
const EvaluateExpressionOptions & options )
static

◆ CreateValueObjectFromNullptr()

lldb::ValueObjectSP ValueObject::CreateValueObjectFromNullptr ( lldb::TargetSP target,
CompilerType type,
llvm::StringRef name )
static

◆ CreateValueObjectFromScalar()

lldb::ValueObjectSP ValueObject::CreateValueObjectFromScalar ( lldb::TargetSP target,
Scalar & s,
CompilerType type,
llvm::StringRef name )
static

◆ Dereference()

◆ DoCast()

ValueObjectSP ValueObject::DoCast ( const CompilerType & compiler_type)
virtual

◆ DoesProvideSyntheticValue()

virtual bool lldb_private::ValueObject::DoesProvideSyntheticValue ( )
inlinevirtual

Reimplemented in lldb_private::ValueObjectSynthetic.

Definition at line 689 of file ValueObject.h.

◆ DoUpdateChildrenAddressType()

virtual void lldb_private::ValueObject::DoUpdateChildrenAddressType ( ValueObject & valobj)
inlineprotectedvirtual

Reimplemented in lldb_private::ValueObjectVariable.

Definition at line 1105 of file ValueObject.h.

References ValueObject().

Referenced by UpdateChildrenAddressType().

◆ Dump() [1/2]

llvm::Error ValueObject::Dump ( Stream & s)

Definition at line 2707 of file ValueObject.cpp.

References Dump().

Referenced by Dump().

◆ Dump() [2/2]

llvm::Error ValueObject::Dump ( Stream & s,
const DumpValueObjectOptions & options )

◆ DumpPrintableRepresentation()

bool ValueObject::DumpPrintableRepresentation ( Stream & s,
ValueObjectRepresentationStyle val_obj_display = eValueObjectRepresentationStyleSummary,
lldb::Format custom_format = lldb::eFormatInvalid,
PrintableRepresentationSpecialCases special = PrintableRepresentationSpecialCases::eAllow,
bool do_dump_error = true )

Definition at line 1336 of file ValueObject.cpp.

References lldb_private::Flags::AnySet(), CanProvideValue(), eAllow, lldb::eByteOrderInvalid, lldb::eFormatBinary, lldb::eFormatBoolean, lldb::eFormatBytes, lldb::eFormatBytesWithASCII, lldb::eFormatChar, lldb::eFormatCharArray, lldb::eFormatCharPrintable, lldb::eFormatComplex, lldb::eFormatComplexFloat, lldb::eFormatComplexInteger, lldb::eFormatCString, lldb::eFormatDecimal, lldb::eFormatDefault, lldb::eFormatEnum, lldb::eFormatFloat, lldb::eFormatFloat128, lldb::eFormatHex, lldb::eFormatHexUppercase, lldb::eFormatInvalid, lldb::eFormatOctal, lldb::eFormatOSType, lldb::eFormatPointer, lldb::eFormatUnicode16, lldb::eFormatUnicode32, lldb::eFormatUnsigned, lldb::eFormatVectorOfChar, lldb::eFormatVectorOfFloat32, lldb::eFormatVectorOfFloat64, lldb::eFormatVectorOfSInt16, lldb::eFormatVectorOfSInt32, lldb::eFormatVectorOfSInt64, lldb::eFormatVectorOfSInt8, lldb::eFormatVectorOfUInt128, lldb::eFormatVectorOfUInt16, lldb::eFormatVectorOfUInt32, lldb::eFormatVectorOfUInt64, lldb::eFormatVectorOfUInt8, error(), eValueObjectRepresentationStyleChildrenCount, eValueObjectRepresentationStyleExpressionPath, eValueObjectRepresentationStyleLanguageSpecific, eValueObjectRepresentationStyleLocation, eValueObjectRepresentationStyleName, eValueObjectRepresentationStyleSummary, eValueObjectRepresentationStyleType, eValueObjectRepresentationStyleValue, GetChildAtIndex(), GetCompilerType(), GetExpressionPath(), GetLocationAsCString(), GetName(), GetNumChildren(), GetNumChildrenIgnoringErrors(), GetObjectDescription(), lldb_private::FormatManager::GetSingleItemFormat(), lldb_private::StreamString::GetString(), lldb_private::ConstString::GetStringRef(), GetSummaryAsCString(), GetTypeInfo(), GetTypeName(), GetValueAsCString(), IsCStringContainer(), m_error, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), lldb_private::formatters::StringPrinter::ReadBufferAndDumpToStream(), ReadPointedString(), SetFormat(), lldb_private::Flags::Test(), and lldb_private::toString().

Referenced by DumpValue().

◆ FollowParentChain()

ValueObject * ValueObject::FollowParentChain ( std::function< bool(ValueObject *)> f)

Given a ValueObject, loop over itself and its parent, and its parent's parent, .

. until either the given callback returns false, or you end up at a null pointer

Definition at line 3657 of file ValueObject.cpp.

References m_parent, and ValueObject().

Referenced by GetRoot().

◆ GetAddressOf()

◆ GetAddressTypeOfChildren()

◆ GetBitfieldBitOffset()

virtual uint32_t lldb_private::ValueObject::GetBitfieldBitOffset ( )
inlinevirtual

◆ GetBitfieldBitSize()

virtual uint32_t lldb_private::ValueObject::GetBitfieldBitSize ( )
inlinevirtual

◆ GetByteOffset()

virtual lldb::offset_t lldb_private::ValueObject::GetByteOffset ( )
inlinevirtual

Reimplemented in lldb_private::ValueObjectChild.

Definition at line 422 of file ValueObject.h.

◆ GetByteSize()

◆ GetChildAtIndex()

◆ GetChildAtNamePath()

lldb::ValueObjectSP ValueObject::GetChildAtNamePath ( llvm::ArrayRef< llvm::StringRef > names)

◆ GetChildMemberWithName()

◆ GetCompilerType()

CompilerType lldb_private::ValueObject::GetCompilerType ( )
inline

Definition at line 352 of file ValueObject.h.

References MaybeCalculateCompleteType().

Referenced by AddressOf(), lldb_private::ValueObjectCast::CalculateNumChildren(), lldb_private::ValueObjectChild::CalculateNumChildren(), lldb_private::ValueObjectConstResult::CalculateNumChildren(), lldb_private::ValueObjectDynamicValue::CalculateNumChildren(), lldb_private::ValueObjectRegister::CalculateNumChildren(), lldb_private::ValueObjectVariable::CalculateNumChildren(), CanProvideValue(), Cast(), CastBaseToDerivedType(), CastDerivedToBaseType(), CastToBasicType(), CastToEnumType(), Clone(), lldb_private::formatters::CMTimeSummaryProvider(), CopyExpressionResult(), lldb_private::AppleObjCRuntime::CouldHaveDynamicValue(), lldb_private::GNUstepObjCRuntime::CouldHaveDynamicValue(), CreateChildAtIndex(), CreateConstantValue(), CreateSyntheticArrayMember(), Dereference(), DerefToNSErrorPointer(), lldb_private::ValueObjectVariable::DoUpdateChildrenAddressType(), DumpPrintableRepresentation(), DumpValue(), ExtractFields(), lldb_private::AppleObjCRuntime::FixUpDynamicType(), lldb_private::GNUstepObjCRuntime::FixUpDynamicType(), lldb_private::ItaniumABILanguageRuntime::FixUpDynamicType(), lldb_private::ValueObjectConstResult::GetByteSize(), lldb_private::ValueObjectVariable::GetByteSize(), GetChildMemberWithName(), lldb_private::ObjCLanguageRuntime::GetClassDescriptor(), lldb_private::ValueObjectConstResultCast::GetCompilerType(), lldb_private::ValueObjectConstResultChild::GetCompilerType(), lldb_private::formatters::GetDesugaredSmartPointerValue(), lldb_private::ValueObjectChild::GetDisplayTypeName(), lldb_private::ValueObjectConstResult::GetDisplayTypeName(), lldb_private::ValueObjectDynamicValue::GetDisplayTypeName(), lldb_private::ItaniumABILanguageRuntime::GetDynamicTypeAndAddress(), GetExpressionPath(), lldb_private::CPlusPlusLanguage::GetHardcodedSummaries(), lldb_private::CPlusPlusLanguage::GetHardcodedSynthetics(), GetIndexOfChildWithName(), lldb_private::AppleObjCRuntime::GetObjectDescription(), GetObjectRuntimeLanguage(), GetPointeeData(), lldb_private::ObjCLanguage::GetPossibleFormattersMatches(), lldb_private::FormatManager::GetPossibleMatches(), GetQualifiedTypeName(), lldb_private::ValueObjectChild::GetQualifiedTypeName(), GetSummaryAsCString(), GetSyntheticBitFieldChild(), GetTypeImpl(), GetTypeInfo(), GetTypeName(), lldb_private::ValueObjectChild::GetTypeName(), lldb_private::ValueObjectConstResult::GetTypeName(), lldb_private::ValueObjectRegister::GetTypeName(), GetValueAsAPFloat(), GetValueAsAPSInt(), GetValueAsBool(), GetVTableAddress(), lldb_private::ItaniumABILanguageRuntime::GetVTableInfo(), lldb_private::formatters::GetWCharByteSize(), IsArrayType(), IsIntegerType(), lldb_private::formatters::IsMsvcStlStringType(), lldb_private::ObjCLanguage::IsNilReference(), IsPointerOrReferenceType(), IsPointerType(), IsPossibleDynamicType(), IsScalarType(), lldb_private::formatters::NSAttributedStringSummaryProvider(), lldb_private::formatters::NSBundleSummaryProvider(), lldb_private::formatters::NSNotificationSummaryProvider(), lldb_private::formatters::NSStringSummaryProvider(), lldb_private::formatters::NSTimeZoneSummaryProvider(), lldb_private::formatters::NSURLSummaryProvider(), lldb_private::formatters::ObjCBOOLSummaryProvider(), lldb_private::formatters::ObjCSELSummaryProvider(), lldb_private::ValueObjectPrinter::PrintValueAndSummaryIfNeeded(), ReadPointedString(), SetData(), SetValueFromCString(), SetValueFromInteger(), SetValueFromInteger(), lldb_private::FormatManager::ShouldPrintAsOneLiner(), lldb_private::ValueObjectCast::UpdateValue(), lldb_private::ValueObjectChild::UpdateValue(), and lldb_private::ValueObjectVariable::UpdateValue().

◆ GetCompilerTypeImpl()

◆ GetData()

◆ GetDataExtractor()

DataExtractor & ValueObject::GetDataExtractor ( )
protected

Definition at line 274 of file ValueObject.cpp.

References m_data, and UpdateValueIfNeeded().

Referenced by GetSyntheticBitFieldChild(), ReadPointedString(), and ValueObject().

◆ GetDeclaration()

◆ GetDerefValobj()

ValueObject * lldb_private::ValueObject::GetDerefValobj ( )
inline

Definition at line 810 of file ValueObject.h.

References m_deref_valobj, and ValueObject().

◆ GetDisplayTypeName()

◆ GetDynamicValue()

◆ GetDynamicValueType()

◆ GetDynamicValueTypeImpl()

virtual lldb::DynamicValueType lldb_private::ValueObject::GetDynamicValueTypeImpl ( )
inlineprotectedvirtual

Reimplemented in lldb_private::ValueObjectDynamicValue.

Definition at line 1054 of file ValueObject.h.

References lldb::eNoDynamicValues.

Referenced by GetDynamicValueType().

◆ GetError()

const Status & ValueObject::GetError ( )

◆ GetExecutionContextRef()

const ExecutionContextRef & lldb_private::ValueObject::GetExecutionContextRef ( ) const
inline

Definition at line 330 of file ValueObject.h.

References m_update_point.

Referenced by AddressOf(), CalculateDynamicValue(), lldb_private::ValueObjectCast::CalculateNumChildren(), lldb_private::ValueObjectChild::CalculateNumChildren(), lldb_private::ValueObjectConstResult::CalculateNumChildren(), lldb_private::ValueObjectDynamicValue::CalculateNumChildren(), lldb_private::ValueObjectMemory::CalculateNumChildren(), lldb_private::ValueObjectRegister::CalculateNumChildren(), lldb_private::ValueObjectVariable::CalculateNumChildren(), Cast(), CastPointerType(), CastPointerType(), CastToBasicType(), CastToEnumType(), lldb_private::ValueObjectSynthetic::CopyValueData(), CreateChildAtIndex(), CreateConstantValue(), CreateSyntheticArrayMember(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), Dereference(), lldb_private::ValueObjectVariable::DoUpdateChildrenAddressType(), ExtractFields(), lldb_private::StringSummaryFormat::FormatObject(), lldb_private::TypeFormatImpl_EnumType::FormatObject(), lldb_private::TypeFormatImpl_Format::FormatObject(), lldb_private::ValueObjectCast::GetByteSize(), lldb_private::ValueObjectConstResult::GetByteSize(), lldb_private::ValueObjectDynamicValue::GetByteSize(), lldb_private::ValueObjectMemory::GetByteSize(), lldb_private::ValueObjectVariable::GetByteSize(), lldb_private::ObjCLanguageRuntime::GetClassDescriptor(), lldb_private::ValueObjectRegister::GetCompilerTypeImpl(), GetData(), lldb_private::ValueObjectConstResult::GetDynamicValue(), lldb_private::AppleObjCRuntime::GetObjectDescription(), GetObjectDescription(), GetPointeeData(), lldb_private::FormatManager::GetPossibleMatches(), GetSummaryAsCString(), GetSyntheticBase(), GetSyntheticChildAtOffset(), GetVBaseBitOffset(), lldb_private::ItaniumABILanguageRuntime::GetVTableInfo(), lldb_private::ValueObjectVariable::IsInScope(), IsPossibleDynamicType(), MaybeCalculateCompleteType(), lldb_private::formatters::NSError_SummaryProvider(), lldb_private::formatters::ObjCSELSummaryProvider(), ReadPointedString(), ResolveValue(), SetData(), lldb_private::ValueObjectVariable::SetData(), SetValueFromCString(), lldb_private::ValueObjectVariable::SetValueFromCString(), lldb_private::ValueObjectCast::UpdateValue(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectRegister::UpdateValue(), lldb_private::ValueObjectRegisterSet::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), and ValueObjectVTableChild::UpdateValue().

◆ GetExpressionPath()

◆ GetFormat()

lldb::Format ValueObject::GetFormat ( ) const

◆ GetFrameSP()

lldb::StackFrameSP lldb_private::ValueObject::GetFrameSP ( ) const
inline

Definition at line 346 of file ValueObject.h.

References m_update_point.

Referenced by GetPreferredDisplayLanguage().

◆ GetID()

lldb::user_id_t lldb_private::ValueObject::GetID ( ) const
inline

Returns a unique id for this ValueObject.

Definition at line 490 of file ValueObject.h.

References m_id.

Referenced by lldb_private::ValueObjectList::FindValueObjectByUID(), and lldb_private::ScriptedSyntheticChildren::FrontEnd::FrontEnd().

◆ GetIndexOfChildWithName()

llvm::Expected< size_t > ValueObject::GetIndexOfChildWithName ( llvm::StringRef name)
virtual

◆ GetIsConstant()

virtual bool lldb_private::ValueObject::GetIsConstant ( ) const
inlinevirtual

Reimplemented in lldb_private::ValueObjectDynamicValue, and lldb_private::ValueObjectSynthetic.

Definition at line 774 of file ValueObject.h.

References m_update_point.

Referenced by UpdateValueIfNeeded().

◆ GetLanguageFlags()

virtual uint64_t lldb_private::ValueObject::GetLanguageFlags ( )
inlinevirtual

◆ GetLiveAddress()

virtual lldb::addr_t lldb_private::ValueObject::GetLiveAddress ( )
inlinevirtual

Reimplemented in lldb_private::ValueObjectConstResult.

Definition at line 634 of file ValueObject.h.

References LLDB_INVALID_ADDRESS.

◆ GetLoadAddress()

lldb::addr_t ValueObject::GetLoadAddress ( )

◆ GetLocalBuffer()

llvm::ArrayRef< uint8_t > ValueObject::GetLocalBuffer ( ) const

Returns the local buffer that this ValueObject points to if it's available.

Returns
The local buffer if this value object's value points to a host address, and if that buffer can be determined. Otherwise, returns an empty ArrayRef.

TODO: Because a ValueObject's Value can point to any arbitrary memory location, it is possible that we can't find what what buffer we're pointing to, and thus also can't know its size. See the comment in Value::m_value for a more thorough explanation of why that is.

Definition at line 851 of file ValueObject.cpp.

References lldb_private::Value::HostAddress, LLDB_INVALID_ADDRESS, m_data, and m_value.

◆ GetLocationAsCString()

virtual const char * lldb_private::ValueObject::GetLocationAsCString ( )
inlinevirtual

◆ GetLocationAsCStringImpl()

◆ GetManager()

ValueObjectManager * lldb_private::ValueObject::GetManager ( )
inlineprotected

Definition at line 1044 of file ValueObject.h.

References m_manager.

Referenced by ValueObject().

◆ GetModule()

ModuleSP ValueObject::GetModule ( )
virtual

◆ GetName()

◆ GetNonBaseClassParent()

ValueObject * ValueObject::GetNonBaseClassParent ( )

◆ GetNonSyntheticValue()

◆ GetNumChildren()

◆ GetNumChildrenIgnoringErrors()

uint32_t ValueObject::GetNumChildrenIgnoringErrors ( uint32_t max = UINT32_MAX)

Like GetNumChildren but returns 0 on error.

You probably shouldn't be using this function. It exists primarily to ease the transition to more pervasive error handling while not all APIs have been updated.

Definition at line 461 of file ValueObject.cpp.

References lldb_private::DataFormatters, lldb_private::GetLog(), GetNumChildren(), and LLDB_LOG_ERRORV.

Referenced by DumpPrintableRepresentation(), DumpValue(), lldb_private::formatters::GenericOptionalSummaryProvider(), GetChildAtIndex(), lldb_private::formatters::GetSecondValueOfLibCXXCompressedPair(), HasChildren(), and MightHaveChildren().

◆ GetObjectDescription()

◆ GetObjectRuntimeLanguage()

◆ GetParent() [1/2]

◆ GetParent() [2/2]

virtual const ValueObject * lldb_private::ValueObject::GetParent ( ) const
inlinevirtual

◆ GetPointeeData()

◆ GetPointerValue()

◆ GetPreferredDisplayLanguage()

◆ GetProcessSP()

lldb::ProcessSP lldb_private::ValueObject::GetProcessSP ( ) const
inline

Definition at line 338 of file ValueObject.h.

References m_update_point.

Referenced by lldb_private::formatters::CFBagSummaryProvider(), lldb_private::formatters::CFBinaryHeapSummaryProvider(), lldb_private::formatters::CFBitVectorSummaryProvider(), lldb_private::AppleObjCRuntimeV1::ClassDescriptorV1::ClassDescriptorV1(), DerefToNSErrorPointer(), ExtractFields(), lldb_private::TypeFormatImpl_EnumType::FormatObject(), lldb_private::AppleObjCRuntimeV2::GetDynamicTypeAndAddress(), lldb_private::AppleObjCRuntime::GetObjectDescription(), lldb_private::ObjCLanguage::GetPossibleFormattersMatches(), lldb_private::AppleObjCRuntimeV2::GetPreferredLanguageRuntime(), IsRuntimeSupportValue(), MaybeCalculateCompleteType(), lldb_private::formatters::NSArraySummaryProvider(), lldb_private::formatters::NSBundleSummaryProvider(), lldb_private::formatters::NSDataSummaryProvider(), lldb_private::formatters::NSDateSummaryProvider(), lldb_private::formatters::NSDecimalNumberSummaryProvider(), lldb_private::formatters::NSDictionarySummaryProvider(), lldb_private::formatters::NSError_SummaryProvider(), lldb_private::formatters::NSIndexSetSummaryProvider(), lldb_private::formatters::NSIndirectTaggedString_SummaryProvider(), lldb_private::formatters::NSMachPortSummaryProvider(), lldb_private::formatters::NSNotificationSummaryProvider(), lldb_private::formatters::NSNumberSummaryProvider(), lldb_private::formatters::NSSetSummaryProvider(), lldb_private::formatters::NSStringSummaryProvider(), lldb_private::formatters::NSTimeZoneSummaryProvider(), lldb_private::formatters::NSURLSummaryProvider(), lldb_private::formatters::ObjCBooleanSummaryProvider(), lldb_private::formatters::ObjCClassSummaryProvider(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectVTable::UpdateValue(), and ValueObjectVTableChild::UpdateValue().

◆ GetQualifiedRepresentationIfAvailable()

ValueObjectSP ValueObject::GetQualifiedRepresentationIfAvailable ( lldb::DynamicValueType dynValue,
bool synthValue )

◆ GetQualifiedTypeName()

◆ GetRoot()

◆ GetSP()

◆ GetStaticValue()

virtual lldb::ValueObjectSP lldb_private::ValueObject::GetStaticValue ( )
inlinevirtual

◆ GetSummaryAsCString() [1/4]

◆ GetSummaryAsCString() [2/4]

bool ValueObject::GetSummaryAsCString ( std::string & destination,
const TypeSummaryOptions & options )

Definition at line 643 of file ValueObject.cpp.

References GetSummaryAsCString(), and GetSummaryFormat().

◆ GetSummaryAsCString() [3/4]

◆ GetSummaryAsCString() [4/4]

bool ValueObject::GetSummaryAsCString ( TypeSummaryImpl * summary_ptr,
std::string & destination,
lldb::LanguageType lang = lldb::eLanguageTypeUnknown )

Definition at line 569 of file ValueObject.cpp.

References GetSummaryAsCString().

◆ GetSummaryFormat()

◆ GetSymbolContextScope()

SymbolContextScope * ValueObject::GetSymbolContextScope ( )
virtual

Reimplemented in lldb_private::ValueObjectVariable.

Definition at line 3498 of file ValueObject.cpp.

References m_parent.

◆ GetSyntheticArrayMember()

ValueObjectSP ValueObject::GetSyntheticArrayMember ( size_t index,
bool can_create )

◆ GetSyntheticBase()

◆ GetSyntheticBitFieldChild()

ValueObjectSP ValueObject::GetSyntheticBitFieldChild ( uint32_t from,
uint32_t to,
bool can_create )

◆ GetSyntheticChild()

◆ GetSyntheticChildAtOffset()

◆ GetSyntheticChildren()

lldb::SyntheticChildrenSP lldb_private::ValueObject::GetSyntheticChildren ( )
inline

Definition at line 829 of file ValueObject.h.

References m_synthetic_children_sp, and UpdateFormatsIfNeeded().

◆ GetSyntheticExpressionPathChild()

ValueObjectSP ValueObject::GetSyntheticExpressionPathChild ( const char * expression,
bool can_create )

◆ GetSyntheticValue()

◆ GetTargetSP()

lldb::TargetSP lldb_private::ValueObject::GetTargetSP ( ) const
inline

Definition at line 334 of file ValueObject.h.

References m_update_point.

Referenced by CalculateSyntheticValue(), CastBaseToDerivedType(), CastDerivedToBaseType(), CastToBasicType(), CastToEnumType(), CharStringSummaryProvider(), DumpValue(), lldb_private::BytecodeSummaryFormat::FormatObject(), lldb_private::ScriptSummaryFormat::FormatObject(), lldb_private::TypeFormatImpl_EnumType::FormatObject(), lldb_private::TypeFormatImpl_Format::FormatObject(), lldb_private::ScriptedSyntheticChildren::FrontEnd::FrontEnd(), lldb_private::AppleObjCRuntimeV2::GetDynamicTypeAndAddress(), GetLoadAddress(), lldb_private::AppleObjCRuntime::GetObjectDescription(), lldb_private::ObjCLanguage::GetPossibleFormattersMatches(), lldb_private::FormatManager::GetPossibleMatches(), GetSummaryAsCString(), lldb_private::formatters::NSAttributedStringSummaryProvider(), lldb_private::formatters::NSStringSummaryProvider(), Persist(), lldb_private::ValueObjectPrinter::PrintChildrenIfNeeded(), lldb_private::formatters::StringPrinter::ReadBufferAndDumpToStreamOptions::ReadBufferAndDumpToStreamOptions(), lldb_private::formatters::StringPrinter::ReadStringAndDumpToStreamOptions::ReadStringAndDumpToStreamOptions(), SetValueFromInteger(), SetValueFromInteger(), lldb_private::FormatManager::ShouldPrintAsOneLiner(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectVTable::UpdateValue(), ValueObjectVTableChild::UpdateValue(), lldb_private::ValueObjectMemory::ValueObjectMemory(), lldb_private::ValueObjectMemory::ValueObjectMemory(), and lldb_private::formatters::WCharStringSummaryProvider().

◆ GetThreadSP()

lldb::ThreadSP lldb_private::ValueObject::GetThreadSP ( ) const
inline

Definition at line 342 of file ValueObject.h.

References m_update_point.

◆ GetTypeImpl()

virtual TypeImpl lldb_private::ValueObject::GetTypeImpl ( )
inlinevirtual

Reimplemented in lldb_private::ValueObjectDynamicValue.

Definition at line 355 of file ValueObject.h.

References GetCompilerType().

◆ GetTypeInfo()

◆ GetTypeName()

◆ GetUpdatePoint() [1/2]

EvaluationPoint & lldb_private::ValueObject::GetUpdatePoint ( )
inline

Definition at line 328 of file ValueObject.h.

References m_update_point.

◆ GetUpdatePoint() [2/2]

const EvaluationPoint & lldb_private::ValueObject::GetUpdatePoint ( ) const
inline

Definition at line 326 of file ValueObject.h.

References m_update_point.

Referenced by MaybeCalculateCompleteType(), and ValueObject().

◆ GetValue() [1/2]

Value & lldb_private::ValueObject::GetValue ( )
inline

Definition at line 513 of file ValueObject.h.

References m_value.

◆ GetValue() [2/2]

◆ GetValueAsAPFloat()

llvm::Expected< llvm::APFloat > ValueObject::GetValueAsAPFloat ( )

If the current ValueObject is of an appropriate type, convert the value to an APFloat and return that.

Otherwise return an error.

Definition at line 1168 of file ValueObject.cpp.

References CanProvideValue(), lldb_private::Scalar::GetAPFloat(), GetCompilerType(), and ResolveValue().

Referenced by CastToBasicType(), CastToEnumType(), and GetValueAsBool().

◆ GetValueAsAPSInt()

llvm::Expected< llvm::APSInt > ValueObject::GetValueAsAPSInt ( )

If the current ValueObject is of an appropriate type, convert the value to an APSInt and return that.

Otherwise return an error.

Definition at line 1146 of file ValueObject.cpp.

References CanProvideValue(), lldb_private::Scalar::GetAPSInt(), GetCompilerType(), IsPointerType(), and ResolveValue().

Referenced by CastToBasicType(), CastToEnumType(), and GetValueAsBool().

◆ GetValueAsBool()

◆ GetValueAsCString() [1/3]

◆ GetValueAsCString() [2/3]

bool ValueObject::GetValueAsCString ( const lldb_private::TypeFormatImpl & format,
std::string & destination )
virtual

◆ GetValueAsCString() [3/3]

bool ValueObject::GetValueAsCString ( lldb::Format format,
std::string & destination )

Definition at line 1064 of file ValueObject.cpp.

References GetValueAsCString().

◆ GetValueAsSigned()

int64_t ValueObject::GetValueAsSigned ( int64_t fail_value,
bool * success = nullptr )
virtual

◆ GetValueAsUnsigned()

uint64_t ValueObject::GetValueAsUnsigned ( uint64_t fail_value,
bool * success = nullptr )
virtual

Definition at line 1110 of file ValueObject.cpp.

References CanProvideValue(), lldb_private::Scalar::MakeUnsigned(), ResolveValue(), and lldb_private::Scalar::ULongLong().

Referenced by CastBaseToDerivedType(), CastToBasicType(), lldb_private::formatters::CFBagSummaryProvider(), lldb_private::formatters::CFBinaryHeapSummaryProvider(), lldb_private::formatters::CFBitVectorSummaryProvider(), lldb_private::AppleObjCRuntimeV1::ClassDescriptorV1::ClassDescriptorV1(), CopyExpressionResult(), CreateConstantValue(), DerefToNSErrorPointer(), lldb_private::formatters::DumpCxxSmartPtrPointerSummary(), DumpValueWithLLVMFormat(), ExtractFields(), GetExpressionPath(), GetVTableAddress(), lldb_private::CPlusPlusLanguage::IsNilReference(), lldb_private::ObjCLanguage::IsNilReference(), lldb_private::formatters::NSArraySummaryProvider(), lldb_private::formatters::NSAttributedStringSummaryProvider(), lldb_private::formatters::NSBundleSummaryProvider(), lldb_private::formatters::NSDataSummaryProvider(), lldb_private::formatters::NSDateSummaryProvider(), lldb_private::formatters::NSDecimalNumberSummaryProvider(), lldb_private::formatters::NSDictionarySummaryProvider(), lldb_private::formatters::NSIndexSetSummaryProvider(), lldb_private::formatters::NSMachPortSummaryProvider(), lldb_private::formatters::NSNotificationSummaryProvider(), lldb_private::formatters::NSNumberSummaryProvider(), lldb_private::formatters::NSSetSummaryProvider(), lldb_private::formatters::NSStringSummaryProvider(), lldb_private::formatters::NSTimeZoneSummaryProvider(), lldb_private::formatters::NSURLSummaryProvider(), lldb_private::formatters::ObjCBooleanSummaryProvider(), lldb_private::formatters::ObjCClassSummaryProvider(), lldb_private::formatters::ObjCSELSummaryProvider(), lldb_private::ValueObjectPrinter::PrintChildrenIfNeeded(), lldb_private::ValueObjectDynamicValue::SetData(), lldb_private::ValueObjectDynamicValue::SetValueFromCString(), and ValueObjectVTableChild::UpdateValue().

◆ GetValueDidChange()

bool lldb_private::ValueObject::GetValueDidChange ( )
inline

Definition at line 563 of file ValueObject.h.

References m_flags.

◆ GetValueForExpressionPath()

◆ GetValueForExpressionPath_Impl()

ValueObjectSP ValueObject::GetValueForExpressionPath_Impl ( llvm::StringRef expression_cstr,
ExpressionPathScanEndReason * reason_to_stop,
ExpressionPathEndResultType * final_value_type,
const GetValueForExpressionPathOptions & options,
ExpressionPathAftermath * final_task_on_target )
private

Definition at line 2298 of file ValueObject.cpp.

References lldb_private::Flags::AllClear(), DereferenceValueOrAlternate(), eExpressionPathAftermathDereference, eExpressionPathAftermathNothing, eExpressionPathEndResultTypeBitfield, eExpressionPathEndResultTypeBoundedRange, eExpressionPathEndResultTypeInvalid, eExpressionPathEndResultTypePlain, eExpressionPathEndResultTypeUnboundedRange, eExpressionPathScanEndReasonArrayRangeOperatorMet, eExpressionPathScanEndReasonArrowInsteadOfDot, eExpressionPathScanEndReasonDereferencingFailed, eExpressionPathScanEndReasonDotInsteadOfArrow, eExpressionPathScanEndReasonEmptyRangeNotAllowed, eExpressionPathScanEndReasonEndOfString, eExpressionPathScanEndReasonFragileIVarNotAllowed, eExpressionPathScanEndReasonNoSuchChild, eExpressionPathScanEndReasonRangeOperatorInvalid, eExpressionPathScanEndReasonRangeOperatorNotAllowed, eExpressionPathScanEndReasonSyntheticValueMissing, eExpressionPathScanEndReasonUnexpectedSymbol, lldb::eLanguageTypeObjC, error(), GetAlternateValue(), GetSP(), lldb_private::CompilerType::GetTypeInfo(), lldb_private::ValueObject::GetValueForExpressionPathOptions::m_allow_bitfields_syntax, lldb_private::ValueObject::GetValueForExpressionPathOptions::m_check_dot_vs_arrow_syntax, lldb_private::ValueObject::GetValueForExpressionPathOptions::m_no_fragile_ivar, lldb_private::ValueObject::GetValueForExpressionPathOptions::m_synthetic_children_traversal, lldb_private::Flags::Reset(), lldb_private::Flags::Test(), and ValueObject().

Referenced by GetValueForExpressionPath().

◆ GetValueFormat()

lldb::TypeFormatImplSP lldb_private::ValueObject::GetValueFormat ( )
inline

Definition at line 817 of file ValueObject.h.

References m_type_format_sp, and UpdateFormatsIfNeeded().

◆ GetValueIsValid()

bool lldb_private::ValueObject::GetValueIsValid ( ) const
inline

Definition at line 559 of file ValueObject.h.

References m_flags.

Referenced by UpdateValueIfNeeded().

◆ GetValueType()

◆ GetVariable()

virtual lldb::VariableSP lldb_private::ValueObject::GetVariable ( )
inlinevirtual

◆ GetVTable()

lldb::ValueObjectSP ValueObject::GetVTable ( )

If this object represents a C++ class with a vtable, return an object that represents the virtual function table.

If the object isn't a class with a vtable, return a valid ValueObject with the error set correctly.

Definition at line 3756 of file ValueObject.cpp.

References lldb_private::ValueObjectVTable::Create().

◆ HasChildren()

bool lldb_private::ValueObject::HasChildren ( )
inline

Definition at line 509 of file ValueObject.h.

References GetNumChildrenIgnoringErrors().

◆ HasDynamicValueTypeInfo()

virtual bool lldb_private::ValueObject::HasDynamicValueTypeInfo ( )
inlineprotectedvirtual

Reimplemented in lldb_private::ValueObjectDynamicValue.

Definition at line 1058 of file ValueObject.h.

Referenced by GetDynamicValueType().

◆ HasSpecialPrintableRepresentation()

◆ HasSyntheticValue()

bool ValueObject::HasSyntheticValue ( )
virtual

◆ IsArrayType()

bool lldb_private::ValueObject::IsArrayType ( )
inline

◆ IsBaseClass() [1/2]

◆ IsBaseClass() [2/2]

bool ValueObject::IsBaseClass ( uint32_t & depth)

Definition at line 2080 of file ValueObject.cpp.

References GetParent(), and IsBaseClass().

◆ IsBitfield()

bool lldb_private::ValueObject::IsBitfield ( )
inline

Definition at line 428 of file ValueObject.h.

References GetBitfieldBitOffset(), and GetBitfieldBitSize().

Referenced by CreateConstantValue(), DumpValue(), and GetAddressOf().

◆ IsChecksumEmpty()

bool lldb_private::ValueObject::IsChecksumEmpty ( )
inlineprotected

Definition at line 1100 of file ValueObject.h.

References m_value_checksum.

Referenced by UpdateValueIfNeeded().

◆ IsCStringContainer()

bool ValueObject::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.

Definition at line 648 of file ValueObject.cpp.

References lldb_private::ValueObject::AddrAndType::address, lldb_private::Flags::AnySet(), GetPointerValue(), GetTypeInfo(), lldb_private::CompilerType::IsCharType(), LLDB_INVALID_ADDRESS, and lldb_private::Flags::Test().

Referenced by DumpPrintableRepresentation(), and HasSpecialPrintableRepresentation().

◆ IsDereferenceOfParent()

virtual bool lldb_private::ValueObject::IsDereferenceOfParent ( )
inlinevirtual

Reimplemented in lldb_private::ValueObjectChild.

Definition at line 402 of file ValueObject.h.

Referenced by GetExpressionPath().

◆ IsDynamic()

◆ IsInScope()

◆ IsIntegerType()

bool lldb_private::ValueObject::IsIntegerType ( bool & is_signed)
inline

◆ IsLogicalTrue()

◆ IsNilReference()

bool ValueObject::IsNilReference ( )

◆ IsPointerOrReferenceType()

bool lldb_private::ValueObject::IsPointerOrReferenceType ( )
inline

◆ IsPointerType()

◆ IsPossibleDynamicType()

◆ IsRuntimeSupportValue()

bool ValueObject::IsRuntimeSupportValue ( )
virtual

◆ IsScalarType()

bool lldb_private::ValueObject::IsScalarType ( )
inline

◆ IsSynthetic()

◆ IsSyntheticChildrenGenerated()

virtual bool lldb_private::ValueObject::IsSyntheticChildrenGenerated ( )
inlinevirtual

Reimplemented in lldb_private::ValueObjectDynamicValue, and lldb_private::ValueObjectSynthetic.

Definition at line 691 of file ValueObject.h.

References m_flags.

◆ IsUninitializedReference()

bool ValueObject::IsUninitializedReference ( )

◆ MaybeCalculateCompleteType()

CompilerType ValueObject::MaybeCalculateCompleteType ( )
privatevirtual

◆ MightHaveChildren()

bool ValueObject::MightHaveChildren ( )
virtual

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 in lldb_private::ValueObjectSynthetic.

Definition at line 470 of file ValueObject.cpp.

References GetNumChildrenIgnoringErrors(), and GetTypeInfo().

Referenced by lldb_private::ValueObjectPrinter::ShouldPrintEmptyBrackets().

◆ NeedsUpdating()

bool lldb_private::ValueObject::NeedsUpdating ( )
inline

◆ operator=()

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

References ValueObject().

◆ Persist()

◆ ReadPointedString()

◆ ResolveValue()

◆ SetAddressTypeOfChildren()

◆ SetData()

◆ SetDerefValobj()

void lldb_private::ValueObject::SetDerefValobj ( ValueObject * deref)
inline

Definition at line 808 of file ValueObject.h.

References m_deref_valobj, and ValueObject().

◆ SetFormat()

◆ SetHasCompleteType()

void lldb_private::ValueObject::SetHasCompleteType ( )
inline

Definition at line 850 of file ValueObject.h.

References m_flags.

◆ SetIsConstant()

◆ SetLanguageFlags()

virtual void lldb_private::ValueObject::SetLanguageFlags ( uint64_t flags)
inlinevirtual

◆ SetLiveAddress()

virtual void lldb_private::ValueObject::SetLiveAddress ( lldb::addr_t addr = LLDB_INVALID_ADDRESS,
AddressType address_type = eAddressTypeLoad )
inlinevirtual

Reimplemented in lldb_private::ValueObjectConstResult.

Definition at line 636 of file ValueObject.h.

References lldb_private::eAddressTypeLoad, and LLDB_INVALID_ADDRESS.

◆ SetName()

◆ SetNeedsUpdate()

◆ SetNumChildren()

void ValueObject::SetNumChildren ( uint32_t num_children)
protected

Definition at line 483 of file ValueObject.cpp.

References m_children, and m_flags.

Referenced by GetNumChildren().

◆ SetPreferredDisplayLanguage()

◆ SetPreferredDisplayLanguageIfNeeded()

void ValueObject::SetPreferredDisplayLanguageIfNeeded ( lldb::LanguageType lt)
protected

◆ SetSummaryFormat()

void lldb_private::ValueObject::SetSummaryFormat ( lldb::TypeSummaryImplSP format)
inline

◆ SetSyntheticChildren()

void lldb_private::ValueObject::SetSyntheticChildren ( const lldb::SyntheticChildrenSP & synth_sp)
inline

◆ SetSyntheticChildrenGenerated()

virtual void lldb_private::ValueObject::SetSyntheticChildrenGenerated ( bool b)
inlinevirtual

◆ SetValueDidChange()

◆ SetValueFormat()

void lldb_private::ValueObject::SetValueFormat ( lldb::TypeFormatImplSP format)
inline

◆ SetValueFromCString()

◆ SetValueFromInteger() [1/2]

void ValueObject::SetValueFromInteger ( const llvm::APInt & value,
Status & error )

Update an existing integer ValueObject with a new integer value.

This is only intended to be used with 'temporary' ValueObjects, i.e. ones that are not associated with program variables. It does not update program memory, registers, stack, etc.

Definition at line 1204 of file ValueObject.cpp.

References error(), lldb_private::Status::FromErrorString(), GetByteSize(), GetCompilerType(), GetTargetSP(), GetVariable(), lldb_private::CompilerType::IsFloat(), lldb_private::CompilerType::IsInteger(), lldb_private::CompilerType::IsPointerType(), lldb_private::CompilerType::IsScalarType(), lldb_private::CompilerType::IsUnscopedEnumerationType(), and SetData().

Referenced by SetValueFromInteger().

◆ SetValueFromInteger() [2/2]

void ValueObject::SetValueFromInteger ( lldb::ValueObjectSP new_val_sp,
Status & error )

Update an existing integer ValueObject with an integer value created frome 'new_val_sp'.

This is only intended to be used with 'temporary' ValueObjects, i.e. ones that are not associated with program variables. It does not update program memory, registers, stack, etc.

Definition at line 1243 of file ValueObject.cpp.

References error(), lldb_private::Status::FromErrorString(), GetCompilerType(), GetTargetSP(), GetVariable(), lldb_private::CompilerType::IsFloat(), lldb_private::CompilerType::IsInteger(), lldb_private::CompilerType::IsPointerType(), lldb_private::CompilerType::IsScalarType(), lldb_private::CompilerType::IsUnscopedEnumerationType(), and SetValueFromInteger().

◆ SetValueIsValid()

◆ UpdateChildrenAddressType()

void lldb_private::ValueObject::UpdateChildrenAddressType ( )
inlineprivate

Definition at line 1109 of file ValueObject.h.

References DoUpdateChildrenAddressType(), and GetRoot().

Referenced by UpdateValueIfNeeded().

◆ UpdateFormatsIfNeeded()

◆ UpdateValue()

◆ UpdateValueIfNeeded()

bool ValueObject::UpdateValueIfNeeded ( bool update_format = true)

Definition at line 111 of file ValueObject.cpp.

References CanProvideValue(), ClearUserVisibleData(), eClearUserVisibleDataItemsDescription, eClearUserVisibleDataItemsSummary, eClearUserVisibleDataItemsValue, lldb_private::Status::FromErrorString(), GetIsConstant(), GetValueIsValid(), IsChecksumEmpty(), IsInScope(), m_data, m_error, m_flags, m_old_value_str, m_update_point, m_value_checksum, m_value_str, NeedsUpdating(), SetValueDidChange(), SetValueIsValid(), UpdateChildrenAddressType(), UpdateFormatsIfNeeded(), and UpdateValue().

Referenced by lldb_private::ValueObjectDynamicValue::CalculateNumChildren(), lldb_private::ValueObjectSynthetic::CalculateNumChildren(), lldb_private::ValueObjectVTable::CalculateNumChildren(), lldb_private::ValueObjectSynthetic::CanProvideValue(), lldb_private::ValueObjectSynthetic::CopyValueData(), CreateConstantValue(), lldb_private::ValueObjectSynthetic::DoesProvideSyntheticValue(), GetAddressOf(), lldb_private::ValueObjectDynamicValue::GetByteSize(), GetChildAtIndex(), lldb_private::ValueObjectSynthetic::GetChildAtIndex(), GetChildMemberWithName(), lldb_private::ValueObjectSynthetic::GetChildMemberWithName(), lldb_private::ValueObjectDynamicValue::GetCompilerTypeImpl(), GetData(), GetDataExtractor(), lldb_private::ValueObjectDynamicValue::GetDisplayTypeName(), GetError(), GetExpressionPath(), lldb_private::ValueObjectSynthetic::GetIndexOfChildWithName(), GetLocationAsCStringImpl(), GetNumChildren(), GetObjectDescription(), GetPointerValue(), lldb_private::ValueObjectDynamicValue::GetQualifiedTypeName(), GetSummaryAsCString(), GetSummaryAsCString(), lldb_private::ValueObjectDynamicValue::GetTypeImpl(), lldb_private::ValueObjectDynamicValue::GetTypeName(), GetValueAsCString(), GetValueAsCString(), Persist(), ResolveValue(), lldb_private::ValueObjectRegister::ResolveValue(), SetData(), lldb_private::ValueObjectDynamicValue::SetData(), lldb_private::ValueObjectVariable::SetData(), SetValueFromCString(), lldb_private::ValueObjectDynamicValue::SetValueFromCString(), lldb_private::ValueObjectVariable::SetValueFromCString(), and lldb_private::ValueObjectChild::UpdateValue().

◆ ValueUpdated()

void lldb_private::ValueObject::ValueUpdated ( )
inline

◆ ExpressionVariable

friend class ExpressionVariable
friend

Definition at line 1030 of file ValueObject.h.

References ExpressionVariable.

Referenced by ExpressionVariable.

◆ Target

◆ ValueObjectChild

◆ ValueObjectConstResultImpl

friend class ValueObjectConstResultImpl
friend

Definition at line 1032 of file ValueObject.h.

References ValueObjectConstResultImpl.

Referenced by ValueObjectConstResultImpl.

◆ ValueObjectSynthetic

Member Data Documentation

◆ m_addr_of_valobj_sp

lldb::ValueObjectSP lldb_private::ValueObject::m_addr_of_valobj_sp
protected

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.

Definition at line 985 of file ValueObject.h.

Referenced by AddressOf().

◆ m_address_type_of_ptr_or_ref_children

AddressType lldb_private::ValueObject::m_address_type_of_ptr_or_ref_children = eAddressTypeInvalid
protected

Definition at line 994 of file ValueObject.h.

Referenced by GetAddressTypeOfChildren(), SetAddressTypeOfChildren(), and ValueObject().

◆ m_children

ChildrenManager lldb_private::ValueObject::m_children
protected

◆ m_data

◆ m_deref_valobj

ValueObject* lldb_private::ValueObject::m_deref_valobj = nullptr
protected

Definition at line 981 of file ValueObject.h.

Referenced by Dereference(), GetDerefValobj(), and SetDerefValobj().

◆ m_dynamic_value

ValueObject* lldb_private::ValueObject::m_dynamic_value = nullptr
protected

◆ m_error

◆ m_flags

◆ m_format

lldb::Format lldb_private::ValueObject::m_format = lldb::eFormatDefault
protected

Definition at line 987 of file ValueObject.h.

Referenced by GetFormat(), and SetFormat().

◆ m_id

UserID lldb_private::ValueObject::m_id
protected

Unique identifier for every value object.

Definition at line 1003 of file ValueObject.h.

Referenced by GetID(), ValueObject(), and ValueObject().

◆ m_language_flags

uint64_t lldb_private::ValueObject::m_language_flags = 0
protected

Definition at line 1000 of file ValueObject.h.

Referenced by GetLanguageFlags(), and SetLanguageFlags().

◆ m_last_format

lldb::Format lldb_private::ValueObject::m_last_format = lldb::eFormatDefault
protected

Definition at line 988 of file ValueObject.h.

Referenced by GetValueAsCString().

◆ m_last_format_mgr_revision

uint32_t lldb_private::ValueObject::m_last_format_mgr_revision = 0
protected

Definition at line 989 of file ValueObject.h.

Referenced by ClearDynamicTypeInformation(), and UpdateFormatsIfNeeded().

◆ m_location_str

std::string lldb_private::ValueObject::m_location_str
protected

Cached location string that will get cleared if/when the value is updated.

Definition at line 959 of file ValueObject.h.

Referenced by ClearUserVisibleData(), and GetLocationAsCStringImpl().

◆ m_manager

ValueObjectManager* lldb_private::ValueObject::m_manager = nullptr
protected

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.

Shared pointers to value objects must always be made with the GetSP method.

Definition at line 974 of file ValueObject.h.

Referenced by GetManager(), GetSP(), ValueObject(), and ValueObject().

◆ m_name

◆ m_object_desc_str

std::string lldb_private::ValueObject::m_object_desc_str
protected

Cached result of the "object printer".

This differs from the summary in that the summary is consed up by us, the object_desc_string is builtin.

Definition at line 964 of file ValueObject.h.

Referenced by ClearUserVisibleData(), and GetObjectDescription().

◆ m_old_value_str

std::string lldb_private::ValueObject::m_old_value_str
protected

Cached old value string from the last time the value was gotten.

Definition at line 957 of file ValueObject.h.

Referenced by GetValueAsCString(), and UpdateValueIfNeeded().

◆ m_override_type

CompilerType lldb_private::ValueObject::m_override_type
protected

If the type of the value object should be overridden, the type to impose.

Definition at line 966 of file ValueObject.h.

Referenced by ClearDynamicTypeInformation(), and MaybeCalculateCompleteType().

◆ m_parent

ValueObject* lldb_private::ValueObject::m_parent = nullptr
protected

The parent value object, or nullptr if this has no parent.

Definition at line 938 of file ValueObject.h.

Referenced by lldb_private::ValueObjectDynamicValue::CalculateNumChildren(), lldb_private::ValueObjectRecognizerSynthesizedValue::CalculateNumChildren(), lldb_private::ValueObjectSynthetic::CanProvideValue(), lldb_private::ValueObjectChild::CanUpdateWithInvalidExecutionContext(), lldb_private::ValueObjectSynthetic::CreateSynthFilter(), FollowParentChain(), lldb_private::ValueObjectDynamicValue::GetByteSize(), lldb_private::ValueObjectRecognizerSynthesizedValue::GetByteSize(), lldb_private::ValueObjectSynthetic::GetByteSize(), lldb_private::ValueObjectDynamicValue::GetCompilerTypeImpl(), lldb_private::ValueObjectRecognizerSynthesizedValue::GetCompilerTypeImpl(), lldb_private::ValueObjectSynthetic::GetCompilerTypeImpl(), lldb_private::ValueObjectDynamicValue::GetDeclaration(), lldb_private::ValueObjectSynthetic::GetDeclaration(), lldb_private::ValueObjectDynamicValue::GetDisplayTypeName(), lldb_private::ValueObjectSynthetic::GetDisplayTypeName(), lldb_private::ValueObjectSynthetic::GetDynamicValue(), GetDynamicValueType(), lldb_private::ValueObjectSynthetic::GetDynamicValueType(), GetFormat(), lldb_private::ValueObjectDynamicValue::GetLanguageFlags(), lldb_private::ValueObjectSynthetic::GetLanguageFlags(), lldb_private::ValueObjectSynthetic::GetNonSyntheticValue(), GetParent(), GetParent(), lldb_private::ValueObjectCast::GetParent(), lldb_private::ValueObjectCast::GetParent(), lldb_private::ValueObjectDynamicValue::GetParent(), lldb_private::ValueObjectDynamicValue::GetParent(), lldb_private::ValueObjectSynthetic::GetParent(), lldb_private::ValueObjectSynthetic::GetParent(), lldb_private::ValueObjectDynamicValue::GetPreferredDisplayLanguage(), lldb_private::ValueObjectSynthetic::GetPreferredDisplayLanguage(), lldb_private::ValueObjectDynamicValue::GetQualifiedTypeName(), lldb_private::ValueObjectSynthetic::GetQualifiedTypeName(), GetRoot(), lldb_private::ValueObjectDynamicValue::GetStaticValue(), lldb_private::ValueObjectSynthetic::GetStaticValue(), GetSymbolContextScope(), lldb_private::ValueObjectDynamicValue::GetTypeImpl(), lldb_private::ValueObjectDynamicValue::GetTypeName(), lldb_private::ValueObjectSynthetic::GetTypeName(), lldb_private::ValueObjectCast::GetValueType(), lldb_private::ValueObjectChild::GetValueType(), lldb_private::ValueObjectDynamicValue::GetValueType(), lldb_private::ValueObjectSynthetic::GetValueType(), lldb_private::ValueObjectDynamicValue::GetVariable(), lldb_private::ValueObjectSynthetic::GetVariable(), lldb_private::ValueObjectDynamicValue::IsBaseClass(), lldb_private::ValueObjectSynthetic::IsDynamic(), lldb_private::ValueObjectCast::IsInScope(), lldb_private::ValueObjectDynamicValue::IsInScope(), lldb_private::ValueObjectSynthetic::IsInScope(), lldb_private::ValueObjectDynamicValue::IsSyntheticChildrenGenerated(), lldb_private::ValueObjectSynthetic::IsSyntheticChildrenGenerated(), lldb_private::ValueObjectDynamicValue::SetData(), lldb_private::ValueObjectSynthetic::SetFormat(), lldb_private::ValueObjectDynamicValue::SetLanguageFlags(), lldb_private::ValueObjectSynthetic::SetLanguageFlags(), lldb_private::ValueObjectDynamicValue::SetPreferredDisplayLanguage(), lldb_private::ValueObjectSynthetic::SetPreferredDisplayLanguage(), lldb_private::ValueObjectDynamicValue::SetSyntheticChildrenGenerated(), lldb_private::ValueObjectSynthetic::SetSyntheticChildrenGenerated(), lldb_private::ValueObjectDynamicValue::SetValueFromCString(), lldb_private::ValueObjectSynthetic::SetValueFromCString(), lldb_private::ValueObjectCast::UpdateValue(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectRecognizerSynthesizedValue::UpdateValue(), lldb_private::ValueObjectSynthetic::UpdateValue(), ValueObject(), and lldb_private::ValueObjectSynthetic::ValueObjectSynthetic().

◆ m_preferred_display_language

◆ m_root

ValueObject* lldb_private::ValueObject::m_root = nullptr
protected

The root of the hierarchy for this ValueObject (or nullptr if never calculated).

Definition at line 941 of file ValueObject.h.

Referenced by GetRoot().

◆ m_summary_str

std::string lldb_private::ValueObject::m_summary_str
protected

Cached summary string that will get cleared if/when the value is updated.

Definition at line 961 of file ValueObject.h.

Referenced by ClearUserVisibleData(), and GetSummaryAsCString().

◆ m_synthetic_children

std::map<ConstString, ValueObject *> lldb_private::ValueObject::m_synthetic_children
protected

Definition at line 977 of file ValueObject.h.

Referenced by AddSyntheticChild(), and GetSyntheticChild().

◆ m_synthetic_children_sp

lldb::SyntheticChildrenSP lldb_private::ValueObject::m_synthetic_children_sp
protected

◆ m_synthetic_value

ValueObject* lldb_private::ValueObject::m_synthetic_value = nullptr
protected

◆ m_type_format_sp

lldb::TypeFormatImplSP lldb_private::ValueObject::m_type_format_sp
protected

Definition at line 991 of file ValueObject.h.

Referenced by GetValueAsCString(), GetValueFormat(), and SetValueFormat().

◆ m_type_summary_sp

lldb::TypeSummaryImplSP lldb_private::ValueObject::m_type_summary_sp
protected

Definition at line 990 of file ValueObject.h.

Referenced by GetSummaryFormat(), and SetSummaryFormat().

◆ m_update_point

EvaluationPoint lldb_private::ValueObject::m_update_point
protected

Stores both the stop id and the full context at which this value was last updated.

When we are asked to update the value object, we check whether the context & stop id are the same before updating.

Definition at line 945 of file ValueObject.h.

Referenced by GetExecutionContextRef(), GetFrameSP(), GetIsConstant(), GetProcessSP(), GetTargetSP(), GetThreadSP(), GetUpdatePoint(), GetUpdatePoint(), NeedsUpdating(), SetIsConstant(), SetNeedsUpdate(), lldb_private::ValueObjectCast::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), UpdateValueIfNeeded(), ValueObject(), and ValueObject().

◆ m_user_id_of_forced_summary

ProcessModID lldb_private::ValueObject::m_user_id_of_forced_summary
protected

Definition at line 993 of file ValueObject.h.

◆ m_value

Value lldb_private::ValueObject::m_value
protected

Definition at line 950 of file ValueObject.h.

Referenced by Cast(), lldb_private::ValueObjectSynthetic::CopyValueData(), CreateConstantValue(), GetAddressOf(), lldb_private::ValueObjectCast::GetByteSize(), lldb_private::ValueObjectDynamicValue::GetByteSize(), lldb_private::ValueObjectConstResult::GetCompilerTypeImpl(), lldb_private::ValueObjectDynamicValue::GetCompilerTypeImpl(), ValueObjectVTableChild::GetCompilerTypeImpl(), GetData(), GetExpressionPath(), GetLocalBuffer(), GetLocationAsCString(), GetPointeeData(), GetPointerValue(), GetValue(), GetValue(), GetValueAsCString(), ResolveValue(), SetData(), SetValueFromCString(), lldb_private::ValueObjectCast::UpdateValue(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectRecognizerSynthesizedValue::UpdateValue(), lldb_private::ValueObjectRegister::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObjectVTable::UpdateValue(), ValueObjectVTableChild::UpdateValue(), lldb_private::ValueObjectCast::ValueObjectCast(), lldb_private::ValueObjectConstResult::ValueObjectConstResult(), lldb_private::ValueObjectConstResult::ValueObjectConstResult(), lldb_private::ValueObjectConstResult::ValueObjectConstResult(), lldb_private::ValueObjectConstResult::ValueObjectConstResult(), lldb_private::ValueObjectConstResult::ValueObjectConstResult(), lldb_private::ValueObjectMemory::ValueObjectMemory(), and lldb_private::ValueObjectMemory::ValueObjectMemory().

◆ m_value_checksum

llvm::SmallVector<uint8_t, 16> lldb_private::ValueObject::m_value_checksum
protected

Definition at line 996 of file ValueObject.h.

Referenced by IsChecksumEmpty(), and UpdateValueIfNeeded().

◆ m_value_str

std::string lldb_private::ValueObject::m_value_str
protected

Cached value string that will get cleared if/when the value is updated.

Definition at line 955 of file ValueObject.h.

Referenced by ClearUserVisibleData(), GetValueAsCString(), and UpdateValueIfNeeded().


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