LLDB  mainline
Public Types | Public Member Functions | Protected Types | Protected Attributes | List of all members
lldb_private::SymbolContextList Class Reference

Defines a list of symbol context objects. More...

#include "lldb/Symbol/SymbolContext.h"

Collaboration diagram for lldb_private::SymbolContextList:
Collaboration graph
[legend]

Public Types

typedef AdaptedIterable< collection, SymbolContext, vector_adapterSymbolContextIterable
 

Public Member Functions

 SymbolContextList ()
 Default constructor. More...
 
 ~SymbolContextList ()
 Destructor. More...
 
void Append (const SymbolContext &sc)
 Append a new symbol context to the list. More...
 
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. More...
 
void Dump (Stream *s, Target *target) const
 Dump a description of this object to a Stream. More...
 
bool GetContextAtIndex (size_t idx, SymbolContext &sc) const
 Get accessor for a symbol context at index idx. More...
 
SymbolContextoperator[] (size_t idx)
 Direct reference accessor for a symbol context at index idx. More...
 
const SymbolContextoperator[] (size_t idx) const
 
bool RemoveContextAtIndex (size_t idx)
 
uint32_t GetSize () const
 Get accessor for a symbol context list size. More...
 
uint32_t NumLineEntriesWithLine (uint32_t line) const
 
void GetDescription (Stream *s, lldb::DescriptionLevel level, Target *target) const
 
SymbolContextIterable SymbolContexts ()
 

Protected Types

typedef std::vector< SymbolContextcollection
 The collection type for the list. More...
 

Protected Attributes

collection m_symbol_contexts
 The list of symbol contexts. More...
 

Detailed Description

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 403 of file SymbolContext.h.

Member Typedef Documentation

◆ collection

The collection type for the list.

Definition at line 488 of file SymbolContext.h.

◆ SymbolContextIterable

Definition at line 495 of file SymbolContext.h.

Constructor & Destructor Documentation

◆ SymbolContextList()

SymbolContextList::SymbolContextList ( )

Default constructor.

Initialize with an empty list.

Definition at line 1208 of file SymbolContext.cpp.

◆ ~SymbolContextList()

SymbolContextList::~SymbolContextList ( )

Destructor.

Definition at line 1210 of file SymbolContext.cpp.

Member Function Documentation

◆ Append() [1/2]

void SymbolContextList::Append ( const SymbolContext sc)

◆ Append() [2/2]

void SymbolContextList::Append ( const SymbolContextList sc_list)

Definition at line 1216 of file SymbolContext.cpp.

References m_symbol_contexts.

◆ AppendIfUnique() [1/2]

bool SymbolContextList::AppendIfUnique ( const SymbolContext sc,
bool  merge_symbol_into_function 
)

◆ AppendIfUnique() [2/2]

uint32_t SymbolContextList::AppendIfUnique ( const SymbolContextList sc_list,
bool  merge_symbol_into_function 
)

Definition at line 1222 of file SymbolContext.cpp.

References AppendIfUnique(), and m_symbol_contexts.

◆ Clear()

void SymbolContextList::Clear ( )

◆ Dump()

void SymbolContextList::Dump ( Stream s,
Target target 
) const

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.

Parameters
[in]sThe stream to which to dump the object description.

Definition at line 1270 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().

◆ GetContextAtIndex()

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.

Parameters
[in]idxThe zero based index into the symbol context list.
[out]scA reference to the symbol context to fill in.
Returns
Returns true if idx was a valid index into this symbol context list and sc was filled in, false otherwise.

Definition at line 1286 of file SymbolContext.cpp.

References m_symbol_contexts.

Referenced by lldb_private::Disassembler::Disassemble(), CommandObjectTargetVariable::DoExecute(), CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), DumpCompileUnitLineTable(), CommandObjectSourceInfo::DumpLinesInFunctions(), CommandObjectSourceInfo::DumpLinesInSymbolContexts(), DumpSymbolContextList(), lldb_private::SourceManager::File::File(), lldb_private::BreakpointResolverFileLine::FilterContexts(), lldb_private::ClangExpressionDeclMap::FindExternalVisibleDecls(), lldb_private::ClangASTSource::FindObjCMethodDecls(), lldb_private::SourceManager::GetDefaultFileAndLine(), lldb_private::AppleObjCRuntimeV2::GetEncodingToType(), ObjectFileMachO::GetEntryPointAddress(), lldb_private::ItaniumABILanguageRuntime::GetExceptionObjectForThread(), SystemRuntimeMacOSX::GetExtendedBacktraceForQueueItem(), lldb_private::AppleObjCRuntime::GetPrintForDebuggerAddr(), lldb_private::DynamicLoaderDarwin::GetPthreadSetSpecificAddress(), DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), lldb_private::InferiorCallMmap(), lldb_private::InferiorCallMunmap(), lldb_private::ObjCLanguageRuntime::LookupInCompleteClassCache(), lldb_private::operator==(), lldb_private::Module::LookupInfo::Prune(), RemoveFunctionsWithModuleNotEqualTo(), lldb_private::Symbol::ResolveReExportedSymbolInModuleSpec(), lldb_private::BreakpointResolverFileRegex::SearchCallback(), lldb_private::AddressResolverFileLine::SearchCallback(), lldb_private::AddressResolverName::SearchCallback(), lldb_private::BreakpointResolverName::SearchCallback(), lldb_private::CommandCompletions::SymbolCompleter::SearchCallback(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ServeSymbolLookups(), lldb::SBThread::StepOverUntil(), and JITLoaderGDB::Terminate().

◆ GetDescription()

void SymbolContextList::GetDescription ( Stream s,
lldb::DescriptionLevel  level,
Target target 
) const

Definition at line 1314 of file SymbolContext.cpp.

References m_symbol_contexts.

◆ GetSize()

uint32_t SymbolContextList::GetSize ( ) const

Get accessor for a symbol context list size.

Returns
Returns the number of symbol context objects in the list.

Definition at line 1302 of file SymbolContext.cpp.

References m_symbol_contexts.

Referenced by SymbolFileDWARFDebugMap::CompleteType(), SymbolFileDWARF::DIEInDeclContext(), lldb_private::Disassembler::Disassemble(), CommandObjectTargetVariable::DoExecute(), CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), CommandObjectSourceInfo::DumpLinesInSymbolContexts(), DumpSymbolContextList(), lldb_private::BreakpointResolverFileLine::FilterContexts(), lldb_private::ModuleList::FindCompileUnits(), lldb_private::Module::FindCompileUnits(), lldb_private::DynamicLoaderDarwin::FindEquivalentSymbols(), lldb_private::ClangExpressionDeclMap::FindExternalVisibleDecls(), SymbolFileDWARFDebugMap::FindFunctions(), lldb_private::breakpad::SymbolFileBreakpad::FindFunctions(), SymbolFilePDB::FindFunctions(), SymbolFileDWARF::FindFunctions(), lldb_private::ModuleList::FindFunctions(), lldb_private::Module::FindFunctions(), lldb_private::ModuleList::FindFunctionSymbols(), lldb_private::npdb::SymbolFileNativePDB::FindGlobalVariables(), SymbolFilePDB::FindGlobalVariables(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), lldb_private::ClangASTSource::FindObjCMethodDecls(), lldb_private::Module::FindSymbolsMatchingRegExAndType(), lldb_private::ModuleList::FindSymbolsMatchingRegExAndType(), lldb_private::Module::FindSymbolsWithNameAndType(), lldb_private::ModuleList::FindSymbolsWithNameAndType(), SymbolFileDWARF::GetGlobalAranges(), lldb_private::ModuleList::GetModuleAtIndexUnlocked(), DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), lldb_private::operator==(), SymbolFilePDB::ParseDeclsForContext(), lldb_private::Module::LookupInfo::Prune(), RemoveFunctionsWithModuleNotEqualTo(), lldb_private::Symbol::ResolveReExportedSymbolInModuleSpec(), lldb_private::breakpad::SymbolFileBreakpad::ResolveSymbolContext(), lldb_private::CompileUnit::ResolveSymbolContext(), lldb_private::ModuleList::ResolveSymbolContextsForFileSpec(), lldb_private::Module::ResolveSymbolContextsForFileSpec(), lldb_private::BreakpointResolverFileRegex::SearchCallback(), lldb_private::AddressResolverName::SearchCallback(), lldb_private::BreakpointResolverName::SearchCallback(), lldb_private::CommandCompletions::SymbolCompleter::SearchCallback(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ServeSymbolLookups(), and lldb_private::BreakpointResolver::SetSCMatchesByLine().

◆ NumLineEntriesWithLine()

uint32_t SymbolContextList::NumLineEntriesWithLine ( uint32_t  line) const

◆ operator[]() [1/2]

SymbolContext& lldb_private::SymbolContextList::operator[] ( size_t  idx)
inline

Direct 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.

Parameters
[in]idxThe zero based index into the symbol context list.
Returns
A const reference to the symbol context to fill in.

Definition at line 467 of file SymbolContext.h.

◆ operator[]() [2/2]

const SymbolContext& lldb_private::SymbolContextList::operator[] ( size_t  idx) const
inline

Definition at line 469 of file SymbolContext.h.

References lldb_private::SymbolContext::GetDescription().

◆ RemoveContextAtIndex()

bool SymbolContextList::RemoveContextAtIndex ( size_t  idx)

◆ SymbolContexts()

SymbolContextIterable lldb_private::SymbolContextList::SymbolContexts ( )
inline

Definition at line 496 of file SymbolContext.h.

References lldb_private::operator!=(), and lldb_private::operator==().

Member Data Documentation

◆ m_symbol_contexts

collection lldb_private::SymbolContextList::m_symbol_contexts
protected

The documentation for this class was generated from the following files: