LLDB  mainline
Public Member Functions | Protected Member Functions | Friends | List of all members
lldb::SBValue Class Reference

#include <SBValue.h>

Public Member Functions

 SBValue ()
 
 SBValue (const lldb::SBValue &rhs)
 
lldb::SBValueoperator= (const lldb::SBValue &rhs)
 
 ~SBValue ()
 
 operator bool () const
 
bool IsValid ()
 
void Clear ()
 
SBError GetError ()
 
lldb::user_id_t GetID ()
 
const char * GetName ()
 
const char * GetTypeName ()
 
const char * GetDisplayTypeName ()
 
size_t GetByteSize ()
 
bool IsInScope ()
 
lldb::Format GetFormat ()
 
void SetFormat (lldb::Format format)
 
const char * GetValue ()
 
int64_t GetValueAsSigned (lldb::SBError &error, int64_t fail_value=0)
 
uint64_t GetValueAsUnsigned (lldb::SBError &error, uint64_t fail_value=0)
 
int64_t GetValueAsSigned (int64_t fail_value=0)
 
uint64_t GetValueAsUnsigned (uint64_t fail_value=0)
 
ValueType GetValueType ()
 
bool GetValueDidChange ()
 
const char * GetSummary ()
 
const char * GetSummary (lldb::SBStream &stream, lldb::SBTypeSummaryOptions &options)
 
const char * GetObjectDescription ()
 
const char * GetTypeValidatorResult ()
 
lldb::SBValue GetDynamicValue (lldb::DynamicValueType use_dynamic)
 
lldb::SBValue GetStaticValue ()
 
lldb::SBValue GetNonSyntheticValue ()
 
lldb::DynamicValueType GetPreferDynamicValue ()
 
void SetPreferDynamicValue (lldb::DynamicValueType use_dynamic)
 
bool GetPreferSyntheticValue ()
 
void SetPreferSyntheticValue (bool use_synthetic)
 
bool IsDynamic ()
 
bool IsSynthetic ()
 
bool IsSyntheticChildrenGenerated ()
 
void SetSyntheticChildrenGenerated (bool)
 
const char * GetLocation ()
 
bool SetValueFromCString (const char *value_str)
 
bool SetValueFromCString (const char *value_str, lldb::SBError &error)
 
lldb::SBTypeFormat GetTypeFormat ()
 
lldb::SBTypeSummary GetTypeSummary ()
 
lldb::SBTypeFilter GetTypeFilter ()
 
lldb::SBTypeSynthetic GetTypeSynthetic ()
 
lldb::SBValue GetChildAtIndex (uint32_t idx)
 
lldb::SBValue CreateChildAtOffset (const char *name, uint32_t offset, lldb::SBType type)
 
lldb::SBValue Cast (lldb::SBType type)
 
lldb::SBValue CreateValueFromExpression (const char *name, const char *expression)
 
lldb::SBValue CreateValueFromExpression (const char *name, const char *expression, SBExpressionOptions &options)
 
lldb::SBValue CreateValueFromAddress (const char *name, lldb::addr_t address, lldb::SBType type)
 
lldb::SBValue CreateValueFromData (const char *name, lldb::SBData data, lldb::SBType type)
 
lldb::SBValue GetChildAtIndex (uint32_t idx, lldb::DynamicValueType use_dynamic, bool can_create_synthetic)
 Get a child value by index from a value. More...
 
uint32_t GetIndexOfChildWithName (const char *name)
 
lldb::SBValue GetChildMemberWithName (const char *name)
 
lldb::SBValue GetChildMemberWithName (const char *name, lldb::DynamicValueType use_dynamic)
 
lldb::SBValue GetValueForExpressionPath (const char *expr_path)
 
lldb::SBValue AddressOf ()
 
lldb::addr_t GetLoadAddress ()
 
lldb::SBAddress GetAddress ()
 
lldb::SBData GetPointeeData (uint32_t item_idx=0, uint32_t item_count=1)
 Get an SBData wrapping what this SBValue points to. More...
 
lldb::SBData GetData ()
 Get an SBData wrapping the contents of this SBValue. More...
 
bool SetData (lldb::SBData &data, lldb::SBError &error)
 
lldb::SBDeclaration GetDeclaration ()
 
bool MightHaveChildren ()
 Find out if a SBValue might have children. More...
 
bool IsRuntimeSupportValue ()
 
uint32_t GetNumChildren ()
 
uint32_t GetNumChildren (uint32_t max)
 
void * GetOpaqueType ()
 
lldb::SBTarget GetTarget ()
 
lldb::SBProcess GetProcess ()
 
lldb::SBThread GetThread ()
 
lldb::SBFrame GetFrame ()
 
lldb::SBValue Dereference ()
 
bool TypeIsPointerType ()
 
lldb::SBType GetType ()
 
lldb::SBValue Persist ()
 
bool GetDescription (lldb::SBStream &description)
 
bool GetExpressionPath (lldb::SBStream &description)
 
bool GetExpressionPath (lldb::SBStream &description, bool qualify_cxx_base_classes)
 
lldb::SBValue EvaluateExpression (const char *expr) const
 
lldb::SBValue EvaluateExpression (const char *expr, const SBExpressionOptions &options) const
 
lldb::SBValue EvaluateExpression (const char *expr, const SBExpressionOptions &options, const char *name) const
 
 SBValue (const lldb::ValueObjectSP &value_sp)
 
lldb::SBWatchpoint Watch (bool resolve_location, bool read, bool write, SBError &error)
 Watch this value if it resides in memory. More...
 
lldb::SBWatchpoint Watch (bool resolve_location, bool read, bool write)
 
lldb::SBWatchpoint WatchPointee (bool resolve_location, bool read, bool write, SBError &error)
 Watch this value that this value points to in memory. More...
 
lldb::ValueObjectSP GetSP () const
 Same as the protected version of GetSP that takes a locker, except that we make the locker locally in the function. More...
 

Protected Member Functions

lldb::ValueObjectSP GetSP (ValueLocker &value_locker) const
 Get the appropriate ValueObjectSP from this SBValue, consulting the use_dynamic and use_synthetic options passed in to SetSP when the SBValue's contents were set. More...
 
void SetSP (const lldb::ValueObjectSP &sp)
 
void SetSP (const lldb::ValueObjectSP &sp, bool use_synthetic)
 
void SetSP (const lldb::ValueObjectSP &sp, lldb::DynamicValueType use_dynamic)
 
void SetSP (const lldb::ValueObjectSP &sp, lldb::DynamicValueType use_dynamic, bool use_synthetic)
 
void SetSP (const lldb::ValueObjectSP &sp, lldb::DynamicValueType use_dynamic, bool use_synthetic, const char *name)
 

Friends

class SBBlock
 
class SBFrame
 
class SBTarget
 
class SBThread
 
class SBValueList
 

Detailed Description

Definition at line 21 of file SBValue.h.

Constructor & Destructor Documentation

◆ SBValue() [1/3]

SBValue::SBValue ( )

Definition at line 218 of file SBValue.cpp.

References LLDB_RECORD_CONSTRUCTOR_NO_ARGS.

Referenced by EvaluateExpression().

◆ SBValue() [2/3]

SBValue::SBValue ( const lldb::SBValue rhs)

Definition at line 226 of file SBValue.cpp.

References LLDB_RECORD_CONSTRUCTOR, and SetSP().

◆ ~SBValue()

SBValue::~SBValue ( )

Definition at line 242 of file SBValue.cpp.

◆ SBValue() [3/3]

SBValue::SBValue ( const lldb::ValueObjectSP &  value_sp)

Definition at line 220 of file SBValue.cpp.

References LLDB_RECORD_CONSTRUCTOR, and SetSP().

Member Function Documentation

◆ AddressOf()

lldb::SBValue SBValue::AddressOf ( )

◆ Cast()

lldb::SBValue SBValue::Cast ( lldb::SBType  type)

◆ Clear()

void SBValue::Clear ( )

Definition at line 258 of file SBValue.cpp.

References LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ CreateChildAtOffset()

lldb::SBValue SBValue::CreateChildAtOffset ( const char *  name,
uint32_t  offset,
lldb::SBType  type 
)

◆ CreateValueFromAddress()

lldb::SBValue SBValue::CreateValueFromAddress ( const char *  name,
lldb::addr_t  address,
lldb::SBType  type 
)

◆ CreateValueFromData()

lldb::SBValue SBValue::CreateValueFromData ( const char *  name,
lldb::SBData  data,
lldb::SBType  type 
)

◆ CreateValueFromExpression() [1/2]

lldb::SBValue SBValue::CreateValueFromExpression ( const char *  name,
const char *  expression 
)

◆ CreateValueFromExpression() [2/2]

lldb::SBValue SBValue::CreateValueFromExpression ( const char *  name,
const char *  expression,
SBExpressionOptions options 
)

◆ Dereference()

SBValue SBValue::Dereference ( )

◆ EvaluateExpression() [1/3]

lldb::SBValue SBValue::EvaluateExpression ( const char *  expr) const

◆ EvaluateExpression() [2/3]

lldb::SBValue SBValue::EvaluateExpression ( const char *  expr,
const SBExpressionOptions options 
) const

Definition at line 1218 of file SBValue.cpp.

References EvaluateExpression(), LLDB_RECORD_METHOD_CONST, and LLDB_RECORD_RESULT.

◆ EvaluateExpression() [3/3]

lldb::SBValue SBValue::EvaluateExpression ( const char *  expr,
const SBExpressionOptions options,
const char *  name 
) const

◆ GetAddress()

lldb::SBAddress SBValue::GetAddress ( )

◆ GetByteSize()

size_t SBValue::GetByteSize ( )

Definition at line 328 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >(), and Watch().

◆ GetChildAtIndex() [1/2]

SBValue SBValue::GetChildAtIndex ( uint32_t  idx)

◆ GetChildAtIndex() [2/2]

SBValue SBValue::GetChildAtIndex ( uint32_t  idx,
lldb::DynamicValueType  use_dynamic,
bool  can_create_synthetic 
)

Get a child value by index from a value.

Structs, unions, classes, arrays and pointers have child values that can be access by index.

Structs and unions access child members using a zero based index for each child member. For

Classes reserve the first indexes for base classes that have members (empty base classes are omitted), and all members of the current class will then follow the base classes.

Pointers differ depending on what they point to. If the pointer points to a simple type, the child at index zero is the only child value available, unless synthetic_allowed is true, in which case the pointer will be used as an array and can create 'synthetic' child values using positive or negative indexes. If the pointer points to an aggregate type (an array, class, union, struct), then the pointee is transparently skipped and any children are going to be the indexes of the child values within the aggregate type. For example if we have a 'Point' type and we have a SBValue that contains a pointer to a 'Point' type, then the child at index zero will be the 'x' member, and the child at index 1 will be the 'y' member (the child at index zero won't be a 'Point' instance).

If you actually need an SBValue that represents the type pointed to by a SBValue for which GetType().IsPointeeType() returns true, regardless of the pointee type, you can do that with SBValue::Dereference.

Arrays have a preset number of children that can be accessed by index and will returns invalid child values for indexes that are out of bounds unless the synthetic_allowed is true. In this case the array can create 'synthetic' child values for indexes that aren't in the array bounds using positive or negative indexes.

Parameters
[in]idxThe index of the child value to get
[in]use_dynamicAn enumeration that specifies whether to get dynamic values, and also if the target can be run to figure out the dynamic type of the child value.
[in]can_create_syntheticIf true, then allow child values to be created by index for pointers and arrays for indexes that normally wouldn't be allowed.
Returns
A new SBValue object that represents the child member value.

Definition at line 707 of file SBValue.cpp.

References GetChildAtIndex(), GetPreferSyntheticValue(), GetSP(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and SetSP().

◆ GetChildMemberWithName() [1/2]

SBValue SBValue::GetChildMemberWithName ( const char *  name)

◆ GetChildMemberWithName() [2/2]

SBValue SBValue::GetChildMemberWithName ( const char *  name,
lldb::DynamicValueType  use_dynamic 
)

◆ GetData()

lldb::SBData SBValue::GetData ( )

Get an SBData wrapping the contents of this SBValue.

This method will read the contents of this object in memory and copy them into an SBData for future use.

Returns
An SBData with the contents of this SBValue, on success. An empty SBData otherwise.

Definition at line 1401 of file SBValue.cpp.

References GetSP(), LLDB_RECORD_METHOD_NO_ARGS, LLDB_RECORD_RESULT, and lldb_private::Status::Success().

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ GetDeclaration()

lldb::SBDeclaration SBValue::GetDeclaration ( )

◆ GetDescription()

bool SBValue::GetDescription ( lldb::SBStream description)

◆ GetDisplayTypeName()

const char * SBValue::GetDisplayTypeName ( )

Definition at line 315 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ GetDynamicValue()

lldb::SBValue SBValue::GetDynamicValue ( lldb::DynamicValueType  use_dynamic)

◆ GetError()

SBError SBValue::GetError ( )

◆ GetExpressionPath() [1/2]

bool SBValue::GetExpressionPath ( lldb::SBStream description)

◆ GetExpressionPath() [2/2]

bool SBValue::GetExpressionPath ( lldb::SBStream description,
bool  qualify_cxx_base_classes 
)

Definition at line 1182 of file SBValue.cpp.

References GetExpressionPath(), GetSP(), LLDB_RECORD_METHOD, and lldb::SBStream::ref().

◆ GetFormat()

lldb::Format SBValue::GetFormat ( )

◆ GetFrame()

lldb::SBFrame SBValue::GetFrame ( )

◆ GetID()

user_id_t SBValue::GetID ( )

◆ GetIndexOfChildWithName()

uint32_t SBValue::GetIndexOfChildWithName ( const char *  name)

Definition at line 732 of file SBValue.cpp.

References GetSP(), LLDB_RECORD_METHOD, and UINT32_MAX.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ GetLoadAddress()

lldb::addr_t SBValue::GetLoadAddress ( )

◆ GetLocation()

const char * SBValue::GetLocation ( )

Definition at line 472 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ GetName()

const char * SBValue::GetName ( )

Definition at line 290 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ GetNonSyntheticValue()

lldb::SBValue SBValue::GetNonSyntheticValue ( )

◆ GetNumChildren() [1/2]

uint32_t SBValue::GetNumChildren ( )

◆ GetNumChildren() [2/2]

uint32_t SBValue::GetNumChildren ( uint32_t  max)

Definition at line 1004 of file SBValue.cpp.

References GetNumChildren(), GetSP(), and LLDB_RECORD_METHOD.

◆ GetObjectDescription()

const char * SBValue::GetObjectDescription ( )

Definition at line 381 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ GetOpaqueType()

void * SBValue::GetOpaqueType ( )

Definition at line 1038 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ GetPointeeData()

lldb::SBData SBValue::GetPointeeData ( uint32_t  item_idx = 0,
uint32_t  item_count = 1 
)

Get an SBData wrapping what this SBValue points to.

This method will dereference the current SBValue, if its data type is a T* or T[], and extract item_count elements of type T from it, copying their contents in an SBData.

Parameters
[in]item_idxThe index of the first item to retrieve. For an array this is equivalent to array[item_idx], for a pointer to *(pointer + item_idx). In either case, the measurement unit for item_idx is the sizeof(T) rather than the byte
[in]item_countHow many items should be copied into the output. By default only one item is copied, but more can be asked for.
Returns
An SBData with the contents of the copied items, on success. An empty SBData otherwise.

Definition at line 1381 of file SBValue.cpp.

References GetSP(), LLDB_RECORD_METHOD, and LLDB_RECORD_RESULT.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ GetPreferDynamicValue()

lldb::DynamicValueType SBValue::GetPreferDynamicValue ( )

◆ GetPreferSyntheticValue()

bool SBValue::GetPreferSyntheticValue ( )

◆ GetProcess()

lldb::SBProcess SBValue::GetProcess ( )

◆ GetSP() [1/2]

lldb::ValueObjectSP SBValue::GetSP ( ) const

Same as the protected version of GetSP that takes a locker, except that we make the locker locally in the function.

Since the Target API mutex is recursive, and the StopLocker is a read lock, you can call this function even if you are already holding the two above-mentioned locks.

Returns
A ValueObjectSP of the best kind (static, dynamic or synthetic) we can cons up, in accordance with the SBValue's settings.

Definition at line 1108 of file SBValue.cpp.

References LLDB_RECORD_METHOD_CONST_NO_ARGS, LLDB_RECORD_RESULT, and SetSP().

Referenced by AddressOf(), Cast(), CreateChildAtOffset(), CreateValueFromAddress(), CreateValueFromData(), CreateValueFromExpression(), Dereference(), lldb::SBTypeSummary::DoesPrintValue(), EvaluateExpression(), GetAddress(), GetByteSize(), GetChildAtIndex(), GetChildMemberWithName(), GetData(), GetDeclaration(), GetDescription(), GetDisplayTypeName(), GetError(), GetExpressionPath(), GetFormat(), GetID(), GetIndexOfChildWithName(), GetLoadAddress(), GetLocation(), GetName(), GetNumChildren(), GetObjectDescription(), GetOpaqueType(), GetPointeeData(), GetSummary(), GetType(), GetTypeFilter(), GetTypeFormat(), GetTypeName(), GetTypeSummary(), GetTypeSynthetic(), GetTypeValidatorResult(), GetValue(), GetValueAsSigned(), GetValueAsUnsigned(), GetValueDidChange(), GetValueForExpressionPath(), GetValueType(), IsDynamic(), IsInScope(), IsRuntimeSupportValue(), IsSynthetic(), IsSyntheticChildrenGenerated(), MightHaveChildren(), Persist(), lldb_private::repro::RegisterMethods< SBValue >(), lldb::SBThread::ReturnFromFrame(), SetData(), SetFormat(), SetSyntheticChildrenGenerated(), SetValueFromCString(), and Watch().

◆ GetSP() [2/2]

lldb::ValueObjectSP SBValue::GetSP ( ValueLocker value_locker) const
protected

Get the appropriate ValueObjectSP from this SBValue, consulting the use_dynamic and use_synthetic options passed in to SetSP when the SBValue's contents were set.

Since this often requires examining memory, and maybe even running code, it needs to acquire the Target API and Process StopLock. Those are held in an opaque class ValueLocker which is currently local to SBValue.cpp. So you don't have to get these yourself just default construct a ValueLocker, and pass it into this. If we need to make a ValueLocker and use it in some other .cpp file, we'll have to move it to ValueObject.h/cpp or somewhere else convenient. We haven't needed to so far.

Parameters
[in]value_lockerAn object that will hold the Target API, and Process RunLocks, and auto-destroy them when it goes out of scope. Currently this is only useful in SBValue.cpp.
Returns
A ValueObjectSP of the best kind (static, dynamic or synthetic) we can cons up, in accordance with the SBValue's settings.

Definition at line 1100 of file SBValue.cpp.

References ValueLocker::GetError(), ValueLocker::GetLockedSP(), and lldb_private::Status::SetErrorString().

◆ GetStaticValue()

lldb::SBValue SBValue::GetStaticValue ( )

◆ GetSummary() [1/2]

const char * SBValue::GetSummary ( )

◆ GetSummary() [2/2]

const char * SBValue::GetSummary ( lldb::SBStream stream,
lldb::SBTypeSummaryOptions options 
)

◆ GetTarget()

lldb::SBTarget SBValue::GetTarget ( )

◆ GetThread()

lldb::SBThread SBValue::GetThread ( )

◆ GetType()

SBType SBValue::GetType ( )

◆ GetTypeFilter()

lldb::SBTypeFilter SBValue::GetTypeFilter ( )

◆ GetTypeFormat()

lldb::SBTypeFormat SBValue::GetTypeFormat ( )

◆ GetTypeName()

const char * SBValue::GetTypeName ( )

Definition at line 302 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ GetTypeSummary()

lldb::SBTypeSummary SBValue::GetTypeSummary ( )

◆ GetTypeSynthetic()

lldb::SBTypeSynthetic SBValue::GetTypeSynthetic ( )

◆ GetTypeValidatorResult()

const char * SBValue::GetTypeValidatorResult ( )

Definition at line 394 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ GetValue()

const char * SBValue::GetValue ( )

◆ GetValueAsSigned() [1/2]

int64_t SBValue::GetValueAsSigned ( lldb::SBError error,
int64_t  fail_value = 0 
)

◆ GetValueAsSigned() [2/2]

int64_t SBValue::GetValueAsSigned ( int64_t  fail_value = 0)

Definition at line 951 of file SBValue.cpp.

References GetSP(), GetValueAsSigned(), and LLDB_RECORD_METHOD.

◆ GetValueAsUnsigned() [1/2]

uint64_t SBValue::GetValueAsUnsigned ( lldb::SBError error,
uint64_t  fail_value = 0 
)

◆ GetValueAsUnsigned() [2/2]

uint64_t SBValue::GetValueAsUnsigned ( uint64_t  fail_value = 0)

Definition at line 962 of file SBValue.cpp.

References GetSP(), GetValueAsUnsigned(), and LLDB_RECORD_METHOD.

◆ GetValueDidChange()

bool SBValue::GetValueDidChange ( )

Definition at line 428 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ GetValueForExpressionPath()

lldb::SBValue SBValue::GetValueForExpressionPath ( const char *  expr_path)

◆ GetValueType()

ValueType SBValue::GetValueType ( )

◆ IsDynamic()

bool SBValue::IsDynamic ( )

Definition at line 852 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ IsInScope()

bool SBValue::IsInScope ( )

◆ IsRuntimeSupportValue()

bool SBValue::IsRuntimeSupportValue ( )

Definition at line 986 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ IsSynthetic()

bool SBValue::IsSynthetic ( )

Definition at line 862 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ IsSyntheticChildrenGenerated()

bool SBValue::IsSyntheticChildrenGenerated ( )

Definition at line 872 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ IsValid()

bool SBValue::IsValid ( )

◆ MightHaveChildren()

bool SBValue::MightHaveChildren ( )

Find out if a SBValue might have children.

This call is much more efficient than GetNumChildren() 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 SBValue might have children, or false otherwise.

Definition at line 974 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ operator bool()

SBValue::operator bool ( ) const
explicit

Definition at line 248 of file SBValue.cpp.

References LLDB_RECORD_METHOD_CONST_NO_ARGS.

◆ operator=()

SBValue & SBValue::operator= ( const lldb::SBValue rhs)

Definition at line 232 of file SBValue.cpp.

References LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and SetSP().

◆ Persist()

lldb::SBValue SBValue::Persist ( )

◆ SetData()

bool SBValue::SetData ( lldb::SBData data,
lldb::SBError error 
)

◆ SetFormat()

void SBValue::SetFormat ( lldb::Format  format)

Definition at line 1298 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ SetPreferDynamicValue()

void SBValue::SetPreferDynamicValue ( lldb::DynamicValueType  use_dynamic)

Definition at line 828 of file SBValue.cpp.

References IsValid(), and LLDB_RECORD_METHOD.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ SetPreferSyntheticValue()

void SBValue::SetPreferSyntheticValue ( bool  use_synthetic)

Definition at line 844 of file SBValue.cpp.

References IsValid(), and LLDB_RECORD_METHOD.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ SetSP() [1/5]

void SBValue::SetSP ( const lldb::ValueObjectSP &  sp)
protected

◆ SetSP() [2/5]

void SBValue::SetSP ( const lldb::ValueObjectSP &  sp,
bool  use_synthetic 
)
protected

Definition at line 1145 of file SBValue.cpp.

References lldb::eNoDynamicValues, and SetSP().

◆ SetSP() [3/5]

void SBValue::SetSP ( const lldb::ValueObjectSP &  sp,
lldb::DynamicValueType  use_dynamic 
)
protected

Definition at line 1131 of file SBValue.cpp.

References SetSP().

◆ SetSP() [4/5]

void SBValue::SetSP ( const lldb::ValueObjectSP &  sp,
lldb::DynamicValueType  use_dynamic,
bool  use_synthetic 
)
protected

Definition at line 1157 of file SBValue.cpp.

◆ SetSP() [5/5]

void SBValue::SetSP ( const lldb::ValueObjectSP &  sp,
lldb::DynamicValueType  use_dynamic,
bool  use_synthetic,
const char *  name 
)
protected

Definition at line 1162 of file SBValue.cpp.

◆ SetSyntheticChildrenGenerated()

void SBValue::SetSyntheticChildrenGenerated ( bool  is)

Definition at line 882 of file SBValue.cpp.

References GetSP(), and LLDB_RECORD_METHOD.

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

◆ SetValueFromCString() [1/2]

bool SBValue::SetValueFromCString ( const char *  value_str)

◆ SetValueFromCString() [2/2]

bool SBValue::SetValueFromCString ( const char *  value_str,
lldb::SBError error 
)

◆ TypeIsPointerType()

bool SBValue::TypeIsPointerType ( )

◆ Watch() [1/2]

lldb::SBWatchpoint SBValue::Watch ( bool  resolve_location,
bool  read,
bool  write,
SBError error 
)

Watch this value if it resides in memory.

Sets a watchpoint on the value.

Parameters
[in]resolve_locationResolve the location of this value once and watch its address. This value must currently be set to true as watching all locations of a variable or a variable path is not yet supported, though we plan to support it in the future.
[in]readStop when this value is accessed.
[in]writeStop when this value is modified
[out]errorAn error object. Contains the reason if there is some failure.
Returns
An SBWatchpoint object. This object might not be valid upon return due to a value not being contained in memory, too large, or watchpoint resources are not available or all in use.

Definition at line 1467 of file SBValue.cpp.

References lldb_private::Status::AsCString(), lldb_private::Declaration::DumpStopContext(), GetByteSize(), ValueLocker::GetError(), lldb_private::Declaration::GetFile(), GetLoadAddress(), GetSP(), lldb_private::StreamString::GetString(), GetTarget(), IsInScope(), LLDB_INVALID_ADDRESS, LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, LLDB_WATCH_TYPE_READ, LLDB_WATCH_TYPE_WRITE, lldb::SBError::SetError(), lldb::SBError::SetErrorString(), lldb::SBError::SetErrorStringWithFormat(), and lldb::SBWatchpoint::SetSP().

Referenced by lldb_private::repro::RegisterMethods< SBValue >(), Watch(), and WatchPointee().

◆ Watch() [2/2]

lldb::SBWatchpoint SBValue::Watch ( bool  resolve_location,
bool  read,
bool  write 
)

Definition at line 1532 of file SBValue.cpp.

References LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and Watch().

◆ WatchPointee()

lldb::SBWatchpoint SBValue::WatchPointee ( bool  resolve_location,
bool  read,
bool  write,
SBError error 
)

Watch this value that this value points to in memory.

Sets a watchpoint on the value.

Parameters
[in]resolve_locationResolve the location of this value once and watch its address. This value must currently be set to true as watching all locations of a variable or a variable path is not yet supported, though we plan to support it in the future.
[in]readStop when this value is accessed.
[in]writeStop when this value is modified
[out]errorAn error object. Contains the reason if there is some failure.
Returns
An SBWatchpoint object. This object might not be valid upon return due to a value not being contained in memory, too large, or watchpoint resources are not available or all in use.

Definition at line 1541 of file SBValue.cpp.

References Dereference(), GetType(), IsInScope(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and Watch().

Referenced by lldb_private::repro::RegisterMethods< SBValue >().

Friends And Related Function Documentation

◆ SBBlock

friend class SBBlock
friend

Definition at line 381 of file SBValue.h.

◆ SBFrame

friend class SBFrame
friend

Definition at line 382 of file SBValue.h.

◆ SBTarget

friend class SBTarget
friend

Definition at line 383 of file SBValue.h.

◆ SBThread

friend class SBThread
friend

Definition at line 384 of file SBValue.h.

◆ SBValueList

friend class SBValueList
friend

Definition at line 385 of file SBValue.h.


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