LLDB mainline
|
#include <SBStructuredData.h>
Public Member Functions | |
SBStructuredData () | |
SBStructuredData (const lldb::SBStructuredData &rhs) | |
SBStructuredData (const lldb::SBScriptObject obj, const lldb::SBDebugger &debugger) | |
~SBStructuredData () | |
lldb::SBStructuredData & | operator= (const lldb::SBStructuredData &rhs) |
operator bool () const | |
bool | IsValid () const |
lldb::SBError | SetFromJSON (lldb::SBStream &stream) |
lldb::SBError | SetFromJSON (const char *json) |
void | Clear () |
lldb::SBError | GetAsJSON (lldb::SBStream &stream) const |
lldb::SBError | GetDescription (lldb::SBStream &stream) const |
lldb::StructuredDataType | GetType () const |
Return the type of data in this data structure. | |
size_t | GetSize () const |
Return the size (i.e. | |
bool | GetKeys (lldb::SBStringList &keys) const |
Fill keys with the keys in this object and return true if this data structure is a dictionary. | |
lldb::SBStructuredData | GetValueForKey (const char *key) const |
Return the value corresponding to a key if this data structure is a dictionary type. | |
lldb::SBStructuredData | GetItemAtIndex (size_t idx) const |
Return the value corresponding to an index if this data structure is array. | |
uint64_t | GetUnsignedIntegerValue (uint64_t fail_value=0) const |
Return the integer value if this data structure is an integer type. | |
int64_t | GetSignedIntegerValue (int64_t fail_value=0) const |
Return the integer value if this data structure is an integer type. | |
LLDB_DEPRECATED_FIXME ("Specify if the value is signed or unsigned", "uint64_t GetUnsignedIntegerValue(uint64_t fail_value = 0)") uint64_t GetIntegerValue(uint64_t fail_value=0) const | |
double | GetFloatValue (double fail_value=0.0) const |
Return the floating point value if this data structure is a floating type. | |
bool | GetBooleanValue (bool fail_value=false) const |
Return the boolean value if this data structure is a boolean type. | |
size_t | GetStringValue (char *dst, size_t dst_len) const |
Provides the string value if this data structure is a string type. | |
lldb::SBScriptObject | GetGenericValue () const |
Return the generic pointer if this data structure is a generic type. | |
void | SetValueForKey (const char *key, SBStructuredData &value) |
Set the value corresponding to a key. | |
void | SetUnsignedIntegerValue (uint64_t value) |
Change the type to unsigned interger and overwrite the previous data with the new value. | |
void | SetSignedIntegerValue (int64_t value) |
Change the type to signed interger and overwrite the previous data with the new value. | |
void | SetFloatValue (double value) |
Change the type to float and overwrite the previous data with the new value. | |
void | SetBooleanValue (bool value) |
Change the type to boolean and overwrite the previous data with the new value. | |
void | SetStringValue (const char *value) |
Change the type to string and overwrite the previous data with the new value. | |
void | SetGenericValue (SBScriptObject value) |
Change the type to generic and overwrite the previous data with the new value. |
Protected Member Functions | |
SBStructuredData (const lldb_private::StructuredDataImpl &impl) | |
SBStructuredData (const lldb::EventSP &event_sp) |
Protected Attributes | |
StructuredDataImplUP | m_impl_up |
Friends | |
class | SBAttachInfo |
class | SBCommandReturnObject |
class | SBLaunchInfo |
class | SBDebugger |
class | SBFrame |
class | SBError |
class | SBTarget |
class | SBProcess |
class | SBThread |
class | SBThreadPlan |
class | SBBreakpoint |
class | SBBreakpointLocation |
class | SBBreakpointName |
class | SBTrace |
class | lldb_private::python::SWIGBridge |
class | lldb_private::lua::SWIGBridge |
class | SBCommandInterpreter |
Definition at line 28 of file SBStructuredData.h.
SBStructuredData::SBStructuredData | ( | ) |
Definition at line 32 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
Referenced by GetItemAtIndex(), GetValueForKey(), LLDB_DEPRECATED_FIXME(), operator=(), SBCommandInterpreter, and SetValueForKey().
SBStructuredData::SBStructuredData | ( | const lldb::SBStructuredData & | rhs | ) |
Definition at line 36 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
SBStructuredData::SBStructuredData | ( | const lldb::SBScriptObject | obj, |
const lldb::SBDebugger & | debugger ) |
Definition at line 41 of file SBStructuredData.cpp.
References lldb_private::ScriptInterpreter::CreateStructuredDataFromScriptObject(), lldb::SBScriptObject::GetLanguage(), lldb::SBScriptObject::IsValid(), LLDB_INSTRUMENT_VA, m_impl_up, lldb::SBDebugger::m_opaque_sp, and lldb::SBScriptObject::ref().
|
default |
|
protected |
Definition at line 65 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
|
protected |
Definition at line 60 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
void SBStructuredData::Clear | ( | ) |
Definition at line 117 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
SBError SBStructuredData::GetAsJSON | ( | lldb::SBStream & | stream | ) | const |
Definition at line 123 of file SBStructuredData.cpp.
References error(), LLDB_INSTRUMENT_VA, m_impl_up, lldb::SBStream::ref(), and SBError.
Return the boolean value if this data structure is a boolean type.
Definition at line 218 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
Referenced by LLDB_DEPRECATED_FIXME().
lldb::SBError SBStructuredData::GetDescription | ( | lldb::SBStream & | stream | ) | const |
Definition at line 131 of file SBStructuredData.cpp.
References error(), LLDB_INSTRUMENT_VA, m_impl_up, lldb::SBStream::ref(), SBError, and lldb::SBError::SetError().
double SBStructuredData::GetFloatValue | ( | double | fail_value = 0.0 | ) | const |
Return the floating point value if this data structure is a floating type.
Definition at line 212 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
Referenced by LLDB_DEPRECATED_FIXME().
lldb::SBScriptObject SBStructuredData::GetGenericValue | ( | ) | const |
Return the generic pointer if this data structure is a generic type.
Definition at line 230 of file SBStructuredData.cpp.
References lldb::eScriptLanguageDefault, LLDB_INSTRUMENT_VA, and m_impl_up.
Referenced by LLDB_DEPRECATED_FIXME().
lldb::SBStructuredData SBStructuredData::GetItemAtIndex | ( | size_t | idx | ) | const |
Return the value corresponding to an index if this data structure is array.
Definition at line 186 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, m_impl_up, and SBStructuredData().
bool SBStructuredData::GetKeys | ( | lldb::SBStringList & | keys | ) | const |
Fill keys with the keys in this object and return true if this data structure is a dictionary.
Returns false otherwise.
Definition at line 152 of file SBStructuredData.cpp.
References lldb_private::StringList::AppendString(), lldb::eStructuredDataTypeDictionary, lldb_private::StructuredData::Array::ForEach(), lldb_private::StructuredData::Object::GetAsArray(), lldb_private::StructuredData::Object::GetAsDictionary(), lldb_private::StructuredData::Dictionary::GetKeys(), GetType(), LLDB_INSTRUMENT_VA, and m_impl_up.
int64_t SBStructuredData::GetSignedIntegerValue | ( | int64_t | fail_value = 0 | ) | const |
Return the integer value if this data structure is an integer type.
Definition at line 206 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
size_t SBStructuredData::GetSize | ( | ) | const |
Return the size (i.e.
number of elements) in this data structure if it is an array or dictionary type. For other types, 0 will be
Definition at line 146 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
size_t SBStructuredData::GetStringValue | ( | char * | dst, |
size_t | dst_len ) const |
Provides the string value if this data structure is a string type.
[out] | dst | pointer where the string value will be written. In case it is null, nothing will be written at dst. |
[in] | dst_len | max number of characters that can be written at dst. In case it is zero, nothing will be written at dst. If this length is not enough to write the complete string value, (dst_len - 1) bytes of the string value will be written at dst followed by a null character. |
Definition at line 224 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
Referenced by LLDB_DEPRECATED_FIXME().
StructuredDataType SBStructuredData::GetType | ( | ) | const |
Return the type of data in this data structure.
Definition at line 140 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
Referenced by GetKeys().
uint64_t SBStructuredData::GetUnsignedIntegerValue | ( | uint64_t | fail_value = 0 | ) | const |
Return the integer value if this data structure is an integer type.
Definition at line 200 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
lldb::SBStructuredData SBStructuredData::GetValueForKey | ( | const char * | key | ) | const |
Return the value corresponding to a key if this data structure is a dictionary type.
Definition at line 178 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, m_impl_up, and SBStructuredData().
bool SBStructuredData::IsValid | ( | ) | const |
Definition at line 106 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA.
Referenced by lldb::SBAttachInfo::SetScriptedProcessDictionary(), and lldb::SBLaunchInfo::SetScriptedProcessDictionary().
|
pure virtual |
|
explicit |
Definition at line 111 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
SBStructuredData & SBStructuredData::operator= | ( | const lldb::SBStructuredData & | rhs | ) |
Definition at line 72 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, m_impl_up, and SBStructuredData().
void SBStructuredData::SetBooleanValue | ( | bool | value | ) |
Change the type to boolean and overwrite the previous data with the new value.
Definition at line 262 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
Referenced by LLDB_DEPRECATED_FIXME().
void SBStructuredData::SetFloatValue | ( | double | value | ) |
Change the type to float and overwrite the previous data with the new value.
Definition at line 256 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
Referenced by LLDB_DEPRECATED_FIXME().
lldb::SBError SBStructuredData::SetFromJSON | ( | const char * | json | ) |
Definition at line 99 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, lldb::SBStream::Print(), and SetFromJSON().
lldb::SBError SBStructuredData::SetFromJSON | ( | lldb::SBStream & | stream | ) |
Definition at line 80 of file SBStructuredData.cpp.
References error(), lldb::eStructuredDataTypeGeneric, lldb::eStructuredDataTypeInvalid, lldb_private::Status::FromErrorString(), lldb::SBStream::GetData(), LLDB_INSTRUMENT_VA, m_impl_up, and lldb_private::StructuredData::ParseJSON().
Referenced by SetFromJSON().
void SBStructuredData::SetGenericValue | ( | SBScriptObject | value | ) |
Change the type to generic and overwrite the previous data with the new value.
Definition at line 274 of file SBStructuredData.cpp.
References lldb::SBScriptObject::GetPointer(), LLDB_INSTRUMENT_VA, and m_impl_up.
Referenced by LLDB_DEPRECATED_FIXME().
void SBStructuredData::SetSignedIntegerValue | ( | int64_t | value | ) |
Change the type to signed interger and overwrite the previous data with the new value.
Definition at line 250 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
Referenced by LLDB_DEPRECATED_FIXME().
void SBStructuredData::SetStringValue | ( | const char * | value | ) |
Change the type to string and overwrite the previous data with the new value.
Definition at line 268 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
Referenced by LLDB_DEPRECATED_FIXME().
void SBStructuredData::SetUnsignedIntegerValue | ( | uint64_t | value | ) |
Change the type to unsigned interger and overwrite the previous data with the new value.
Definition at line 244 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
Referenced by LLDB_DEPRECATED_FIXME().
void SBStructuredData::SetValueForKey | ( | const char * | key, |
SBStructuredData & | value ) |
Set the value corresponding to a key.
If this data structure is not a dictionary type, reset the type to be dictionary and overwrite the previous data.
Definition at line 236 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, m_impl_up, and SBStructuredData().
Referenced by LLDB_DEPRECATED_FIXME().
|
friend |
Definition at line 157 of file SBStructuredData.h.
References lldb_private::python::SWIGBridge.
|
friend |
Definition at line 156 of file SBStructuredData.h.
References lldb_private::python::SWIGBridge.
Referenced by lldb_private::lua::SWIGBridge, and lldb_private::python::SWIGBridge.
|
friend |
Definition at line 142 of file SBStructuredData.h.
References SBAttachInfo.
Referenced by SBAttachInfo.
|
friend |
Definition at line 152 of file SBStructuredData.h.
References SBBreakpoint.
Referenced by SBBreakpoint.
|
friend |
Definition at line 153 of file SBStructuredData.h.
References SBBreakpointLocation.
Referenced by SBBreakpointLocation.
|
friend |
Definition at line 154 of file SBStructuredData.h.
References SBBreakpointName.
Referenced by SBBreakpointName.
|
friend |
Definition at line 158 of file SBStructuredData.h.
References SBCommandInterpreter, and SBStructuredData().
Referenced by SBCommandInterpreter.
|
friend |
Definition at line 143 of file SBStructuredData.h.
References SBCommandReturnObject.
Referenced by SBCommandReturnObject.
|
friend |
|
friend |
Definition at line 147 of file SBStructuredData.h.
References SBError.
Referenced by GetAsJSON(), GetDescription(), and SBError.
|
friend |
|
friend |
Definition at line 144 of file SBStructuredData.h.
References SBLaunchInfo.
Referenced by SBLaunchInfo.
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 151 of file SBStructuredData.h.
References SBThreadPlan.
Referenced by SBThreadPlan.
|
friend |
|
protected |
Definition at line 164 of file SBStructuredData.h.
Referenced by lldb::SBTarget::BreakpointCreateFromScript(), Clear(), lldb::SBDebugger::DispatchClientTelemetry(), GetAsJSON(), GetBooleanValue(), GetDescription(), lldb::SBCommandReturnObject::GetErrorData(), lldb::SBError::GetErrorData(), lldb::SBProcess::GetExtendedCrashInformation(), GetFloatValue(), GetGenericValue(), GetItemAtIndex(), GetKeys(), lldb::SBFrame::GetLanguageSpecificData(), lldb::SBAttachInfo::GetScriptedProcessDictionary(), lldb::SBLaunchInfo::GetScriptedProcessDictionary(), GetSignedIntegerValue(), GetSize(), lldb::SBCommandInterpreter::GetStatistics(), lldb::SBTarget::GetStatistics(), GetStringValue(), lldb::SBCommandInterpreter::GetTranscript(), GetType(), GetUnsignedIntegerValue(), GetValueForKey(), operator bool(), operator=(), lldb::SBThreadPlan::QueueThreadPlanForStepScripted(), SBStructuredData(), SBStructuredData(), SBStructuredData(), SBStructuredData(), SBStructuredData(), lldb::SBThreadPlan::SBThreadPlan(), lldb::SBBreakpoint::SerializeToStructuredData(), SetBooleanValue(), SetFloatValue(), SetFromJSON(), SetGenericValue(), lldb::SBBreakpoint::SetScriptCallbackFunction(), lldb::SBBreakpointLocation::SetScriptCallbackFunction(), lldb::SBBreakpointName::SetScriptCallbackFunction(), lldb::SBAttachInfo::SetScriptedProcessDictionary(), lldb::SBLaunchInfo::SetScriptedProcessDictionary(), SetSignedIntegerValue(), SetStringValue(), SetUnsignedIntegerValue(), SetValueForKey(), lldb::SBTrace::Start(), lldb::SBTrace::Start(), and lldb::SBThread::StepUsingScriptedThreadPlan().