|
LLDB mainline
|
Defines a list of symbol context objects. More...
#include "lldb/Symbol/SymbolContext.h"
Public Types | |
| typedef llvm::iterator_range< const_iterator > | SymbolContextIterable |
Public Member Functions | |
| SymbolContextList () | |
| Default constructor. | |
| ~SymbolContextList () | |
| Destructor. | |
| void | Append (const SymbolContext &sc) |
| Append a new symbol context to the list. | |
| void | Append (const SymbolContextList &sc_list) |
| bool | AppendIfUnique (const SymbolContext &sc, bool merge_symbol_into_function) |
| uint32_t | AppendIfUnique (const SymbolContextList &sc_list, bool merge_symbol_into_function) |
| void | Clear () |
| Clear the object's state. | |
| void | Dump (Stream *s, Target *target) const |
| Dump a description of this object to a Stream. | |
| bool | GetContextAtIndex (size_t idx, SymbolContext &sc) const |
| Get accessor for a symbol context at index idx. | |
| const SymbolContext & | operator[] (size_t idx) const |
| Direct const reference accessor for a symbol context at index idx. | |
| void | SetSymbolAtIndex (size_t idx, Symbol *symbol) |
| Replace the symbol in the symbol context at index idx. | |
| bool | RemoveContextAtIndex (size_t idx) |
| uint32_t | GetSize () const |
| Get accessor for a symbol context list size. | |
| bool | IsEmpty () const |
| uint32_t | NumLineEntriesWithLine (uint32_t line) const |
| void | GetDescription (Stream *s, lldb::DescriptionLevel level, Target *target) const |
| const_iterator | begin () const |
| const_iterator | end () const |
| SymbolContextIterable | SymbolContexts () |
Private Types | |
| using | collection |
| using | const_iterator = collection::const_iterator |
Private Attributes | |
| collection | m_symbol_contexts |
| The list of symbol contexts. | |
Defines a list of symbol context objects.
This class provides a common structure that can be used to contain the result of a query that can contain a multiple results. Examples of such queries include:
Definition at line 396 of file SymbolContext.h.
|
private |
Definition at line 489 of file SymbolContext.h.
|
private |
Definition at line 491 of file SymbolContext.h.
| typedef llvm::iterator_range<const_iterator> lldb_private::SymbolContextList::SymbolContextIterable |
Definition at line 500 of file SymbolContext.h.
| SymbolContextList::SymbolContextList | ( | ) |
Default constructor.
Initialize with an empty list.
Definition at line 1194 of file SymbolContext.cpp.
References m_symbol_contexts.
Referenced by Append(), AppendIfUnique(), and ~SymbolContextList().
|
default |
Destructor.
References SymbolContextList().
| void SymbolContextList::Append | ( | const SymbolContext & | sc | ) |
Append a new symbol context to the list.
| [in] | sc | A symbol context to append to the list. |
Definition at line 1198 of file SymbolContext.cpp.
References m_symbol_contexts.
Referenced by CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), CommandObjectTargetVariable::DoExecute(), CommandObjectSourceInfo::DumpLinesForFrame(), CommandObjectSourceInfo::DumpLinesInFunctions(), lldb_private::Module::FindCompileUnits(), lldb_private::Module::FindFunctions(), lldb_private::npdb::SymbolFileNativePDB::FindFunctions(), lldb_private::SymbolFileCTF::FindFunctions(), lldb_private::SymbolFileCTF::FindFunctions(), lldb_private::LineTable::FindLineEntriesForFileIndex(), lldb_private::ClangASTSource::FindObjCMethodDecls(), lldb::SBModule::FindSymbols(), lldb_private::MemoryHistoryASan::GetHistoryThreads(), SymbolFilePDB::ResolveFunction(), ResolveFunctionCallLabel(), lldb_private::CompileUnit::ResolveSymbolContext(), lldb_private::ReportRetriever::RetrieveReportData(), lldb_private::ClangExpressionDeclMap::SearchFunctionsInSymbolContexts(), and lldb_private::Module::SymbolIndicesToSymbolContextList().
| void SymbolContextList::Append | ( | const SymbolContextList & | sc_list | ) |
Definition at line 1202 of file SymbolContext.cpp.
References m_symbol_contexts, and SymbolContextList().
| bool SymbolContextList::AppendIfUnique | ( | const SymbolContext & | sc, |
| bool | merge_symbol_into_function ) |
Definition at line 1217 of file SymbolContext.cpp.
References lldb_private::SymbolContext::block, lldb_private::SymbolContext::comp_unit, lldb_private::SymbolContext::function, lldb_private::Symbol::GetAddressRef(), lldb_private::LineEntry::IsValid(), lldb_private::SymbolContext::line_entry, m_symbol_contexts, SetSymbolAtIndex(), lldb_private::SymbolContext::symbol, and lldb_private::Symbol::ValueIsAddress().
Referenced by AppendIfUnique(), lldb_private::breakpad::SymbolFileBreakpad::FindFunctions(), CommandObjectSourceInfo::GetSymbolContextsForAddress(), lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveFunction(), and lldb_private::Symtab::SymbolIndicesToSymbolContextList().
| uint32_t SymbolContextList::AppendIfUnique | ( | const SymbolContextList & | sc_list, |
| bool | merge_symbol_into_function ) |
Definition at line 1207 of file SymbolContext.cpp.
References AppendIfUnique(), m_symbol_contexts, and SymbolContextList().
|
inline |
Definition at line 497 of file SymbolContext.h.
References m_symbol_contexts.
Referenced by lldb_private::BreakpointResolver::SetSCMatchesByLine().
| void SymbolContextList::Clear | ( | ) |
Clear the object's state.
Clears the symbol context list.
Definition at line 1253 of file SymbolContext.cpp.
References m_symbol_contexts.
Referenced by SystemRuntimeMacOSX::BacktraceRecordingHeadersInitialized(), lldb_private::LineTable::FindLineEntriesForFileIndex(), and lldb_private::ClangASTSource::FindObjCMethodDecls().
Dump a description of this object to a Stream.
Dump a description of the contents of each symbol context in the list to the supplied stream s.
| [in] | s | The stream to which to dump the object description. |
Definition at line 1255 of file SymbolContext.cpp.
References lldb::eDescriptionLevelVerbose, lldb_private::Stream::EOL(), lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), m_symbol_contexts, and lldb_private::Stream::PutCString().
|
inline |
Definition at line 498 of file SymbolContext.h.
References m_symbol_contexts.
Referenced by lldb_private::BreakpointResolver::SetSCMatchesByLine().
| bool SymbolContextList::GetContextAtIndex | ( | size_t | idx, |
| SymbolContext & | sc ) const |
Get accessor for a symbol context at index idx.
Dump a description of the contents of each symbol context in the list to the supplied stream s.
| [in] | idx | The zero based index into the symbol context list. |
| [out] | sc | A reference to the symbol context to fill in. |
Definition at line 1269 of file SymbolContext.cpp.
References m_symbol_contexts.
Referenced by SystemRuntimeMacOSX::BacktraceRecordingHeadersInitialized(), lldb_private::SourceManager::File::CommonInitializerImpl(), CommandObjectSourceList::DoExecute(), lldb_private::BreakpointResolverFileLine::FilterContexts(), ObjectFileMachO::GetEntryPointAddress(), lldb_private::ItaniumABIRuntime::GetExceptionObjectForThread(), RegisterContextFreeBSDKernelCore_arm64::GetOsreldate(), lldb_private::AppleObjCRuntime::GetPrintForDebuggerAddr(), lldb_private::DynamicLoaderDarwin::GetPthreadSetSpecificAddress(), JITLoaderGDB::GetSymbolAddress(), lldb_private::AppleObjCRuntimeV2::GetValuesForGlobalCFBooleans(), lldb_private::InferiorCallMmap(), lldb_private::InferiorCallMunmap(), lldb_private::ObjCLanguageRuntime::LookupInCompleteClassCache(), lldb_private::operator==(), lldb_private::Module::LookupInfo::Prune(), RemoveFunctionsWithModuleNotEqualTo(), lldb_private::BreakpointResolverFileRegex::SearchCallback(), and lldb_private::BreakpointResolverName::SearchCallback().
| void SymbolContextList::GetDescription | ( | Stream * | s, |
| lldb::DescriptionLevel | level, | ||
| Target * | target ) const |
Definition at line 1299 of file SymbolContext.cpp.
References GetDescription(), and m_symbol_contexts.
Referenced by GetDescription().
| uint32_t SymbolContextList::GetSize | ( | ) | const |
Get accessor for a symbol context list size.
Definition at line 1285 of file SymbolContext.cpp.
References m_symbol_contexts.
Referenced by lldb_private::GNUstepObjCRuntime::CreateInstance(), CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), CommandObjectSourceInfo::DumpLinesInFunctions(), lldb_private::BreakpointResolverFileLine::FilterContexts(), lldb_private::Module::FindFunctions(), lldb_private::plugin::dwarf::SymbolFileDWARF::FindFunctions(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::FindFunctions(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::FindFunctions(), lldb_private::SymbolFileOnDemand::FindFunctions(), lldb_private::ModuleList::FindFunctionSymbols(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), lldb_private::ClangASTSource::FindObjCMethodDecls(), ObjectFileMachO::GetEntryPointAddress(), lldb_private::platform_android::PlatformAndroid::GetLibdlFunctionDeclarations(), RegisterContextFreeBSDKernelCore_arm64::GetOsreldate(), DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), lldb_private::AppleObjCRuntimeV2::GetValuesForGlobalCFBooleans(), lldb_private::InferiorCallMmap(), lldb_private::InferiorCallMunmap(), lldb_private::ClangExpressionDeclMap::LookupFunction(), LookupFunctionInModule(), lldb_private::ObjCLanguageRuntime::LookupInCompleteClassCache(), lldb_private::operator==(), lldb_private::DirectCallEdge::ParseSymbolFileAndResolve(), lldb_private::Module::LookupInfo::Prune(), RemoveFunctionsWithModuleNotEqualTo(), lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveFunctionCallLabel(), lldb_private::breakpad::SymbolFileBreakpad::ResolveSymbolContext(), lldb_private::CompileUnit::ResolveSymbolContext(), lldb_private::npdb::SymbolFileNativePDB::ResolveSymbolContext(), lldb_private::Module::ResolveSymbolContextsForFileSpec(), lldb_private::ModuleList::ResolveSymbolContextsForFileSpec(), lldb_private::BreakpointResolverFileRegex::SearchCallback(), lldb_private::BreakpointResolverName::SearchCallback(), and lldb_private::ClangExpressionDeclMap::SearchFunctionsInSymbolContexts().
| bool SymbolContextList::IsEmpty | ( | ) | const |
Definition at line 1287 of file SymbolContext.cpp.
References m_symbol_contexts.
Referenced by SystemRuntimeMacOSX::BacktraceRecordingHeadersInitialized(), lldb_private::AppleObjCRuntime::CalculateHasNewLiteralsAndIndexing(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::FindFunctions(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::FindFunctions(), DYLDRendezvous::FindMetadata(), HexagonDYLDRendezvous::FindMetadata(), lldb_private::AppleObjCRuntime::GetPrintForDebuggerAddr(), JITLoaderGDB::GetSymbolAddress(), LoadAddressResolver::Resolve(), lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveFunctionCallLabel(), and lldb_private::BreakpointResolver::SetSCMatchesByLine().
| uint32_t SymbolContextList::NumLineEntriesWithLine | ( | uint32_t | line | ) | const |
Definition at line 1289 of file SymbolContext.cpp.
References m_symbol_contexts.
Referenced by lldb_private::SourceManager::DisplaySourceLinesWithLineNumbersUsingLastFile().
|
inline |
Direct const reference accessor for a symbol context at index idx.
The index idx must be a valid index, no error checking will be done to ensure that it is valid.
| [in] | idx | The zero based index into the symbol context list. |
Definition at line 460 of file SymbolContext.h.
References m_symbol_contexts.
| bool SymbolContextList::RemoveContextAtIndex | ( | size_t | idx | ) |
Definition at line 1277 of file SymbolContext.cpp.
References m_symbol_contexts.
Referenced by lldb_private::BreakpointResolverFileLine::FilterContexts(), lldb_private::Module::LookupInfo::Prune(), RemoveFunctionsWithModuleNotEqualTo(), lldb_private::BreakpointResolverFileRegex::SearchCallback(), and lldb_private::BreakpointResolverName::SearchCallback().
|
inline |
Replace the symbol in the symbol context at index idx.
The symbol field is excluded from the hash and equality used by the internal set, so this is the only mutation that is safe to perform on an element that is already in the list.
Definition at line 469 of file SymbolContext.h.
References m_symbol_contexts.
Referenced by AppendIfUnique(), and lldb_private::Module::FindFunctions().
|
inline |
Definition at line 501 of file SymbolContext.h.
References m_symbol_contexts.
Referenced by lldb_private::CommandObjectDisassemble::GetNameRanges(), and LoadAddressResolver::Resolve().
|
private |
The list of symbol contexts.
Definition at line 494 of file SymbolContext.h.
Referenced by Append(), Append(), AppendIfUnique(), AppendIfUnique(), begin(), Clear(), Dump(), end(), GetContextAtIndex(), GetDescription(), GetSize(), IsEmpty(), NumLineEntriesWithLine(), operator[](), RemoveContextAtIndex(), SetSymbolAtIndex(), SymbolContextList(), and SymbolContexts().