LLDB mainline
|
#include <StructuredData.h>
Public Member Functions | |
Array () | |
~Array () override=default | |
bool | ForEach (std::function< bool(Object *object)> const &foreach_callback) const |
size_t | GetSize () const |
ObjectSP | operator[] (size_t idx) |
ObjectSP | GetItemAtIndex (size_t idx) const |
template<class IntType > | |
std::optional< IntType > | GetItemAtIndexAsInteger (size_t idx) const |
std::optional< llvm::StringRef > | GetItemAtIndexAsString (size_t idx) const |
std::optional< Dictionary * > | GetItemAtIndexAsDictionary (size_t idx) const |
Retrieves the element at index idx from a StructuredData::Array if it is a Dictionary. | |
void | Push (const ObjectSP &item) |
void | AddItem (const ObjectSP &item) |
template<typename T > | |
void | AddIntegerItem (T value) |
void | AddFloatItem (double value) |
void | AddStringItem (llvm::StringRef value) |
void | AddBooleanItem (bool value) |
void | Serialize (llvm::json::OStream &s) const override |
void | GetDescription (lldb_private::Stream &s) const override |
Public Member Functions inherited from lldb_private::StructuredData::Object | |
Object (lldb::StructuredDataType t=lldb::eStructuredDataTypeInvalid) | |
virtual | ~Object ()=default |
virtual bool | IsValid () const |
virtual void | Clear () |
lldb::StructuredDataType | GetType () const |
void | SetType (lldb::StructuredDataType t) |
Array * | GetAsArray () |
Dictionary * | GetAsDictionary () |
UnsignedInteger * | GetAsUnsignedInteger () |
SignedInteger * | GetAsSignedInteger () |
uint64_t | GetUnsignedIntegerValue (uint64_t fail_value=0) |
int64_t | GetSignedIntegerValue (int64_t fail_value=0) |
Float * | GetAsFloat () |
double | GetFloatValue (double fail_value=0.0) |
Boolean * | GetAsBoolean () |
bool | GetBooleanValue (bool fail_value=false) |
String * | GetAsString () |
llvm::StringRef | GetStringValue (const char *fail_value=nullptr) |
Generic * | GetAsGeneric () |
ObjectSP | GetObjectForDotSeparatedPath (llvm::StringRef path) |
void | DumpToStdout (bool pretty_print=true) const |
virtual void | Serialize (llvm::json::OStream &s) const =0 |
void | Dump (lldb_private::Stream &s, bool pretty_print=true) const |
virtual void | GetDescription (lldb_private::Stream &s) const |
Protected Types | |
typedef std::vector< ObjectSP > | collection |
Protected Attributes | |
collection | m_items |
Definition at line 193 of file StructuredData.h.
|
protected |
Definition at line 294 of file StructuredData.h.
|
inline |
Definition at line 195 of file StructuredData.h.
|
overridedefault |
|
inline |
Definition at line 285 of file StructuredData.h.
References AddItem().
|
inline |
Definition at line 279 of file StructuredData.h.
References AddItem().
|
inline |
Definition at line 269 of file StructuredData.h.
References AddItem().
Referenced by lldb_private::InstrumentationRuntimeMainThreadChecker::RetrieveReportData(), and lldb_private::InstrumentationRuntimeUBSan::RetrieveReportData().
|
inline |
Definition at line 267 of file StructuredData.h.
References m_items.
Referenced by AddBooleanItem(), AddFloatItem(), AddIntegerItem(), AddStringItem(), lldb_private::PlatformDarwin::ExtractAppSpecificInfo(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetSeparateDebugInfo(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::GetSeparateDebugInfo(), GetSeparateDebugInfoList(), lldb_private::CommandInterpreter::HandleCommand(), and lldb_private::Target::SerializeBreakpointsToFile().
|
inline |
Definition at line 281 of file StructuredData.h.
References AddItem().
|
inline |
Definition at line 200 of file StructuredData.h.
References m_items.
Referenced by lldb_private::ScriptedThread::CalculateStopInfo(), CommandObjectScriptingObjectParsed::CommandObjectScriptingObjectParsed(), CommandObjectTargetModulesDumpSeparateDebugInfoFiles::DoExecute(), DumpDwoFilesTable(), DumpOsoFilesTable(), lldb_private::StructuredDataDarwinLog::GetDescription(), SystemRuntimeMacOSX::GetExtendedBacktraceThread(), lldb::SBStructuredData::GetKeys(), lldb_private::Process::MapSupportedStructuredDataPlugins(), CommandObjectScriptingObjectParsed::CommandOptions::ParseUsageMaskFromArray(), CommandObjectScriptingObjectParsed::CommandOptions::SetOptionsFromArray(), lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo(), and lldb_private::process_gdb_remote::ProcessGDBRemote::UpdateThreadIDList().
|
overridevirtual |
Reimplemented from lldb_private::StructuredData::Object.
Definition at line 203 of file StructuredData.cpp.
References lldb_private::Stream::EOL(), lldb_private::Stream::GetIndentLevel(), lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), lldb_private::StructuredData::IsRecordType(), lldb_private::Stream::Printf(), lldb_private::Stream::PutChar(), and lldb_private::Stream::SetIndentLevel().
|
inline |
Definition at line 216 of file StructuredData.h.
References GetSize(), and m_items.
Referenced by lldb_private::Target::CreateBreakpointsFromFile(), lldb_private::PlatformDarwin::ExtractAppSpecificInfo(), lldb_private::Thread::GetDescription(), GetItemAtIndexAsDictionary(), GetItemAtIndexAsInteger(), GetItemAtIndexAsString(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetModulesInfo(), lldb_private::StructuredData::Object::GetObjectForDotSeparatedPath(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetThreadStopInfoFromJSON(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_jModulesInfo(), CommandObjectBreakpointRead::CommandOptions::HandleOptionArgumentCompletion(), lldb_private::DynamicLoaderDarwin::JSONImageInformationIntoImageInfo(), CommandObjectScriptingObjectParsed::CommandOptions::ParseUsageMaskFromArray(), CommandObjectScriptingObjectParsed::CommandOptions::SetOptionsFromArray(), and lldb_private::process_gdb_remote::ProcessGDBRemote::WillPublicStop().
|
inline |
Retrieves the element at index idx from a StructuredData::Array if it is a Dictionary.
[in] | idx | The index of the element to retrieve. |
Definition at line 257 of file StructuredData.h.
References GetItemAtIndex().
Referenced by ObjectFileMachO::GetCorefileThreadExtraInfos(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::QueryGDBServer(), and lldb_private::DynamicRegisterInfo::SetRegisterInfo().
|
inline |
Definition at line 224 of file StructuredData.h.
References GetItemAtIndex().
Referenced by lldb_private::BreakpointResolverName::CreateFromStructuredData(), lldb_private::InstrumentationRuntimeTSan::GetFirstNonInternalFramePc(), and lldb_private::DynamicRegisterInfo::SetRegisterInfo().
|
inline |
Definition at line 237 of file StructuredData.h.
References GetItemAtIndex().
Referenced by lldb_private::DynamicRegisterInfo::ByteOffsetFromComposite(), lldb_private::SearchFilterByModule::CreateFromStructuredData(), lldb_private::SearchFilterByModuleList::CreateFromStructuredData(), lldb_private::SearchFilterByModuleListAndCU::CreateFromStructuredData(), lldb_private::BreakpointResolverName::CreateFromStructuredData(), lldb_private::BreakpointOptions::CommandData::CreateFromStructuredData(), lldb_private::BreakpointResolverFileRegex::CreateFromStructuredData(), lldb_private::Breakpoint::CreateFromStructuredData(), CommandObjectBreakpointRead::CommandOptions::HandleOptionArgumentCompletion(), CommandObjectScriptingObjectParsed::CommandOptions::ProcessCompletionDict(), lldb_private::Breakpoint::SerializedBreakpointMatchesNames(), and lldb_private::DynamicRegisterInfo::SetRegisterInfo().
|
inline |
Definition at line 208 of file StructuredData.h.
References m_items.
Referenced by lldb_private::DynamicRegisterInfo::ByteOffsetFromComposite(), lldb_private::Target::CreateBreakpointsFromFile(), lldb_private::SearchFilterByModule::CreateFromStructuredData(), lldb_private::SearchFilterByModuleList::CreateFromStructuredData(), lldb_private::SearchFilterByModuleListAndCU::CreateFromStructuredData(), lldb_private::BreakpointResolverName::CreateFromStructuredData(), lldb_private::BreakpointOptions::CommandData::CreateFromStructuredData(), lldb_private::BreakpointResolverFileRegex::CreateFromStructuredData(), lldb_private::Breakpoint::CreateFromStructuredData(), lldb_private::PlatformDarwin::ExtractAppSpecificInfo(), ObjectFileMachO::GetCorefileThreadExtraInfos(), lldb_private::Thread::GetDescription(), SystemRuntimeMacOSX::GetExtendedBacktraceThread(), lldb_private::InstrumentationRuntimeTSan::GetFirstNonInternalFramePc(), GetItemAtIndex(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetModulesInfo(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetThreadStopInfoFromJSON(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_jModulesInfo(), CommandObjectBreakpointRead::CommandOptions::HandleOptionArgumentCompletion(), lldb_private::DynamicLoaderDarwin::JSONImageInformationIntoImageInfo(), lldb_private::Process::MapSupportedStructuredDataPlugins(), CommandObjectScriptingObjectParsed::CommandOptions::ParseUsageMaskFromArray(), CommandObjectScriptingObjectParsed::CommandOptions::ProcessCompletionDict(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::QueryGDBServer(), lldb_private::DebuggerStats::ReportStatistics(), lldb_private::Breakpoint::SerializedBreakpointMatchesNames(), CommandObjectScriptingObjectParsed::CommandOptions::SetOptionsFromArray(), lldb_private::DynamicRegisterInfo::SetRegisterInfo(), lldb_private::process_gdb_remote::ProcessGDBRemote::UpdateThreadIDList(), and lldb_private::process_gdb_remote::ProcessGDBRemote::WillPublicStop().
|
inline |
Definition at line 210 of file StructuredData.h.
References m_items.
|
inline |
Definition at line 265 of file StructuredData.h.
References m_items.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerPlatform::Handle_jSignalsInfo().
|
overridevirtual |
Implements lldb_private::StructuredData::Object.
Definition at line 143 of file StructuredData.cpp.
Referenced by lldb_private::DebuggerStats::ReportStatistics().
|
protected |
Definition at line 295 of file StructuredData.h.
Referenced by AddItem(), ForEach(), GetItemAtIndex(), GetSize(), operator[](), and Push().