LLDB mainline
|
#include <StructuredData.h>
Public Member Functions | |
Dictionary () | |
Dictionary (ObjectSP obj_sp) | |
~Dictionary () override=default | |
size_t | GetSize () const |
void | ForEach (std::function< bool(llvm::StringRef key, Object *object)> const &callback) const |
ArraySP | GetKeys () const |
ObjectSP | GetValueForKey (llvm::StringRef key) const |
bool | GetValueForKeyAsBoolean (llvm::StringRef key, bool &result) const |
template<class IntType > | |
bool | GetValueForKeyAsInteger (llvm::StringRef key, IntType &result) const |
template<class IntType > | |
bool | GetValueForKeyAsInteger (llvm::StringRef key, IntType &result, IntType default_val) const |
bool | GetValueForKeyAsString (llvm::StringRef key, llvm::StringRef &result) const |
bool | GetValueForKeyAsString (llvm::StringRef key, llvm::StringRef &result, const char *default_val) const |
bool | GetValueForKeyAsDictionary (llvm::StringRef key, Dictionary *&result) const |
bool | GetValueForKeyAsArray (llvm::StringRef key, Array *&result) const |
bool | HasKey (llvm::StringRef key) const |
void | AddItem (llvm::StringRef key, ObjectSP value_sp) |
template<typename T > | |
void | AddIntegerItem (llvm::StringRef key, T value) |
void | AddFloatItem (llvm::StringRef key, double value) |
void | AddStringItem (llvm::StringRef key, llvm::StringRef value) |
void | AddBooleanItem (llvm::StringRef key, 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 Attributes | |
llvm::StringMap< ObjectSP > | m_dict |
Definition at line 384 of file StructuredData.h.
|
inline |
Definition at line 386 of file StructuredData.h.
|
inline |
Definition at line 388 of file StructuredData.h.
References lldb::eStructuredDataTypeDictionary, lldb::eStructuredDataTypeInvalid, lldb_private::StructuredData::Object::GetAsDictionary(), m_dict, and lldb_private::StructuredData::Object::SetType().
|
overridedefault |
|
inline |
Definition at line 533 of file StructuredData.h.
References AddItem().
Referenced by sddarwinlog_private::FilterRule::Serialize().
|
inline |
Definition at line 525 of file StructuredData.h.
References AddItem().
|
inline |
Definition at line 515 of file StructuredData.h.
References AddItem().
Referenced by SystemRuntimeMacOSX::AddThreadExtendedInfoPacketHints().
|
inline |
Definition at line 511 of file StructuredData.h.
References m_dict.
Referenced by AddBoolConfigEntry(), AddBooleanItem(), AddFloatItem(), AddIntegerItem(), AddLLVMTargets(), AddStringItem(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetSeparateDebugInfo(), and lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::GetSeparateDebugInfo().
|
inline |
Definition at line 529 of file StructuredData.h.
References AddItem().
Referenced by sddarwinlog_private::RegexFilterRule::DoSerialization(), sddarwinlog_private::ExactMatchFilterRule::DoSerialization(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetSeparateDebugInfo(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::GetSeparateDebugInfo(), and sddarwinlog_private::FilterRule::Serialize().
|
inline |
Definition at line 402 of file StructuredData.h.
References m_dict.
Referenced by SymbolVendorMacOSX::CreateInstance(), lldb_private::PlatformDarwin::ExtractAppSpecificInfo(), lldb_private::Target::StopHookScripted::GetSubclassDescription(), CommandObjectScriptingObjectParsed::CommandOptions::SetOptionsFromArray(), and lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo().
|
overridevirtual |
Reimplemented from lldb_private::StructuredData::Object.
Definition at line 239 of file StructuredData.cpp.
References lldb_private::Stream::EOL(), lldb_private::Stream::Format(), lldb_private::Stream::GetIndentLevel(), lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), lldb_private::StructuredData::IsRecordType(), lldb_private::Stream::PutChar(), and lldb_private::Stream::SetIndentLevel().
|
inline |
Definition at line 410 of file StructuredData.h.
References m_dict.
Referenced by lldb::SBStructuredData::GetKeys().
|
inline |
Definition at line 400 of file StructuredData.h.
References m_dict.
Referenced by lldb_private::PlatformDarwin::FetchExtendedCrashInformation(), lldb_private::Target::StopHookScripted::GetSubclassDescription(), and CommandObjectScriptingObjectParsed::CommandOptions::SetOptionsFromArray().
|
inline |
Definition at line 419 of file StructuredData.h.
References m_dict.
Referenced by CommandObjectScriptingObjectParsed::CommandObjectScriptingObjectParsed(), lldb_private::Target::CreateBreakpointsFromFile(), SymbolVendorMacOSX::CreateInstance(), GenerateThreadName(), lldb_private::Thread::GetDescription(), lldb_private::StructuredData::Object::GetObjectForDotSeparatedPath(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetRemoteUnixSignals(), lldb_private::AppleObjCRuntimeV2::GetSharedCacheBaseAddress(), DynamicLoaderMacOS::GetSharedCacheInformation(), GetValueForKeyAsArray(), GetValueForKeyAsBoolean(), GetValueForKeyAsDictionary(), GetValueForKeyAsInteger(), GetValueForKeyAsString(), CommandObjectBreakpointRead::CommandOptions::HandleOptionArgumentCompletion(), lldb_private::DynamicLoaderDarwin::JSONImageInformationIntoImageInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::QueryGDBServer(), and CommandObjectScriptingObjectParsed::CommandOptions::SetOptionsFromArray().
|
inline |
Definition at line 499 of file StructuredData.h.
References lldb_private::StructuredData::Object::GetAsArray(), and GetValueForKey().
Referenced by lldb_private::DynamicRegisterInfo::ByteOffsetFromRegInfoDict(), lldb_private::ScriptedThread::CalculateStopInfo(), 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(), CommandObjectTargetModulesDumpSeparateDebugInfoFiles::DoExecute(), ObjectFileMachO::GetCorefileThreadExtraInfos(), lldb_private::StructuredDataDarwinLog::GetDescription(), CommandObjectBreakpointRead::CommandOptions::HandleOptionArgumentCompletion(), lldb_private::Breakpoint::SerializedBreakpointMatchesNames(), and lldb_private::DynamicRegisterInfo::SetRegisterInfo().
|
inline |
Definition at line 423 of file StructuredData.h.
References lldb_private::StructuredData::Object::GetAsBoolean(), lldb_private::StructuredData::Boolean::GetValue(), and GetValueForKey().
Referenced by lldb_private::BreakpointResolverFileLine::CreateFromStructuredData(), lldb_private::BreakpointResolverName::CreateFromStructuredData(), lldb_private::BreakpointOptions::CommandData::CreateFromStructuredData(), lldb_private::BreakpointResolverFileRegex::CreateFromStructuredData(), lldb_private::Breakpoint::CreateFromStructuredData(), and lldb_private::BreakpointOptions::CreateFromStructuredData().
|
inline |
Definition at line 488 of file StructuredData.h.
References lldb_private::StructuredData::Object::GetAsDictionary(), and GetValueForKey().
Referenced by lldb_private::ScriptedThread::CalculateStopInfo(), lldb_private::SearchFilter::CreateFromStructuredData(), lldb_private::BreakpointResolverScripted::CreateFromStructuredData(), lldb_private::BreakpointResolver::CreateFromStructuredData(), lldb_private::Breakpoint::CreateFromStructuredData(), and lldb_private::BreakpointOptions::CreateFromStructuredData().
|
inline |
Definition at line 437 of file StructuredData.h.
References GetValueForKey().
Referenced by lldb_private::DynamicRegisterInfo::ByteOffsetFromRegInfoDict(), lldb_private::ScriptedThread::CalculateStopInfo(), lldb_private::BreakpointResolverFileLine::CreateFromStructuredData(), lldb_private::BreakpointResolverName::CreateFromStructuredData(), lldb_private::ThreadSpec::CreateFromStructuredData(), lldb_private::BreakpointResolverAddress::CreateFromStructuredData(), lldb_private::BreakpointResolver::CreateFromStructuredData(), lldb_private::BreakpointOptions::CreateFromStructuredData(), DumpDwoFilesTable(), lldb_private::StructuredDataDarwinLog::DumpHeader(), DumpOsoFilesTable(), ObjectFileMachO::GetCorefileThreadExtraInfos(), SystemRuntimeMacOSX::GetExtendedBacktraceThread(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetThreadStopInfoFromJSON(), lldb_private::ScriptedThread::LoadArtificialStackFrames(), ParseModuleSpec(), lldb_private::DynamicRegisterInfo::SetRegisterInfo(), lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo(), and lldb_private::process_gdb_remote::ProcessGDBRemote::UpdateThreadIDList().
|
inline |
Definition at line 456 of file StructuredData.h.
|
inline |
Definition at line 464 of file StructuredData.h.
References GetValueForKey().
Referenced by lldb_private::DynamicRegisterInfo::ByteOffsetFromRegInfoDict(), lldb_private::ScriptedThread::CalculateStopInfo(), lldb_private::SearchFilter::CreateFromStructuredData(), lldb_private::BreakpointResolverFileLine::CreateFromStructuredData(), lldb_private::BreakpointResolverName::CreateFromStructuredData(), lldb_private::ThreadSpec::CreateFromStructuredData(), lldb_private::BreakpointOptions::CommandData::CreateFromStructuredData(), lldb_private::BreakpointResolverAddress::CreateFromStructuredData(), lldb_private::BreakpointResolverFileRegex::CreateFromStructuredData(), lldb_private::BreakpointResolverScripted::CreateFromStructuredData(), lldb_private::BreakpointResolver::CreateFromStructuredData(), lldb_private::BreakpointOptions::CreateFromStructuredData(), CommandObjectTargetModulesDumpSeparateDebugInfoFiles::DoExecute(), DumpDwoFilesTable(), lldb_private::StructuredDataDarwinLog::DumpHeader(), DumpOsoFilesTable(), lldb_private::StructuredDataDarwinLog::GetDescription(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), GetValueForKeyAsString(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_jModulesInfo(), lldb_private::StructuredDataDarwinLog::HandleDisplayOfEvent(), ParseModuleSpec(), lldb_private::Process::RouteAsyncStructuredData(), and lldb_private::DynamicRegisterInfo::SetRegisterInfo().
|
inline |
Definition at line 476 of file StructuredData.h.
References GetValueForKeyAsString().
|
inline |
Definition at line 509 of file StructuredData.h.
References m_dict.
Referenced by lldb_private::BreakpointResolverAddress::CreateFromStructuredData(), lldb_private::BreakpointOptions::CreateFromStructuredData(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), DynamicLoaderMacOS::GetSharedCacheInformation(), and lldb_private::DynamicLoaderDarwin::JSONImageInformationIntoImageInfo().
|
overridevirtual |
Implements lldb_private::StructuredData::Object.
Definition at line 163 of file StructuredData.cpp.
|
protected |
Definition at line 542 of file StructuredData.h.
Referenced by AddItem(), Dictionary(), ForEach(), GetKeys(), GetSize(), GetValueForKey(), and HasKey().