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(ConstString 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 | GetValueForKeyAsString (llvm::StringRef key, ConstString &result) const |
bool | GetValueForKeyAsString (llvm::StringRef key, ConstString &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 |
![]() | |
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::map< ConstString, ObjectSP > | collection |
Protected Attributes | |
collection | m_dict |
Definition at line 427 of file StructuredData.h.
|
protected |
Definition at line 618 of file StructuredData.h.
|
inline |
Definition at line 429 of file StructuredData.h.
|
inline |
Definition at line 431 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 609 of file StructuredData.h.
References AddItem().
Referenced by sddarwinlog_private::FilterRule::Serialize().
|
inline |
Definition at line 601 of file StructuredData.h.
References AddItem().
|
inline |
Definition at line 591 of file StructuredData.h.
References AddItem().
Referenced by SystemRuntimeMacOSX::AddThreadExtendedInfoPacketHints(), and lldb_private::InstrumentationRuntimeASan::RetrieveReportData().
|
inline |
Definition at line 586 of file StructuredData.h.
References m_dict.
Referenced by AddBoolConfigEntry(), AddBooleanItem(), AddFloatItem(), AddIntegerItem(), AddLLVMTargets(), and AddStringItem().
|
inline |
Definition at line 605 of file StructuredData.h.
References AddItem().
Referenced by sddarwinlog_private::RegexFilterRule::DoSerialization(), sddarwinlog_private::ExactMatchFilterRule::DoSerialization(), lldb_private::InstrumentationRuntimeASan::RetrieveReportData(), and sddarwinlog_private::FilterRule::Serialize().
|
inline |
Definition at line 445 of file StructuredData.h.
References m_dict.
Referenced by SymbolVendorMacOSX::CreateInstance(), lldb_private::PlatformDarwin::ExtractAppSpecificInfo(), lldb_private::Target::StopHookScripted::GetSubclassDescription(), and lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo().
|
overridevirtual |
Reimplemented from lldb_private::StructuredData::Object.
Definition at line 230 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 453 of file StructuredData.h.
References m_dict.
Referenced by lldb::SBStructuredData::GetKeys().
|
inline |
Definition at line 443 of file StructuredData.h.
References m_dict.
Referenced by lldb_private::Target::StopHookScripted::GetSubclassDescription().
|
inline |
Definition at line 464 of file StructuredData.h.
References m_dict.
Referenced by 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(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::QueryGDBServer().
|
inline |
Definition at line 570 of file StructuredData.h.
References lldb_private::StructuredData::Object::GetAsArray(), and GetValueForKey().
Referenced by lldb_private::DynamicRegisterInfo::ByteOffsetFromRegInfoDict(), lldb_private::ScriptedThread::CalculateStopInfo(), lldb_private::BreakpointResolverName::CreateFromStructuredData(), lldb_private::BreakpointResolverFileRegex::CreateFromStructuredData(), lldb_private::SearchFilterByModule::CreateFromStructuredData(), lldb_private::SearchFilterByModuleList::CreateFromStructuredData(), lldb_private::SearchFilterByModuleListAndCU::CreateFromStructuredData(), lldb_private::BreakpointOptions::CommandData::CreateFromStructuredData(), lldb_private::Breakpoint::CreateFromStructuredData(), lldb_private::StructuredDataDarwinLog::GetDescription(), CommandObjectBreakpointRead::CommandOptions::HandleOptionArgumentCompletion(), lldb_private::Breakpoint::SerializedBreakpointMatchesNames(), and lldb_private::DynamicRegisterInfo::SetRegisterInfo().
|
inline |
Definition at line 475 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::BreakpointResolverFileRegex::CreateFromStructuredData(), lldb_private::BreakpointOptions::CommandData::CreateFromStructuredData(), lldb_private::Breakpoint::CreateFromStructuredData(), and lldb_private::BreakpointOptions::CreateFromStructuredData().
|
inline |
Definition at line 559 of file StructuredData.h.
References lldb_private::StructuredData::Object::GetAsDictionary(), and GetValueForKey().
Referenced by lldb_private::ScriptedThread::CalculateStopInfo(), lldb_private::BreakpointResolverScripted::CreateFromStructuredData(), lldb_private::SearchFilter::CreateFromStructuredData(), lldb_private::BreakpointResolver::CreateFromStructuredData(), lldb_private::Breakpoint::CreateFromStructuredData(), and lldb_private::BreakpointOptions::CreateFromStructuredData().
|
inline |
Definition at line 488 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::BreakpointResolverAddress::CreateFromStructuredData(), lldb_private::ThreadSpec::CreateFromStructuredData(), lldb_private::BreakpointResolver::CreateFromStructuredData(), lldb_private::BreakpointOptions::CreateFromStructuredData(), lldb_private::StructuredDataDarwinLog::DumpHeader(), 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 507 of file StructuredData.h.
|
inline |
Definition at line 539 of file StructuredData.h.
References GetValueForKey().
|
inline |
Definition at line 551 of file StructuredData.h.
References GetValueForKeyAsString(), and lldb_private::ConstString::SetCString().
|
inline |
Definition at line 515 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::BreakpointResolverAddress::CreateFromStructuredData(), lldb_private::BreakpointResolverFileRegex::CreateFromStructuredData(), lldb_private::BreakpointResolverScripted::CreateFromStructuredData(), lldb_private::SearchFilter::CreateFromStructuredData(), lldb_private::ThreadSpec::CreateFromStructuredData(), lldb_private::BreakpointOptions::CommandData::CreateFromStructuredData(), lldb_private::BreakpointResolver::CreateFromStructuredData(), lldb_private::BreakpointOptions::CreateFromStructuredData(), lldb_private::StructuredDataDarwinLog::DumpHeader(), 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 527 of file StructuredData.h.
References GetValueForKeyAsString().
|
inline |
Definition at line 580 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 164 of file StructuredData.cpp.
|
protected |
Definition at line 619 of file StructuredData.h.
Referenced by AddItem(), Dictionary(), ForEach(), GetKeys(), GetSize(), GetValueForKey(), and HasKey().