|
LLDB mainline
|
A collection class for Module objects. More...
#include "lldb/Core/ModuleList.h"
Classes | |
| class | Notifier |
Public Types | |
| typedef LockingAdaptedIterable< std::recursive_mutex, collection > | ModuleIterable |
| typedef llvm::iterator_range< collection::const_iterator > | ModuleIterableNoLocking |
Public Member Functions | |
| ModuleList () | |
| Default constructor. | |
| ModuleList (const ModuleList &rhs) | |
| Copy Constructor. | |
| ModuleList (ModuleList::Notifier *notifier) | |
| ~ModuleList () | |
| Destructor. | |
| const ModuleList & | operator= (const ModuleList &rhs) |
| Assignment operator. | |
| void | Append (const lldb::ModuleSP &module_sp, bool notify=true) |
| Append a module to the module list. | |
| void | ReplaceEquivalent (const lldb::ModuleSP &module_sp, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules=nullptr) |
| Append a module to the module list and remove any equivalent modules. | |
| bool | AppendIfNeeded (const lldb::ModuleSP &new_module, bool notify=true) |
| Append a module to the module list, if it is not already there. | |
| void | Append (const ModuleList &module_list) |
| bool | AppendIfNeeded (const ModuleList &module_list) |
| bool | ReplaceModule (const lldb::ModuleSP &old_module_sp, const lldb::ModuleSP &new_module_sp) |
| void | Clear () |
| Clear the object's state. | |
| void | Destroy () |
| Clear the object's state. | |
| void | Dump (Stream *s) const |
| Dump the description of each module contained in this list. | |
| void | LogUUIDAndPaths (Log *log, const char *prefix_cstr) |
| std::recursive_mutex & | GetMutex () const |
| size_t | GetIndexForModule (const Module *module) const |
| lldb::ModuleSP | GetModuleAtIndex (size_t idx) const |
| Get the module shared pointer for the module at index idx. | |
| lldb::ModuleSP | GetModuleAtIndexUnlocked (size_t idx) const |
| Get the module shared pointer for the module at index idx without acquiring the ModuleList mutex. | |
| Module * | GetModulePointerAtIndex (size_t idx) const |
| Get the module pointer for the module at index idx. | |
| void | FindCompileUnits (const FileSpec &path, SymbolContextList &sc_list) const |
| Find compile units by partial or full path. | |
| void | FindFunctions (ConstString name, lldb::FunctionNameType name_type_mask, const ModuleFunctionSearchOptions &options, SymbolContextList &sc_list) const |
| void | FindFunctionSymbols (ConstString name, lldb::FunctionNameType name_type_mask, SymbolContextList &sc_list) |
| void | FindFunctions (const RegularExpression &name, const ModuleFunctionSearchOptions &options, SymbolContextList &sc_list) |
| void | FindGlobalVariables (ConstString name, size_t max_matches, VariableList &variable_list) const |
| Find global and static variables by name. | |
| void | FindGlobalVariables (const RegularExpression ®ex, size_t max_matches, VariableList &variable_list) const |
| Find global and static variables by regular expression. | |
| void | FindModules (const ModuleSpec &module_spec, ModuleList &matching_module_list) const |
| Finds modules whose file specification matches module_spec. | |
| lldb::ModuleSP | FindModule (const Module *module_ptr) const |
| lldb::ModuleSP | FindModule (const UUID &uuid) const |
| lldb::ModuleSP | FindModule (lldb::user_id_t uid) const |
| Find a module by LLDB-specific unique identifier. | |
| lldb::ModuleSP | FindFirstModule (const ModuleSpec &module_spec) const |
| Finds the first module whose file specification matches module_spec. | |
| void | FindSymbolsWithNameAndType (ConstString name, lldb::SymbolType symbol_type, SymbolContextList &sc_list) const |
| void | FindSymbolsMatchingRegExAndType (const RegularExpression ®ex, lldb::SymbolType symbol_type, SymbolContextList &sc_list) const |
| void | FindTypes (Module *search_first, const TypeQuery &query, lldb_private::TypeResults &results) const |
| Find types using a type-matching object that contains all search parameters. | |
| bool | FindSourceFile (const FileSpec &orig_spec, FileSpec &new_spec) const |
| void | FindAddressesForLine (const lldb::TargetSP target_sp, const FileSpec &file, uint32_t line, Function *function, std::vector< Address > &output_local, std::vector< Address > &output_extern) |
| Find addresses by file/line. | |
| bool | Remove (const lldb::ModuleSP &module_sp, bool notify=true) |
| Remove a module from the module list. | |
| size_t | Remove (ModuleList &module_list) |
| bool | RemoveIfOrphaned (const lldb::ModuleWP module_ptr) |
| size_t | RemoveOrphans (bool mandatory) |
| bool | ResolveFileAddress (lldb::addr_t vm_addr, Address &so_addr) const |
| uint32_t | ResolveSymbolContextForAddress (const Address &so_addr, lldb::SymbolContextItem resolve_scope, SymbolContext &sc) const |
| Resolve the symbol context for the given address. (const Address&,uint32_t,SymbolContext&) | |
| uint32_t | ResolveSymbolContextForFilePath (const char *file_path, uint32_t line, bool check_inlines, lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) const |
| Resolve items in the symbol context for a given file and line. (const char*,uint32_t,bool,uint32_t,SymbolContextList&) | |
| uint32_t | ResolveSymbolContextsForFileSpec (const FileSpec &file_spec, uint32_t line, bool check_inlines, lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) const |
| Resolve items in the symbol context for a given file and line. (const FileSpec&,uint32_t,bool,uint32_t,SymbolContextList&) | |
| size_t | GetSize () const |
| Gets the size of the module list. | |
| bool | IsEmpty () const |
| bool | LoadScriptingResourcesInTarget (Target *target, std::list< Status > &errors, Stream &feedback_stream, bool continue_on_error=true) |
| void | ForEach (std::function< IterationAction(const lldb::ModuleSP &module_sp)> const &callback) const |
| Applies 'callback' to each module in this ModuleList. | |
| bool | AnyOf (std::function< bool(lldb_private::Module &module)> const &callback) const |
| Returns true if 'callback' returns true for one of the modules in this ModuleList. | |
| void | Swap (ModuleList &other) |
| Atomically swaps the contents of this module list with other. | |
| void | PreloadSymbols (bool parallelize) const |
| For each module in this ModuleList, preload its symbols. | |
| ModuleIterable | Modules () const |
| ModuleIterableNoLocking | ModulesNoLocking () const |
Static Public Member Functions | |
| static ModuleListProperties & | GetGlobalModuleListProperties () |
| static bool | ModuleIsInCache (const Module *module_ptr) |
| static Status | GetSharedModule (const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr, bool invoke_locate_callback=true) |
| static bool | RemoveSharedModule (lldb::ModuleSP &module_sp) |
| static void | FindSharedModules (const ModuleSpec &module_spec, ModuleList &matching_module_list) |
| static lldb::ModuleSP | FindSharedModule (const UUID &uuid) |
| static size_t | RemoveOrphanSharedModules (bool mandatory) |
| static bool | RemoveSharedModuleIfOrphaned (const lldb::ModuleWP module_ptr) |
Protected Types | |
| typedef std::vector< lldb::ModuleSP > | collection |
| The module collection type. | |
Protected Member Functions | |
| void | AppendImpl (const lldb::ModuleSP &module_sp, bool use_notifier=true) |
| bool | RemoveImpl (const lldb::ModuleSP &module_sp, bool use_notifier=true) |
| collection::iterator | RemoveImpl (collection::iterator pos, bool use_notifier=true) |
| void | ClearImpl (bool use_notifier=true) |
Protected Attributes | |
| collection | m_modules |
| The collection of modules. | |
| std::recursive_mutex | m_modules_mutex |
| Notifier * | m_notifier = nullptr |
Static Protected Attributes | |
| static constexpr long | kUseCountModuleListOrphaned = 1 |
| An orphaned module that lives only in the ModuleList has a count of 1. | |
A collection class for Module objects.
Modules in the module collection class are stored as reference counted shared pointers to Module objects.
Definition at line 101 of file ModuleList.h.
|
protected |
The module collection type.
Definition at line 519 of file ModuleList.h.
| typedef LockingAdaptedIterable<std::recursive_mutex, collection> lldb_private::ModuleList::ModuleIterable |
Definition at line 541 of file ModuleList.h.
| typedef llvm::iterator_range<collection::const_iterator> lldb_private::ModuleList::ModuleIterableNoLocking |
Definition at line 547 of file ModuleList.h.
| ModuleList::ModuleList | ( | ) |
Default constructor.
Creates an empty list of Module objects.
Definition at line 194 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
Referenced by Append(), AppendIfNeeded(), FindFunctions(), FindModules(), FindSharedModules(), GetSharedModule(), LoadScriptingResourcesInTarget(), ModuleList(), lldb_private::ModuleList::Notifier::NotifyModuleAdded(), lldb_private::ModuleList::Notifier::NotifyModuleRemoved(), lldb_private::ModuleList::Notifier::NotifyModuleUpdated(), lldb_private::ModuleList::Notifier::NotifyWillClearList(), operator=(), Remove(), Swap(), and ~ModuleList().
| ModuleList::ModuleList | ( | const ModuleList & | rhs | ) |
Copy Constructor.
Creates a new module list object with a copy of the modules from rhs.
| [in] | rhs | Another module list object. |
Definition at line 196 of file ModuleList.cpp.
References m_modules, m_modules_mutex, and ModuleList().
| ModuleList::ModuleList | ( | ModuleList::Notifier * | notifier | ) |
Definition at line 202 of file ModuleList.cpp.
References m_modules, m_modules_mutex, and m_notifier.
|
default |
Destructor.
References ModuleList().
| bool ModuleList::AnyOf | ( | std::function< bool(lldb_private::Module &module)> const & | callback | ) | const |
Returns true if 'callback' returns true for one of the modules in this ModuleList.
This function is thread-safe.
Definition at line 1376 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
Referenced by lldb_private::Target::ModulesDidUnload().
| void ModuleList::Append | ( | const lldb::ModuleSP & | module_sp, |
| bool | notify = true ) |
Append a module to the module list.
| [in] | module_sp | A shared pointer to a module to add to this collection. |
| [in] | notify | If true, and a notifier function is set, the notifier function will be called. Defaults to true. |
When this ModuleList is the Target's ModuleList, the notifier function is Target::ModulesDidLoad – the call to ModulesDidLoad may be deferred when adding multiple Modules to the Target, but it must be called at the end, before resuming execution.
Definition at line 254 of file ModuleList.cpp.
References AppendImpl().
Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingPreloadedModules(), CommandObjectTargetSymbolsAdd::AddModuleSymbols(), Append(), AppendIfNeeded(), lldb::SBTarget::ClearModuleLoadAddress(), lldb::SBTarget::ClearSectionLoadAddress(), DynamicLoaderHexagonDYLD::DidAttach(), DynamicLoaderPOSIXDYLD::DidAttach(), lldb_private::DynamicLoaderWindowsDYLD::DidAttach(), DynamicLoaderPOSIXDYLD::DidLaunch(), lldb_private::DynamicLoaderWindowsDYLD::DidLaunch(), lldb_private::SymbolChangeEventData::DoOnRemoval(), FindModules(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::GetDebugInfoModules(), DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos(), lldb_private::ClangUtilityFunction::Install(), DynamicLoaderHexagonDYLD::LoadAllCurrentModules(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), ObjectFileMachO::LoadCoreFileImages(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), lldb_private::process_gdb_remote::ProcessGDBRemote::MaybeLoadExecutableModule(), lldb_private::Breakpoint::ModuleReplaced(), lldb_private::Target::NotifyModuleAdded(), lldb_private::Target::NotifyModuleRemoved(), lldb_private::ProcessWindows::OnExitProcess(), lldb_private::DynamicLoaderWindowsDYLD::OnLoadModule(), lldb_private::DynamicLoaderWindowsDYLD::OnUnloadModule(), lldb_private::ClangUserExpression::Parse(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), JITLoaderGDB::ReadJITDescriptorImpl(), lldb_private::minidump::ProcessMinidump::ReadModuleList(), DynamicLoaderHexagonDYLD::RefreshModules(), DynamicLoaderPOSIXDYLD::RefreshModules(), ReplaceEquivalent(), lldb_private::Symbol::ResolveReExportedSymbolInModuleSpec(), lldb::SBModule::SBModule(), lldb::SBTarget::SetSectionLoadAddress(), lldb_private::DynamicLoaderDarwin::UnloadAllImages(), and lldb_private::FunctionCaller::WriteFunctionWrapper().
| void ModuleList::Append | ( | const ModuleList & | module_list | ) |
Definition at line 301 of file ModuleList.cpp.
References Append(), m_modules, and ModuleList().
| bool ModuleList::AppendIfNeeded | ( | const lldb::ModuleSP & | new_module, |
| bool | notify = true ) |
Append a module to the module list, if it is not already there.
| [in] | notify | If true, and a notifier function is set, the notifier function will be called. Defaults to true. |
When this ModuleList is the Target's ModuleList, the notifier function is Target::ModulesDidLoad – the call to ModulesDidLoad may be deferred when adding multiple Modules to the Target, but it must be called at the end, before resuming execution.
Definition at line 287 of file ModuleList.cpp.
References Append(), m_modules, and m_modules_mutex.
Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingPreloadedModules(), AppendIfNeeded(), CreateAllImageInfosPayload(), FindModulesByName(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), DynamicLoaderStatic::LoadAllImagesAtFileAddresses(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), lldb_private::Breakpoint::ModulesChanged(), DynamicLoaderDarwinKernel::ParseKextSummaries(), DynamicLoaderFreeBSDKernel::ParseKmods(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), JITLoaderGDB::ReadJITDescriptorImpl(), DynamicLoaderHexagonDYLD::RefreshModules(), DynamicLoaderPOSIXDYLD::RefreshModules(), DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress(), lldb_private::Symbol::ResolveReExportedSymbolInModuleSpec(), lldb_private::Target::SetExecutableModule(), lldb_private::DynamicLoaderDarwin::UnloadImages(), lldb_private::DynamicLoaderDarwin::UpdateDYLDImageInfoFromNewImageInfo(), DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromPreloadedModules().
| bool ModuleList::AppendIfNeeded | ( | const ModuleList & | module_list | ) |
Definition at line 306 of file ModuleList.cpp.
References AppendIfNeeded(), m_modules, and ModuleList().
|
protected |
Definition at line 219 of file ModuleList.cpp.
References lldb_private::ObjectFile::eTypeExecutable, lldb_private::ObjectFile::GetType(), m_modules, m_modules_mutex, and m_notifier.
Referenced by Append(), and ReplaceModule().
| void ModuleList::Clear | ( | ) |
Clear the object's state.
Clears the list of modules and releases a reference to each module object and if the reference count goes to zero, the module will be deleted.
Definition at line 421 of file ModuleList.cpp.
References ClearImpl().
Referenced by CreateAllImageInfosPayload(), CommandObjectSourceList::DoExecute(), CommandObjectSourceList::FindMatchingFunctions(), CommandObjectSourceList::FindMatchingFunctionSymbols(), and DynamicLoaderMacOS::NotifyBreakpointHit().
|
protected |
Definition at line 425 of file ModuleList.cpp.
References m_modules, m_modules_mutex, and m_notifier.
| void ModuleList::Destroy | ( | ) |
Clear the object's state.
Clears the list of modules and releases a reference to each module object and if the reference count goes to zero, the module will be deleted. Also release all memory that might be held by any collection classes (like std::vector)
Definition at line 423 of file ModuleList.cpp.
References ClearImpl().
| void ModuleList::Dump | ( | Stream * | s | ) | const |
Dump the description of each module contained in this list.
Dump the description of each module contained in this list to the supplied stream s.
| [in] | s | The stream to which to dump the object description. |
Definition at line 675 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
| void ModuleList::FindAddressesForLine | ( | const lldb::TargetSP | target_sp, |
| const FileSpec & | file, | ||
| uint32_t | line, | ||
| Function * | function, | ||
| std::vector< Address > & | output_local, | ||
| std::vector< Address > & | output_extern ) |
Find addresses by file/line.
| [in] | target_sp | The target the addresses are desired for. |
| [in] | file | Source file to locate. |
| [in] | line | Source line to locate. |
| [in] | function | Optional filter function. Addresses within this function will be added to the 'local' list. All others will be added to the 'extern' list. |
| [out] | output_local | All matching addresses within 'function' |
| [out] | output_extern | All matching addresses not within 'function' |
Definition at line 642 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
Referenced by lldb_private::Thread::JumpToLine().
| void ModuleList::FindCompileUnits | ( | const FileSpec & | path, |
| SymbolContextList & | sc_list ) const |
Find compile units by partial or full path.
Finds all compile units that match path in all of the modules and returns the results in sc_list.
| [in] | path | The name of the compile unit we are looking for. |
| [out] | sc_list | A symbol context list that gets filled in with all of the matches. |
Definition at line 517 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
Referenced by CommandObjectTargetVariable::DoExecute().
| ModuleSP ModuleList::FindFirstModule | ( | const ModuleSpec & | module_spec | ) | const |
Finds the first module whose file specification matches module_spec.
Definition at line 654 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingPreloadedModules(), CommandObjectTargetSymbolsAdd::AddSymbolsForFile(), CommandObjectTargetVariable::DoExecute(), lldb_private::SymbolContext::FindBestGlobalDataSymbol(), lldb_private::DynamicLoader::FindModuleViaTarget(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), DynamicLoaderHexagonDYLD::RefreshModules(), DynamicLoaderPOSIXDYLD::RefreshModules(), lldb_private::Symbol::ResolveReExportedSymbolInModuleSpec(), and lldb_private::BreakpointResolverAddress::SearchCallback().
| void ModuleList::FindFunctions | ( | const RegularExpression & | name, |
| const ModuleFunctionSearchOptions & | options, | ||
| SymbolContextList & | sc_list ) |
Definition at line 509 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
| void lldb_private::ModuleList::FindFunctions | ( | ConstString | name, |
| lldb::FunctionNameType | name_type_mask, | ||
| const ModuleFunctionSearchOptions & | options, | ||
| SymbolContextList & | sc_list ) const |
References ModuleList().
Referenced by CommandObjectTargetModulesShowUnwind::DoExecute(), CommandObjectSourceInfo::DumpLinesInFunctions(), lldb_private::IRExecutionUnit::FindInSymbols(), CommandObjectSourceList::FindMatchingFunctions(), lldb_private::CommandObjectDisassemble::GetNameRanges(), lldb_private::InferiorCallMmap(), lldb_private::InferiorCallMunmap(), and lldb_private::ClangExpressionDeclMap::LookupFunction().
| void ModuleList::FindFunctionSymbols | ( | ConstString | name, |
| lldb::FunctionNameType | name_type_mask, | ||
| SymbolContextList & | sc_list ) |
Definition at line 480 of file ModuleList.cpp.
References lldb::eLanguageTypeUnknown, lldb_private::SymbolContextList::GetSize(), m_modules, m_modules_mutex, and lldb_private::Module::LookupInfo::MakeLookupInfos().
Referenced by CommandObjectSourceInfo::DumpLinesInFunctions(), CommandObjectSourceList::FindMatchingFunctionSymbols(), lldb_private::platform_android::PlatformAndroid::GetLibdlFunctionDeclarations(), and lldb_private::DirectCallEdge::ParseSymbolFileAndResolve().
| void ModuleList::FindGlobalVariables | ( | const RegularExpression & | regex, |
| size_t | max_matches, | ||
| VariableList & | variable_list ) const |
Find global and static variables by regular expression.
| [in] | regex | A regular expression to use when matching the name. |
| [in] | max_matches | Allow the number of matches to be limited to max_matches. Specify UINT32_MAX to get all possible matches. |
| [in] | variable_list | A list of variables that gets the matches appended to. |
Definition at line 533 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
| void ModuleList::FindGlobalVariables | ( | ConstString | name, |
| size_t | max_matches, | ||
| VariableList & | variable_list ) const |
Find global and static variables by name.
| [in] | name | The name of the global or static variable we are looking for. |
| [in] | max_matches | Allow the number of matches to be limited to max_matches. Specify UINT32_MAX to get all possible matches. |
| [in] | variable_list | A list of variables that gets the matches appended to. |
Definition at line 524 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
Referenced by CommandObjectTargetVariable::DoExecute(), lldb_private::ClangExpressionDeclMap::FindGlobalVariable(), and CommandObjectTargetVariable::GetVariableCallback().
Definition at line 566 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
Referenced by DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), and DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule().
Definition at line 584 of file ModuleList.cpp.
References lldb_private::UUID::IsValid(), m_modules, and m_modules_mutex.
| ModuleSP ModuleList::FindModule | ( | lldb::user_id_t | uid | ) | const |
Find a module by LLDB-specific unique identifier.
| [in] | uid | The UID of the module assigned to it on construction. |
uid. Returns nullptr if no such module could be found. Definition at line 601 of file ModuleList.cpp.
References lldb_private::Continue, ForEach(), and lldb_private::Stop.
| void ModuleList::FindModules | ( | const ModuleSpec & | module_spec, |
| ModuleList & | matching_module_list ) const |
Finds modules whose file specification matches module_spec.
| [in] | module_spec | A file specification object to match against the Module's file specifications. If module_spec does not have directory information, matches will occur by matching only the basename of any modules in this list. If this value is NULL, then file specifications won't be compared when searching for matching modules. |
| [out] | matching_module_list | A module list that gets filled in with any modules that match the search criteria. |
Definition at line 557 of file ModuleList.cpp.
References Append(), m_modules, m_modules_mutex, and ModuleList().
Referenced by CommandObjectTargetSymbolsAdd::AddModuleSymbols(), CommandObjectSourceInfo::DoExecute(), CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesLoad::DoExecute(), CommandObjectSourceList::FindMatchingFunctions(), CommandObjectSourceList::FindMatchingFunctionSymbols(), FindModulesByName(), and lldb_private::Target::ModuleIsExcludedForUnconstrainedSearches().
|
static |
Definition at line 1038 of file ModuleList.cpp.
References GetSharedModuleList().
|
static |
Definition at line 1033 of file ModuleList.cpp.
References GetSharedModuleList(), and ModuleList().
Referenced by FindModulesByName().
Definition at line 632 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
| void ModuleList::FindSymbolsMatchingRegExAndType | ( | const RegularExpression & | regex, |
| lldb::SymbolType | symbol_type, | ||
| SymbolContextList & | sc_list ) const |
Definition at line 549 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
Referenced by lldb_private::GNUstepObjCRuntime::CreateInstance(), and lldb_private::DynamicLoaderDarwin::FindEquivalentSymbols().
| void ModuleList::FindSymbolsWithNameAndType | ( | ConstString | name, |
| lldb::SymbolType | symbol_type, | ||
| SymbolContextList & | sc_list ) const |
Definition at line 541 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
Referenced by lldb_private::AppleObjCRuntime::CalculateHasNewLiteralsAndIndexing(), lldb_private::GNUstepObjCRuntime::CreateInstance(), lldb_private::SymbolContext::FindBestGlobalDataSymbol(), lldb_private::IRExecutionUnit::FindInSymbols(), DYLDRendezvous::FindMetadata(), HexagonDYLDRendezvous::FindMetadata(), lldb_private::ItaniumABILanguageRuntime::GetExceptionObjectForThread(), lldb_private::AppleObjCRuntime::GetPrintForDebuggerAddr(), DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), JITLoaderGDB::GetSymbolAddress(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), lldb_private::AppleObjCRuntimeV2::GetValuesForGlobalCFBooleans(), lldb_private::ObjCLanguageRuntime::LookupInCompleteClassCache(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ServeSymbolLookups().
| void ModuleList::FindTypes | ( | Module * | search_first, |
| const TypeQuery & | query, | ||
| lldb_private::TypeResults & | results ) const |
Find types using a type-matching object that contains all search parameters.
| [in] | search_first | If non-null, this module will be searched before any other modules. |
| [in] | query | A type matching object that contains all of the details of the type search. |
| [in] | results | Any matching types will be populated into the results object using TypeMap::InsertUnique(...). |
Definition at line 615 of file ModuleList.cpp.
References lldb_private::TypeResults::Done(), lldb_private::Module::FindTypes(), m_modules, and m_modules_mutex.
Referenced by CommandObjectMemoryRead::DoExecute(), lldb_private::ClangASTSource::FindCompleteType(), lldb::SBTarget::FindTypes(), and lldb_private::TypeFormatImpl_EnumType::FormatObject().
| void ModuleList::ForEach | ( | std::function< IterationAction(const lldb::ModuleSP &module_sp)> const & | callback | ) | const |
Applies 'callback' to each module in this ModuleList.
If 'callback' returns false, iteration terminates. The 'module_sp' passed to 'callback' is guaranteed to be non-null.
This function is thread-safe.
Definition at line 1365 of file ModuleList.cpp.
References m_modules, m_modules_mutex, and lldb_private::Stop.
Referenced by lldb_private::minidump::ProcessMinidump::BuildMemoryRegions(), FindModule(), lldb_private::Target::GetOrCreateModule(), lldb_private::GetPreferredAsanModule(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), lldb_private::InstrumentationRuntime::ModulesDidLoad(), and lldb_private::CommandCompletions::ModuleUUIDs().
|
static |
Definition at line 1021 of file ModuleList.cpp.
References GetSharedModuleListInfo().
Referenced by lldb_private::ClangModulesDeclVendor::Create(), lldb_private::Debugger::Debugger(), lldb_private::SymbolLocator::DownloadSymbolFileAsync(), lldb_private::SymbolFile::FindPlugin(), GetFileForModule(), lldb_private::Module::GetIndexCache(), lldb_private::DataFileCache::GetLLDBIndexCachePolicy(), lldb_private::SymbolLocatorDebugSymbols::LocateExecutableObjectFile(), lldb_private::SymbolLocatorDefault::LocateExecutableSymbolFile(), LocateMacOSXFilesUsingDebugSymbols(), and SetupModuleHeaderPaths().
| size_t ModuleList::GetIndexForModule | ( | const Module * | module | ) | const |
Definition at line 753 of file ModuleList.cpp.
References LLDB_INVALID_INDEX32, m_modules, and m_modules_mutex.
Referenced by CommandObjectSourceInfo::DumpLinesInSymbolContexts(), and CommandObjectSourceInfo::GetSymbolContextsForAddress().
| ModuleSP ModuleList::GetModuleAtIndex | ( | size_t | idx | ) | const |
Get the module shared pointer for the module at index idx.
| [in] | idx | An index into this module collection. |
Definition at line 439 of file ModuleList.cpp.
References GetModuleAtIndexUnlocked(), and m_modules_mutex.
Referenced by AddLinkMapSections(), MinidumpFileBuilder::AddModuleList(), CommandObjectTargetSymbolsAdd::AddModuleSymbols(), lldb_private::OptionValueUUID::AutoComplete(), BuildModulesSection(), CreateAllImageInfosPayload(), CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesLoad::DoExecute(), lldb_private::Target::GetEntryPointAddress(), lldb_private::AppleObjCRuntime::GetFoundationVersion(), lldb::SBTarget::GetModuleAtIndexFromEvent(), lldb_private::AppleObjCRuntime::GetObjCModule(), lldb_private::DynamicLoaderDarwin::GetPThreadLibraryModule(), GetSharedModule(), CommandObjectSourceInfo::GetSymbolContextsForAddress(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), lldb_private::Target::ModuleIsExcludedForUnconstrainedSearches(), lldb_private::StructuredDataDarwinLog::ModulesDidLoad(), lldb_private::Target::ModulesDidLoad(), lldb_private::AppleObjCRuntime::ReadObjCLibraryIfNeeded(), lldb_private::ObjCLanguageRuntime::ReadObjCLibraryIfNeeded(), lldb_private::DebuggerStats::ReportStatistics(), lldb_private::DebuggerStats::ResetStatistics(), ScanForGNUstepObjCLibraryCandidate(), and lldb_private::Target::UnloadModuleSections().
| ModuleSP ModuleList::GetModuleAtIndexUnlocked | ( | size_t | idx | ) | const |
Get the module shared pointer for the module at index idx without acquiring the ModuleList mutex.
This MUST already have been acquired with ModuleList::GetMutex and locked for this call to be safe.
| [in] | idx | An index into this module collection. |
Definition at line 444 of file ModuleList.cpp.
References m_modules.
Referenced by CommandObjectTargetModulesList::DoExecute(), and GetModuleAtIndex().
| Module * ModuleList::GetModulePointerAtIndex | ( | size_t | idx | ) | const |
Get the module pointer for the module at index idx.
| [in] | idx | An index into this module collection. |
Definition at line 432 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
Referenced by CommandObjectTargetModulesDumpClangAST::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpSeparateDebugInfoFiles::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesLoad::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), and CommandObjectSourceInfo::DumpLinesForFile().
|
inline |
Definition at line 228 of file ModuleList.h.
References m_modules_mutex.
Referenced by DynamicLoaderMacOS::CanLoadImage(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesDumpSeparateDebugInfoFiles::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), DumpModuleObjfileHeaders(), Modules(), lldb_private::AppleObjCRuntime::ReadObjCLibraryIfNeeded(), lldb_private::ObjCLanguageRuntime::ReadObjCLibraryIfNeeded(), ScanForGNUstepObjCLibraryCandidate(), lldb_private::SearchFilterByModule::Search(), and lldb_private::DynamicLoaderDarwin::UnloadAllImages().
|
static |
Definition at line 1047 of file ModuleList.cpp.
References error(), lldb_private::ObjectFile::eTypeStubLibrary, lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::ModuleSpec::GetArchitecture(), lldb_private::ArchSpec::GetArchitectureName(), lldb_private::UUID::GetAsString(), lldb_private::FileSpec::GetFilename(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::FileSpecList::GetFileSpecAtIndex(), lldb_private::GetLog(), lldb_private::FileSystem::GetModificationTime(), GetModuleAtIndex(), lldb_private::FileSpec::GetPath(), lldb_private::ModuleSpec::GetPlatformFileSpec(), lldb_private::ModuleSpec::GetPlatformSP(), GetSharedModuleList(), lldb_private::FileSpecList::GetSize(), GetSize(), lldb_private::ConstString::GetStringRef(), lldb_private::ModuleSpec::GetSymbolFileSpec(), lldb_private::ModuleSpec::GetTargetSP(), lldb_private::ModuleSpec::GetUUIDPtr(), lldb_private::FileSystem::Instance(), lldb_private::FileSpecList::IsEmpty(), IsEmpty(), lldb_private::ArchSpec::IsValid(), lldb_private::UUID::IsValid(), LLDB_LOGF, lldb_private::PluginManager::LocateExecutableObjectFile(), ModuleList(), lldb_private::Modules, PATH_MAX, lldb_private::FileSystem::Resolve(), and lldb_private::Status.
Referenced by lldb_private::Platform::CallLocateModuleCallbackIfSet(), ProcessElfCore::CanDebug(), ProcessMachCore::CanDebug(), lldb_private::ModuleCache::Get(), lldb_private::Target::GetOrCreateModule(), lldb_private::Platform::GetRemoteSharedModule(), lldb_private::Platform::GetSharedModule(), lldb_private::PlatformAppleSimulator::GetSharedModule(), lldb_private::PlatformRemoteDarwinDevice::GetSharedModule(), lldb_private::PlatformDarwinDevice::GetSharedModuleWithLocalCache(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), lldb_private::Platform::ResolveExecutable(), lldb::SBModule::SBModule(), lldb_private::Target::SetArchitecture(), and lldb_private::plugin::dwarf::SymbolFileDWARF::UpdateExternalModuleListIfNeeded().
| size_t ModuleList::GetSize | ( | ) | const |
Gets the size of the module list.
Definition at line 666 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
Referenced by AddLinkMapSections(), MinidumpFileBuilder::AddModuleList(), lldb_private::DynamicLoaderDarwin::AddModulesUsingPreloadedModules(), CommandObjectTargetSymbolsAdd::AddModuleSymbols(), lldb_private::OptionValueUUID::AutoComplete(), BuildModulesSection(), DynamicLoaderMacOS::CanLoadImage(), CreateAllImageInfosPayload(), CommandObjectSourceInfo::DoExecute(), CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesDumpClangAST::DoExecute(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpSeparateDebugInfoFiles::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesLoad::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), CommandObjectSourceInfo::DumpLinesForFile(), CommandObjectSourceInfo::DumpLinesInSymbolContexts(), DumpModuleObjfileHeaders(), FindModulesByName(), lldb_private::Target::GetEntryPointAddress(), lldb_private::AppleObjCRuntime::GetFoundationVersion(), lldb::SBTarget::GetNumModulesFromEvent(), lldb_private::AppleObjCRuntime::GetObjCModule(), lldb_private::DynamicLoaderDarwin::GetPThreadLibraryModule(), GetSharedModule(), CommandObjectSourceInfo::GetSymbolContextsForAddress(), DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos(), IsEmpty(), ObjectFileMachO::LoadCoreFileImages(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), lldb_private::Target::ModuleIsExcludedForUnconstrainedSearches(), lldb_private::Breakpoint::ModulesChanged(), lldb_private::StructuredDataDarwinLog::ModulesDidLoad(), lldb_private::Target::ModulesDidLoad(), lldb_private::Target::ModulesDidUnload(), DynamicLoaderMacOS::NotifyBreakpointHit(), lldb_private::AppleObjCRuntime::ReadObjCLibraryIfNeeded(), lldb_private::ObjCLanguageRuntime::ReadObjCLibraryIfNeeded(), DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress(), lldb_private::DebuggerStats::ReportStatistics(), lldb_private::DebuggerStats::ResetStatistics(), ScanForGNUstepObjCLibraryCandidate(), lldb_private::Target::SymbolsDidLoad(), lldb_private::DynamicLoaderDarwin::UnloadAllImages(), lldb_private::DynamicLoaderDarwin::UnloadImages(), and lldb_private::Target::UnloadModuleSections().
|
inline |
Definition at line 464 of file ModuleList.h.
References GetSize().
Referenced by CommandObjectTargetSymbolsAdd::AddModuleSymbols(), lldb_private::DynamicLoaderDarwin::GetPThreadLibraryModule(), and GetSharedModule().
| bool ModuleList::LoadScriptingResourcesInTarget | ( | Target * | target, |
| std::list< Status > & | errors, | ||
| Stream & | feedback_stream, | ||
| bool | continue_on_error = true ) |
Definition at line 1329 of file ModuleList.cpp.
References error(), lldb_private::Status::FromErrorStringWithFormat(), m_modules_mutex, ModuleList(), and ModulesNoLocking().
| void ModuleList::LogUUIDAndPaths | ( | Log * | log, |
| const char * | prefix_cstr ) |
Definition at line 681 of file ModuleList.cpp.
References lldb_private::Module::GetArchitecture(), lldb_private::ArchSpec::GetArchitectureName(), lldb_private::UUID::GetAsString(), lldb_private::FileSpec::GetPath(), lldb_private::Module::GetUUID(), LLDB_LOGF, m_modules, and m_modules_mutex.
Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingPreloadedModules(), DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress(), lldb_private::DynamicLoaderDarwin::UnloadAllImages(), and lldb_private::DynamicLoaderDarwin::UnloadImages().
Definition at line 1025 of file ModuleList.cpp.
References GetSharedModuleList().
Referenced by CommandObjectTargetModulesList::PrintModule().
|
inline |
Definition at line 542 of file ModuleList.h.
References GetMutex(), and m_modules.
Referenced by DynamicLoaderMacOS::CanLoadImage(), lldb_private::TargetStats::CollectStats(), DynamicLoaderPOSIXDYLD::DidAttach(), CommandObjectTargetModulesDumpSymtab::DoExecute(), lldb_private::PlatformDarwin::ExtractCrashInfoAnnotations(), lldb_private::CommandObjectDisassemble::GetContainingAddressRanges(), lldb_private::AppleObjCRuntime::GetObjCVersion(), DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), DynamicLoaderStatic::LoadAllImagesAtFileAddresses(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), lldb_private::Breakpoint::ModulesChanged(), DynamicLoaderFreeBSDKernel::ParseKmods(), lldb_private::DebuggerStats::ReportStatistics(), lldb_private::SearchFilter::SearchInModuleList(), and lldb_private::DynamicLoaderDarwin::UnloadAllImages().
|
inline |
Definition at line 548 of file ModuleList.h.
References m_modules.
Referenced by DynamicLoaderMacOS::CanLoadImage(), CommandObjectTargetModulesDumpClangAST::DoExecute(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesDumpSeparateDebugInfoFiles::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), DumpModuleObjfileHeaders(), and LoadScriptingResourcesInTarget().
| const ModuleList & ModuleList::operator= | ( | const ModuleList & | rhs | ) |
Assignment operator.
Copies the module list from rhs into this list.
| [in] | rhs | Another module list object. |
Definition at line 205 of file ModuleList.cpp.
References m_modules, m_modules_mutex, and ModuleList().
| void ModuleList::PreloadSymbols | ( | bool | parallelize | ) | const |
For each module in this ModuleList, preload its symbols.
| [in] | parallelize | If true, all modules will be preloaded in parallel. |
Definition at line 1397 of file ModuleList.cpp.
References lldb_private::Debugger::GetThreadPool(), m_modules, and m_modules_mutex.
Referenced by lldb_private::Target::ModulesDidLoad().
| bool ModuleList::Remove | ( | const lldb::ModuleSP & | module_sp, |
| bool | notify = true ) |
Remove a module from the module list.
| [in] | module_sp | A shared pointer to a module to remove from this collection. |
| [in] | notify | If true, and a notifier function is set, the notifier function will be called. Defaults to true. |
When this ModuleList is the Target's ModuleList, the notifier function is Target::ModulesDidUnload – the call to ModulesDidUnload may be deferred when removing multiple Modules from the Target, but it must be called at the end, before resuming execution.
Definition at line 341 of file ModuleList.cpp.
References RemoveImpl().
Referenced by lldb_private::IRExecutionUnit::FindInSymbols(), lldb_private::minidump::ProcessMinidump::GetOrCreateModule(), DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), JITLoaderGDB::ReadJITDescriptorImpl(), DynamicLoaderHexagonDYLD::RefreshModules(), DynamicLoaderPOSIXDYLD::RefreshModules(), Remove(), and lldb_private::DynamicLoaderDarwin::UnloadAllImages().
| size_t ModuleList::Remove | ( | ModuleList & | module_list | ) |
Definition at line 408 of file ModuleList.cpp.
References m_modules, m_modules_mutex, m_notifier, ModuleList(), and Remove().
| bool ModuleList::RemoveIfOrphaned | ( | const lldb::ModuleWP | module_ptr | ) |
Definition at line 355 of file ModuleList.cpp.
References kUseCountModuleListOrphaned, m_modules, m_modules_mutex, and RemoveImpl().
|
protected |
|
protected |
Definition at line 315 of file ModuleList.cpp.
References m_modules, m_modules_mutex, and m_notifier.
Referenced by Remove(), RemoveIfOrphaned(), RemoveOrphans(), ReplaceEquivalent(), and ReplaceModule().
| size_t ModuleList::RemoveOrphans | ( | bool | mandatory | ) |
Definition at line 375 of file ModuleList.cpp.
References kUseCountModuleListOrphaned, m_modules, m_modules_mutex, and RemoveImpl().
|
static |
Definition at line 1042 of file ModuleList.cpp.
References GetSharedModuleList().
Referenced by CommandObjectTargetDelete::DoExecute(), lldb::SBModule::GarbageCollectAllocatedModules(), and lldb::SBDebugger::MemoryPressureDetected().
|
static |
Definition at line 1321 of file ModuleList.cpp.
References GetSharedModuleList().
|
static |
Definition at line 1325 of file ModuleList.cpp.
References GetSharedModuleList().
Referenced by lldb_private::Target::GetOrCreateModule().
| void ModuleList::ReplaceEquivalent | ( | const lldb::ModuleSP & | module_sp, |
| llvm::SmallVectorImpl< lldb::ModuleSP > * | old_modules = nullptr ) |
Append a module to the module list and remove any equivalent modules.
Equivalent modules are ones whose file, platform file and architecture matches.
Replaces the module to the collection.
| [in] | module_sp | A shared pointer to a module to replace in this collection. |
| [in] | old_modules | Optional pointer to a vector which, if provided, will have shared pointers to the replaced module(s) appended to it. |
Definition at line 258 of file ModuleList.cpp.
References Append(), lldb_private::ModuleSpec::GetPlatformFileSpec(), m_modules, m_modules_mutex, and RemoveImpl().
| bool ModuleList::ReplaceModule | ( | const lldb::ModuleSP & | old_module_sp, |
| const lldb::ModuleSP & | new_module_sp ) |
Definition at line 345 of file ModuleList.cpp.
References AppendImpl(), m_notifier, and RemoveImpl().
| bool ModuleList::ResolveFileAddress | ( | lldb::addr_t | vm_addr, |
| Address & | so_addr ) const |
Definition at line 698 of file ModuleList.cpp.
References m_modules, and m_modules_mutex.
Referenced by ResolveAddress().
| uint32_t ModuleList::ResolveSymbolContextForAddress | ( | const Address & | so_addr, |
| lldb::SymbolContextItem | resolve_scope, | ||
| SymbolContext & | sc ) const |
Resolve the symbol context for the given address. (const Address&,uint32_t,SymbolContext&)
Tries to resolve the matching symbol context based on a lookup from the current symbol vendor. If the lazy lookup fails, an attempt is made to parse the eh_frame section to handle stripped symbols. If this fails, an attempt is made to resolve the symbol to the previous address to handle the case of a function with a tail call.
Use properties of the modified SymbolContext to inspect any resolved target, module, compilation unit, symbol, function, function block or line entry. Use the return value to determine which of these properties have been modified.
| [in] | so_addr | A load address to resolve. |
| [in] | resolve_scope | The scope that should be resolved (see SymbolContext::Scope). A combination of flags from the enumeration SymbolContextItem requesting a resolution depth. Note that the flags that are actually resolved may be a superset of the requested flags. For instance, eSymbolContextSymbol requires resolution of eSymbolContextModule, and eSymbolContextFunction requires eSymbolContextSymbol. |
| [out] | sc | The SymbolContext that is modified based on symbol resolution. |
| [in] | resolve_tail_call_address | Determines if so_addr should resolve to a symbol in the case of a function whose last instruction is a call. In this case, the PC can be one past the address range of the function. |
Definition at line 710 of file ModuleList.cpp.
References lldb_private::Address::GetModule(), m_modules, and m_modules_mutex.
Referenced by lldb_private::Address::Dump(), and lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo().
| uint32_t ModuleList::ResolveSymbolContextForFilePath | ( | const char * | file_path, |
| uint32_t | line, | ||
| bool | check_inlines, | ||
| lldb::SymbolContextItem | resolve_scope, | ||
| SymbolContextList & | sc_list ) const |
Resolve items in the symbol context for a given file and line. (const char*,uint32_t,bool,uint32_t,SymbolContextList&)
Tries to resolve file_path and line to a list of matching symbol contexts.
The line table entries contains addresses that can be used to further resolve the values in each match: the function, block, symbol. Care should be taken to minimize the amount of information that is requested to only what is needed – typically the module, compile unit, line table and line table entry are sufficient.
| [in] | file_path | A path to a source file to match. If file_path does not specify a directory, then this query will match all files whose base filename matches. If file_path does specify a directory, the fullpath to the file must match. |
| [in] | line | The source line to match, or zero if just the compile unit should be resolved. |
| [in] | check_inlines | Check for inline file and line number matches. This option should be used sparingly as it will cause all line tables for every compile unit to be parsed and searched for matching inline file entries. |
| [in] | resolve_scope | The scope that should be resolved (see SymbolContext::Scope). |
| [out] | sc_list | A symbol context list that gets matching symbols contexts appended to. |
Definition at line 733 of file ModuleList.cpp.
References ResolveSymbolContextsForFileSpec().
| uint32_t ModuleList::ResolveSymbolContextsForFileSpec | ( | const FileSpec & | file_spec, |
| uint32_t | line, | ||
| bool | check_inlines, | ||
| lldb::SymbolContextItem | resolve_scope, | ||
| SymbolContextList & | sc_list ) const |
Resolve items in the symbol context for a given file and line. (const FileSpec&,uint32_t,bool,uint32_t,SymbolContextList&)
Tries to resolve file_spec and line to a list of matching symbol contexts.
The line table entries contains addresses that can be used to further resolve the values in each match: the function, block, symbol. Care should be taken to minimize the amount of information that is requested to only what is needed – typically the module, compile unit, line table and line table entry are sufficient.
| [in] | file_spec | A file spec to a source file to match. If file_path does not specify a directory, then this query will match all files whose base filename matches. If file_path does specify a directory, the fullpath to the file must match. |
| [in] | line | The source line to match, or zero if just the compile unit should be resolved. |
| [in] | check_inlines | Check for inline file and line number matches. This option should be used sparingly as it will cause all line tables for every compile unit to be parsed and searched for matching inline file entries. |
| [in] | resolve_scope | The scope that should be resolved (see SymbolContext::Scope). |
| [out] | sc_list | A symbol context list that gets filled in with all of the matches. |
Definition at line 741 of file ModuleList.cpp.
References lldb_private::SymbolContextList::GetSize(), m_modules, and m_modules_mutex.
Referenced by CommandObjectSourceList::DoExecute(), and ResolveSymbolContextForFilePath().
| void ModuleList::Swap | ( | ModuleList & | other | ) |
Atomically swaps the contents of this module list with other.
Definition at line 1390 of file ModuleList.cpp.
References m_modules, m_modules_mutex, and ModuleList().
|
staticconstexprprotected |
An orphaned module that lives only in the ModuleList has a count of 1.
Definition at line 537 of file ModuleList.h.
Referenced by RemoveIfOrphaned(), and RemoveOrphans().
|
protected |
The collection of modules.
Definition at line 531 of file ModuleList.h.
Referenced by AnyOf(), Append(), AppendIfNeeded(), AppendIfNeeded(), AppendImpl(), ClearImpl(), Dump(), FindAddressesForLine(), FindCompileUnits(), FindFirstModule(), FindFunctions(), FindFunctionSymbols(), FindGlobalVariables(), FindGlobalVariables(), FindModule(), FindModule(), FindModules(), FindSourceFile(), FindSymbolsMatchingRegExAndType(), FindSymbolsWithNameAndType(), FindTypes(), ForEach(), GetIndexForModule(), GetModuleAtIndexUnlocked(), GetModulePointerAtIndex(), GetSize(), LogUUIDAndPaths(), ModuleList(), ModuleList(), ModuleList(), Modules(), ModulesNoLocking(), operator=(), PreloadSymbols(), Remove(), RemoveIfOrphaned(), RemoveImpl(), RemoveOrphans(), ReplaceEquivalent(), ResolveFileAddress(), ResolveSymbolContextForAddress(), ResolveSymbolContextsForFileSpec(), and Swap().
|
mutableprotected |
Definition at line 532 of file ModuleList.h.
Referenced by AnyOf(), AppendIfNeeded(), AppendImpl(), ClearImpl(), Dump(), FindAddressesForLine(), FindCompileUnits(), FindFirstModule(), FindFunctions(), FindFunctionSymbols(), FindGlobalVariables(), FindGlobalVariables(), FindModule(), FindModule(), FindModules(), FindSourceFile(), FindSymbolsMatchingRegExAndType(), FindSymbolsWithNameAndType(), FindTypes(), ForEach(), GetIndexForModule(), GetModuleAtIndex(), GetModulePointerAtIndex(), GetMutex(), GetSize(), LoadScriptingResourcesInTarget(), LogUUIDAndPaths(), ModuleList(), ModuleList(), ModuleList(), operator=(), PreloadSymbols(), Remove(), RemoveIfOrphaned(), RemoveImpl(), RemoveOrphans(), ReplaceEquivalent(), ResolveFileAddress(), ResolveSymbolContextForAddress(), ResolveSymbolContextsForFileSpec(), and Swap().
|
protected |
Definition at line 534 of file ModuleList.h.
Referenced by AppendImpl(), ClearImpl(), ModuleList(), Remove(), RemoveImpl(), and ReplaceModule().