LLDB mainline
lldb_private::LoadedModuleList Class Reference

The images mapped into the inferior. More...

#include <LoadedModuleList.h>

Public Member Functions

void Add (const FileSpec &file_spec, lldb::addr_t base_addr)
FileSpec Remove (lldb::addr_t base_addr)
 Drop the mapping at base_addr.
std::optional< lldb::addr_t > GetBaseAddress (const FileSpec &file_spec) const
 The address file_spec was first mapped at.
const FileSpec * FindFile (const FileSpec &file_spec) const
bool IsEmpty () const
size_t GetSize () const
Container::const_iterator begin () const
Container::const_iterator end () const

Private Types

using Container = std::map<FileSpec, llvm::SmallVector<lldb::addr_t, 1>>

Private Attributes

Container m_modules

Detailed Description

The images mapped into the inferior.

The same file can be mapped more than once, and an UNLOAD_DLL_DEBUG_EVENT only carries a base address, so every mapping has to be resolvable back to its file.

Definition at line 25 of file LoadedModuleList.h.

Member Typedef Documentation

◆ Container

using lldb_private::LoadedModuleList::Container = std::map<FileSpec, llvm::SmallVector<lldb::addr_t, 1>>
private

Definition at line 29 of file LoadedModuleList.h.

Member Function Documentation

◆ Add()

void lldb_private::LoadedModuleList::Add ( const FileSpec & file_spec,
lldb::addr_t base_addr )
inline

Definition at line 32 of file LoadedModuleList.h.

References m_modules.

◆ begin()

Container::const_iterator lldb_private::LoadedModuleList::begin ( ) const
inline

Definition at line 75 of file LoadedModuleList.h.

References m_modules.

◆ end()

Container::const_iterator lldb_private::LoadedModuleList::end ( ) const
inline

Definition at line 76 of file LoadedModuleList.h.

References m_modules.

◆ FindFile()

const FileSpec * lldb_private::LoadedModuleList::FindFile ( const FileSpec & file_spec) const
inline
Returns
the stored spelling of file_spec, or nullptr if it is not mapped.

Definition at line 67 of file LoadedModuleList.h.

References m_modules.

◆ GetBaseAddress()

std::optional< lldb::addr_t > lldb_private::LoadedModuleList::GetBaseAddress ( const FileSpec & file_spec) const
inline

The address file_spec was first mapped at.

That is the mapping the loader bound the image's imports against, so it is the one to report.

Definition at line 58 of file LoadedModuleList.h.

References m_modules.

◆ GetSize()

size_t lldb_private::LoadedModuleList::GetSize ( ) const
inline

Definition at line 73 of file LoadedModuleList.h.

References m_modules.

◆ IsEmpty()

bool lldb_private::LoadedModuleList::IsEmpty ( ) const
inline

Definition at line 72 of file LoadedModuleList.h.

References m_modules.

◆ Remove()

FileSpec lldb_private::LoadedModuleList::Remove ( lldb::addr_t base_addr)
inline

Drop the mapping at base_addr.

Returns
the file if that was its last mapping, an empty FileSpec otherwise.

Definition at line 38 of file LoadedModuleList.h.

References m_modules.

Member Data Documentation

◆ m_modules

Container lldb_private::LoadedModuleList::m_modules
private

Definition at line 79 of file LoadedModuleList.h.

Referenced by Add(), begin(), end(), FindFile(), GetBaseAddress(), GetSize(), IsEmpty(), and Remove().


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