LLDB API Documentation
#include <SBValue.h>
Protected Member Functions | |
lldb::ValueObjectSP | GetSP (ValueLocker &value_locker) const |
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 | ValueLocker |
class | SBBlock |
class | SBFrame |
class | SBTarget |
class | SBThread |
class | SBValueList |
lldb::SBValue::SBValue | ( | ) |
lldb::SBValue::SBValue | ( | const lldb::SBValue & | rhs | ) |
lldb::SBValue::~SBValue | ( | ) |
lldb::SBValue::SBValue | ( | const lldb::ValueObjectSP & | value_sp | ) |
lldb::SBValue lldb::SBValue::AddressOf | ( | ) |
lldb::SBValue lldb::SBValue::Cast | ( | lldb::SBType | type | ) |
void lldb::SBValue::Clear | ( | ) |
lldb::SBValue lldb::SBValue::CreateChildAtOffset | ( | const char * | name, |
uint32_t | offset, | ||
lldb::SBType | type | ||
) |
lldb::SBValue lldb::SBValue::CreateValueFromAddress | ( | const char * | name, |
lldb::addr_t | address, | ||
lldb::SBType | type | ||
) |
lldb::SBValue lldb::SBValue::CreateValueFromData | ( | const char * | name, |
lldb::SBData | data, | ||
lldb::SBType | type | ||
) |
lldb::SBValue lldb::SBValue::CreateValueFromExpression | ( | const char * | name, |
const char * | expression | ||
) |
lldb::SBValue lldb::SBValue::CreateValueFromExpression | ( | const char * | name, |
const char * | expression, | ||
SBExpressionOptions & | options | ||
) |
lldb::SBValue lldb::SBValue::Dereference | ( | ) |
lldb::SBAddress lldb::SBValue::GetAddress | ( | ) |
size_t lldb::SBValue::GetByteSize | ( | ) |
lldb::SBValue lldb::SBValue::GetChildAtIndex | ( | uint32_t | idx | ) |
lldb::SBValue lldb::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 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).
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.
[in] | idx | The index of the child value to get |
[in] | use_dynamic | An enumeration that specifies wether to get dynamic values, and also if the target can be run to figure out the dynamic type of the child value. |
[in] | synthetic_allowed | If true, then allow child values to be created by index for pointers and arrays for indexes that normally wouldn't be allowed. |
lldb::SBValue lldb::SBValue::GetChildMemberWithName | ( | const char * | name | ) |
lldb::SBValue lldb::SBValue::GetChildMemberWithName | ( | const char * | name, |
lldb::DynamicValueType | use_dynamic | ||
) |
lldb::SBData lldb::SBValue::GetData | ( | ) |
lldb::SBDeclaration lldb::SBValue::GetDeclaration | ( | ) |
bool lldb::SBValue::GetDescription | ( | lldb::SBStream & | description | ) |
lldb::SBValue lldb::SBValue::GetDynamicValue | ( | lldb::DynamicValueType | use_dynamic | ) |
SBError lldb::SBValue::GetError | ( | ) |
bool lldb::SBValue::GetExpressionPath | ( | lldb::SBStream & | description | ) |
bool lldb::SBValue::GetExpressionPath | ( | lldb::SBStream & | description, |
bool | qualify_cxx_base_classes | ||
) |
lldb::Format lldb::SBValue::GetFormat | ( | ) |
lldb::SBFrame lldb::SBValue::GetFrame | ( | ) |
lldb::user_id_t lldb::SBValue::GetID | ( | ) |
uint32_t lldb::SBValue::GetIndexOfChildWithName | ( | const char * | name | ) |
lldb::addr_t lldb::SBValue::GetLoadAddress | ( | ) |
const char* lldb::SBValue::GetLocation | ( | ) |
const char* lldb::SBValue::GetName | ( | ) |
lldb::SBValue lldb::SBValue::GetNonSyntheticValue | ( | ) |
uint32_t lldb::SBValue::GetNumChildren | ( | ) |
const char* lldb::SBValue::GetObjectDescription | ( | ) |
void* lldb::SBValue::GetOpaqueType | ( | ) |
lldb::SBData lldb::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.
[in] | item_idx | The 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_count | How many items should be copied into the output. By default only one item is copied, but more can be asked for. |
lldb::DynamicValueType lldb::SBValue::GetPreferDynamicValue | ( | ) |
bool lldb::SBValue::GetPreferSyntheticValue | ( | ) |
lldb::SBProcess lldb::SBValue::GetProcess | ( | ) |
lldb::ValueObjectSP lldb::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.
|
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.
[in] | value_locker | An 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. |
lldb::SBValue lldb::SBValue::GetStaticValue | ( | ) |
const char* lldb::SBValue::GetSummary | ( | ) |
lldb::SBTarget lldb::SBValue::GetTarget | ( | ) |
lldb::SBThread lldb::SBValue::GetThread | ( | ) |
lldb::SBType lldb::SBValue::GetType | ( | ) |
lldb::SBTypeFilter lldb::SBValue::GetTypeFilter | ( | ) |
lldb::SBTypeFormat lldb::SBValue::GetTypeFormat | ( | ) |
const char* lldb::SBValue::GetTypeName | ( | ) |
lldb::SBTypeSummary lldb::SBValue::GetTypeSummary | ( | ) |
lldb::SBTypeSynthetic lldb::SBValue::GetTypeSynthetic | ( | ) |
const char* lldb::SBValue::GetValue | ( | ) |
int64_t lldb::SBValue::GetValueAsSigned | ( | lldb::SBError & | error, |
int64_t | fail_value = 0 |
||
) |
int64_t lldb::SBValue::GetValueAsSigned | ( | int64_t | fail_value = 0 | ) |
uint64_t lldb::SBValue::GetValueAsUnsigned | ( | lldb::SBError & | error, |
uint64_t | fail_value = 0 |
||
) |
uint64_t lldb::SBValue::GetValueAsUnsigned | ( | uint64_t | fail_value = 0 | ) |
bool lldb::SBValue::GetValueDidChange | ( | ) |
lldb::SBValue lldb::SBValue::GetValueForExpressionPath | ( | const char * | expr_path | ) |
ValueType lldb::SBValue::GetValueType | ( | ) |
bool lldb::SBValue::IsDynamic | ( | ) |
bool lldb::SBValue::IsInScope | ( | ) |
bool lldb::SBValue::IsSynthetic | ( | ) |
bool lldb::SBValue::IsValid | ( | ) |
bool lldb::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.
lldb::SBValue& lldb::SBValue::operator= | ( | const lldb::SBValue & | rhs | ) |
bool lldb::SBValue::SetData | ( | lldb::SBData & | data, |
lldb::SBError & | error | ||
) |
void lldb::SBValue::SetFormat | ( | lldb::Format | format | ) |
void lldb::SBValue::SetPreferDynamicValue | ( | lldb::DynamicValueType | use_dynamic | ) |
void lldb::SBValue::SetPreferSyntheticValue | ( | bool | use_synthetic | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
bool lldb::SBValue::SetValueFromCString | ( | const char * | value_str | ) |
bool lldb::SBValue::SetValueFromCString | ( | const char * | value_str, |
lldb::SBError & | error | ||
) |
bool lldb::SBValue::TypeIsPointerType | ( | ) |
lldb::SBWatchpoint lldb::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.
[in] | resolve_location | Resolve 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] | read | Stop when this value is accessed. |
[in] | write | Stop when this value is modified |
[out] | An | error object. Contains the reason if there is some failure. |
lldb::SBWatchpoint lldb::SBValue::Watch | ( | bool | resolve_location, |
bool | read, | ||
bool | write | ||
) |
lldb::SBWatchpoint lldb::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.
[in] | resolve_location | Resolve 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] | read | Stop when this value is accessed. |
[in] | write | Stop when this value is modified |
[out] | An | error object. Contains the reason if there is some failure. |
|
friend |