LLDB  mainline
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lldb_private::ValueObjectMemory Class Reference

#include <ValueObjectMemory.h>

Inheritance diagram for lldb_private::ValueObjectMemory:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::ValueObjectMemory:
Collaboration graph
[legend]

Public Member Functions

 ~ValueObjectMemory () override
 
uint64_t GetByteSize () override
 
ConstString GetTypeName () override
 
ConstString GetDisplayTypeName () override
 
size_t CalculateNumChildren (uint32_t max) override
 
lldb::ValueType GetValueType () const override
 
bool IsInScope () override
 
lldb::ModuleSP GetModule () 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 ConstString GetQualifiedTypeName ()
 
virtual lldb::LanguageType GetObjectRuntimeLanguage ()
 
virtual uint32_t GetTypeInfo (CompilerType *pointee_or_element_compiler_type=nullptr)
 
virtual bool IsPointerType ()
 
virtual bool IsArrayType ()
 
virtual bool IsScalarType ()
 
virtual bool IsPointerOrReferenceType ()
 
virtual bool IsPossibleDynamicType ()
 
bool IsNilReference ()
 
bool IsUninitializedReference ()
 
virtual bool IsBaseClass ()
 
bool IsBaseClass (uint32_t &depth)
 
virtual bool IsDereferenceOfParent ()
 
bool IsIntegerType (bool &is_signed)
 
virtual bool GetBaseClassPath (Stream &s)
 
virtual void GetExpressionPath (Stream &s, bool qualify_cxx_base_classes, 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 lldb::offset_t GetByteOffset ()
 
virtual uint32_t GetBitfieldBitSize ()
 
virtual uint32_t GetBitfieldBitOffset ()
 
bool IsBitfield ()
 
virtual bool IsArrayItemForPointer ()
 
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)
 
virtual bool SetValueFromCString (const char *value_str, Status &error)
 
ValueObjectGetRoot ()
 
ValueObjectFollowParentChain (std::function< bool(ValueObject *)>)
 
virtual bool GetDeclaration (Declaration &decl)
 
const StatusGetError ()
 
ConstString GetName () const
 
virtual lldb::ValueObjectSP GetChildAtIndex (size_t idx, bool can_create)
 
lldb::ValueObjectSP GetChildAtIndexPath (llvm::ArrayRef< size_t > idxs, size_t *index_of_error=nullptr)
 
lldb::ValueObjectSP GetChildAtIndexPath (llvm::ArrayRef< std::pair< size_t, bool >> idxs, size_t *index_of_error=nullptr)
 
lldb::ValueObjectSP GetChildAtNamePath (llvm::ArrayRef< ConstString > names, ConstString *name_of_error=nullptr)
 
lldb::ValueObjectSP GetChildAtNamePath (llvm::ArrayRef< std::pair< ConstString, bool >> names, ConstString *name_of_error=nullptr)
 
virtual lldb::ValueObjectSP GetChildMemberWithName (ConstString name, bool can_create)
 
virtual size_t GetIndexOfChildWithName (ConstString name)
 
size_t GetNumChildren (uint32_t max=UINT32_MAX)
 
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)
 
std::pair< TypeValidatorResult, std::string > GetValidationStatus ()
 
const char * 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)
 
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 (bool use_synthetic=true)
 
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)
 
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)
 
virtual lldb::ValueObjectSP Cast (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)
 
virtual void ValueUpdated ()
 
virtual bool IsDynamic ()
 
virtual bool DoesProvideSyntheticValue ()
 
virtual bool IsSyntheticChildrenGenerated ()
 
virtual void SetSyntheticChildrenGenerated (bool b)
 
virtual SymbolContextScopeGetSymbolContextScope ()
 
void Dump (Stream &s)
 
void Dump (Stream &s, const DumpValueObjectOptions &options)
 
void LogValueObject (Log *log)
 
void LogValueObject (Log *log, const DumpValueObjectOptions &options)
 
lldb::ValueObjectSP Persist ()
 
bool IsCStringContainer (bool check_pointer=false)
 
std::pair< size_t, bool > ReadPointedString (lldb::DataBufferSP &buffer_sp, Status &error, uint32_t max_length=0, bool honor_array=true, lldb::Format item_format=lldb::eFormatCharArray)
 
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)
 
lldb::TypeSummaryImplSP GetSummaryFormat ()
 
void SetSummaryFormat (lldb::TypeSummaryImplSP format)
 
lldb::TypeValidatorImplSP GetValidator ()
 
void SetValidator (lldb::TypeValidatorImplSP format)
 
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. More...
 
virtual lldb::VariableSP GetVariable ()
 
virtual bool IsRuntimeSupportValue ()
 
virtual uint64_t GetLanguageFlags ()
 
virtual void SetLanguageFlags (uint64_t flags)
 
- Public Member Functions inherited from lldb_private::UserID
 UserID (lldb::user_id_t uid=LLDB_INVALID_UID)
 Construct with optional user ID. More...
 
 ~UserID ()
 Destructor. More...
 
void Clear ()
 Clears the object state. More...
 
lldb::user_id_t GetID () const
 Get accessor for the user ID. More...
 
void SetID (lldb::user_id_t uid)
 Set accessor for the user ID. More...
 

Static Public Member Functions

static lldb::ValueObjectSP Create (ExecutionContextScope *exe_scope, llvm::StringRef name, const Address &address, lldb::TypeSP &type_sp)
 
static lldb::ValueObjectSP Create (ExecutionContextScope *exe_scope, llvm::StringRef name, const Address &address, const CompilerType &ast_type)
 
- 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)
 
static lldb::ValueObjectSP CreateValueObjectFromData (llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type)
 

Protected Member Functions

bool UpdateValue () override
 
CompilerType GetCompilerTypeImpl () override
 
- Protected Member Functions inherited from lldb_private::ValueObject
 ValueObject ()
 
 ValueObject (ExecutionContextScope *exe_scope, AddressType child_ptr_or_ref_addr_type=eAddressTypeLoad)
 
 ValueObject (ValueObject &parent)
 
ValueObjectManagerGetManager ()
 
virtual LazyBool CanUpdateWithInvalidExecutionContext ()
 
virtual void CalculateDynamicValue (lldb::DynamicValueType use_dynamic)
 
virtual lldb::DynamicValueType GetDynamicValueTypeImpl ()
 
virtual bool HasDynamicValueTypeInfo ()
 
virtual void CalculateSyntheticValue (bool use_synthetic=true)
 
virtual ValueObjectCreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index)
 
void SetNumChildren (size_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 ()
 
const char * GetLocationAsCStringImpl (const Value &value, const DataExtractor &data)
 
bool IsChecksumEmpty ()
 
void SetPreferredDisplayLanguageIfNeeded (lldb::LanguageType)
 

Protected Attributes

Address m_address
 The variable that this value object is based upon. More...
 
lldb::TypeSP m_type_sp
 
CompilerType m_compiler_type
 
- Protected Attributes inherited from lldb_private::ValueObject
ValueObjectm_parent
 
ValueObjectm_root
 
EvaluationPoint m_update_point
 
ConstString m_name
 
DataExtractor m_data
 
Value m_value
 
Status m_error
 
std::string m_value_str
 
std::string m_old_value_str
 
std::string m_location_str
 
std::string m_summary_str
 
std::string m_object_desc_str
 
llvm::Optional< std::pair< TypeValidatorResult, std::string > > m_validation_result
 
CompilerType m_override_type
 
ValueObjectManagerm_manager
 
ChildrenManager m_children
 
std::map< ConstString, ValueObject * > m_synthetic_children
 
ValueObjectm_dynamic_value
 
ValueObjectm_synthetic_value
 
ValueObjectm_deref_valobj
 
lldb::ValueObjectSP m_addr_of_valobj_sp
 
lldb::Format m_format
 
lldb::Format m_last_format
 
uint32_t m_last_format_mgr_revision
 
lldb::TypeSummaryImplSP m_type_summary_sp
 
lldb::TypeFormatImplSP m_type_format_sp
 
lldb::SyntheticChildrenSP m_synthetic_children_sp
 
lldb::TypeValidatorImplSP m_type_validator_sp
 
ProcessModID m_user_id_of_forced_summary
 
AddressType m_address_type_of_ptr_or_ref_children
 
llvm::SmallVector< uint8_t, 16 > m_value_checksum
 
lldb::LanguageType m_preferred_display_language
 
uint64_t m_language_flags
 
bool m_value_is_valid: 1
 
bool m_value_did_change: 1
 
bool m_children_count_valid: 1
 
bool m_old_value_valid: 1
 
bool m_is_deref_of_parent: 1
 
bool m_is_array_item_for_pointer: 1
 
bool m_is_bitfield_for_scalar: 1
 
bool m_is_child_at_offset: 1
 
bool m_is_getting_summary: 1
 
bool m_did_calculate_complete_objc_class_type: 1
 
bool m_is_synthetic_children_generated: 1
 
- Protected Attributes inherited from lldb_private::UserID
lldb::user_id_t m_uid
 The user ID that uniquely identifies an object. More...
 

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, eClearUserVisibleDataItemsValidator = 1u << 6, eClearUserVisibleDataItemsAllStrings,
  eClearUserVisibleDataItemsAll = 0xFFFF
}
 
enum  PrintableRepresentationSpecialCases : bool { PrintableRepresentationSpecialCases::eDisable = false, PrintableRepresentationSpecialCases::eAllow = true }
 
- Protected Types inherited from lldb_private::ValueObject
typedef ClusterManager< ValueObjectValueObjectManager
 

Detailed Description

Definition at line 32 of file ValueObjectMemory.h.

Constructor & Destructor Documentation

◆ ~ValueObjectMemory()

ValueObjectMemory::~ValueObjectMemory ( )
override

Definition at line 104 of file ValueObjectMemory.cpp.

Member Function Documentation

◆ CalculateNumChildren()

size_t ValueObjectMemory::CalculateNumChildren ( uint32_t  max)
overridevirtual

Implements lldb_private::ValueObject.

Definition at line 124 of file ValueObjectMemory.cpp.

◆ Create() [1/2]

ValueObjectSP ValueObjectMemory::Create ( ExecutionContextScope exe_scope,
llvm::StringRef  name,
const Address address,
lldb::TypeSP &  type_sp 
)
static

◆ Create() [2/2]

ValueObjectSP ValueObjectMemory::Create ( ExecutionContextScope exe_scope,
llvm::StringRef  name,
const Address address,
const CompilerType ast_type 
)
static

◆ GetByteSize()

uint64_t ValueObjectMemory::GetByteSize ( )
overridevirtual

Implements lldb_private::ValueObject.

Definition at line 137 of file ValueObjectMemory.cpp.

◆ GetCompilerTypeImpl()

CompilerType ValueObjectMemory::GetCompilerTypeImpl ( )
overrideprotectedvirtual

Implements lldb_private::ValueObject.

Definition at line 106 of file ValueObjectMemory.cpp.

◆ GetDisplayTypeName()

ConstString ValueObjectMemory::GetDisplayTypeName ( )
overridevirtual

Reimplemented from lldb_private::ValueObject.

Definition at line 118 of file ValueObjectMemory.cpp.

◆ GetModule()

lldb::ModuleSP ValueObjectMemory::GetModule ( )
overridevirtual

Reimplemented from lldb_private::ValueObject.

Definition at line 228 of file ValueObjectMemory.cpp.

◆ GetTypeName()

ConstString ValueObjectMemory::GetTypeName ( )
overridevirtual

Reimplemented from lldb_private::ValueObject.

Definition at line 112 of file ValueObjectMemory.cpp.

◆ GetValueType()

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

Implements lldb_private::ValueObject.

Definition at line 143 of file ValueObjectMemory.cpp.

References lldb::eValueTypeVariableGlobal.

◆ IsInScope()

bool ValueObjectMemory::IsInScope ( )
overridevirtual

Reimplemented from lldb_private::ValueObject.

Definition at line 222 of file ValueObjectMemory.cpp.

◆ UpdateValue()

bool ValueObjectMemory::UpdateValue ( )
overrideprotectedvirtual

Member Data Documentation

◆ m_address

Address lldb_private::ValueObjectMemory::m_address
protected

The variable that this value object is based upon.

Definition at line 65 of file ValueObjectMemory.h.

◆ m_compiler_type

CompilerType lldb_private::ValueObjectMemory::m_compiler_type
protected

Definition at line 67 of file ValueObjectMemory.h.

◆ m_type_sp

lldb::TypeSP lldb_private::ValueObjectMemory::m_type_sp
protected

Definition at line 66 of file ValueObjectMemory.h.


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