LLDB mainline
DynamicLoaderDarwinKernel::KextImageInfo Class Reference

#include <DynamicLoaderDarwinKernel.h>

Public Types

typedef std::vector< KextImageInfo > collection
typedef collection::iterator iterator
typedef collection::const_iterator const_iterator

Public Member Functions

 KextImageInfo ()
void Clear ()
bool LoadImageAtFileAddress (lldb_private::Process *process)
bool PrepareSearch (lldb_private::Process *process, std::optional< lldb_private::SymbolLocator::Request > &request)
 Determine what the search for this binary needs: its UUID, and whether the Target or the shared module list already has it.
bool LoadLocatedImage (lldb_private::Process *process, std::optional< llvm::Expected< lldb_private::SymbolLocator::Result > > located)
 Add the module to the Target and set its load addresses.
bool LoadImageUsingMemoryModule (lldb_private::Process *process)
 Load this binary on its own: PrepareSearch, then the search, then LoadLocatedImage.
void FindKernel (lldb_private::Target &target, lldb_private::ModuleSpec module_spec)
 Searches for the kernel and sets the module, without SymbolLocator.
bool IsLoaded ()
void SetLoadAddress (lldb::addr_t load_addr)
lldb::addr_t GetLoadAddress () const
lldb_private::UUID GetUUID () const
void SetUUID (const lldb_private::UUID &uuid)
void SetName (const char *)
std::string GetName () const
void SetModule (lldb::ModuleSP module)
lldb::ModuleSP GetModule ()
bool ReadMemoryModule (lldb_private::Process *process)
bool IsKernel () const
void SetIsKernel (bool is_kernel)
uint64_t GetSize () const
void SetSize (uint64_t size)
uint32_t GetProcessStopId () const
void SetProcessStopId (uint32_t stop_id)
bool operator== (const KextImageInfo &rhs) const
uint32_t GetAddressByteSize ()
lldb::ByteOrder GetByteOrder ()
lldb_private::ArchSpec GetArchitecture () const
void PutToLog (lldb_private::Log *log) const

Private Attributes

std::string m_name
lldb::ModuleSP m_module_sp
lldb::ModuleSP m_memory_module_sp
uint32_t m_load_process_stop_id
lldb_private::UUID m_uuid
lldb::addr_t m_load_address = LLDB_INVALID_ADDRESS
uint64_t m_size = 0
bool m_kernel_image

Detailed Description

Definition at line 127 of file DynamicLoaderDarwinKernel.h.

Member Typedef Documentation

◆ collection

◆ const_iterator

Definition at line 225 of file DynamicLoaderDarwinKernel.h.

◆ iterator

Definition at line 224 of file DynamicLoaderDarwinKernel.h.

Constructor & Destructor Documentation

◆ KextImageInfo()

DynamicLoaderDarwinKernel::KextImageInfo::KextImageInfo ( )
inline

Definition at line 129 of file DynamicLoaderDarwinKernel.h.

References m_memory_module_sp, m_module_sp, m_name, and m_uuid.

Referenced by operator==().

Member Function Documentation

◆ Clear()

void DynamicLoaderDarwinKernel::KextImageInfo::Clear ( )
inline

◆ FindKernel()

◆ GetAddressByteSize()

uint32_t DynamicLoaderDarwinKernel::KextImageInfo::GetAddressByteSize ( )

Definition at line 1067 of file DynamicLoaderDarwinKernel.cpp.

References m_memory_module_sp, and m_module_sp.

◆ GetArchitecture()

lldb_private::ArchSpec DynamicLoaderDarwinKernel::KextImageInfo::GetArchitecture ( ) const

Definition at line 1084 of file DynamicLoaderDarwinKernel.cpp.

References m_memory_module_sp, and m_module_sp.

◆ GetByteOrder()

lldb::ByteOrder DynamicLoaderDarwinKernel::KextImageInfo::GetByteOrder ( )

◆ GetLoadAddress()

addr_t DynamicLoaderDarwinKernel::KextImageInfo::GetLoadAddress ( ) const

◆ GetModule()

ModuleSP DynamicLoaderDarwinKernel::KextImageInfo::GetModule ( )

Definition at line 595 of file DynamicLoaderDarwinKernel.cpp.

References m_module_sp.

Referenced by DynamicLoaderDarwinKernel::ParseKextSummaries().

◆ GetName()

std::string DynamicLoaderDarwinKernel::KextImageInfo::GetName ( ) const

Definition at line 638 of file DynamicLoaderDarwinKernel.cpp.

References m_name.

Referenced by operator==(), and DynamicLoaderDarwinKernel::ParseKextSummaries().

◆ GetProcessStopId()

uint32_t DynamicLoaderDarwinKernel::KextImageInfo::GetProcessStopId ( ) const

◆ GetSize()

uint64_t DynamicLoaderDarwinKernel::KextImageInfo::GetSize ( ) const

Definition at line 608 of file DynamicLoaderDarwinKernel.cpp.

References m_size.

◆ GetUUID()

UUID DynamicLoaderDarwinKernel::KextImageInfo::GetUUID ( ) const

Definition at line 646 of file DynamicLoaderDarwinKernel.cpp.

References m_uuid.

Referenced by operator==(), and DynamicLoaderDarwinKernel::ParseKextSummaries().

◆ IsKernel()

bool DynamicLoaderDarwinKernel::KextImageInfo::IsKernel ( ) const

◆ IsLoaded()

bool DynamicLoaderDarwinKernel::KextImageInfo::IsLoaded ( )
inline

◆ LoadImageAtFileAddress()

bool DynamicLoaderDarwinKernel::KextImageInfo::LoadImageAtFileAddress ( lldb_private::Process * process)

◆ LoadImageUsingMemoryModule()

bool DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule ( lldb_private::Process * process)

◆ LoadLocatedImage()

bool DynamicLoaderDarwinKernel::KextImageInfo::LoadLocatedImage ( lldb_private::Process * process,
std::optional< llvm::Expected< lldb_private::SymbolLocator::Result > > located )

◆ operator==()

bool DynamicLoaderDarwinKernel::KextImageInfo::operator== ( const KextImageInfo & rhs) const

◆ PrepareSearch()

bool DynamicLoaderDarwinKernel::KextImageInfo::PrepareSearch ( lldb_private::Process * process,
std::optional< lldb_private::SymbolLocator::Request > & request )

Determine what the search for this binary needs: its UUID, and whether the Target or the shared module list already has it.

For the kernel, the UUID is read from process memory and any kernel with a different UUID is removed from the Target.

Parameters
requestSet to the search to run, or left empty if none is needed.
Returns
Whether the binary can be loaded.

Definition at line 749 of file DynamicLoaderDarwinKernel.cpp.

References lldb_private::ModuleList::Append(), lldb_private::DynamicLoader, lldb_private::ModuleList::FindModule(), lldb_private::ModuleList::FindSharedModule(), lldb_private::Debugger::GetAsyncOutputStream(), lldb_private::Target::GetDebugger(), lldb_private::Target::GetImages(), lldb_private::GetLog(), lldb_private::Target::GetPlatform(), GetProgressDetail(), lldb_private::Process::GetTarget(), is_kernel(), IsKernel(), IsLoaded(), LLDB_LOGF, m_load_address, m_module_sp, m_name, m_uuid, lldb_private::ModuleList::Modules(), ReadMemoryModule(), and lldb_private::ModuleList::Remove().

◆ PutToLog()

void DynamicLoaderDarwinKernel::KextImageInfo::PutToLog ( lldb_private::Log * log) const

◆ ReadMemoryModule()

◆ SetIsKernel()

void DynamicLoaderDarwinKernel::KextImageInfo::SetIsKernel ( bool is_kernel)

Definition at line 729 of file DynamicLoaderDarwinKernel.cpp.

References is_kernel(), and m_kernel_image.

◆ SetLoadAddress()

void DynamicLoaderDarwinKernel::KextImageInfo::SetLoadAddress ( lldb::addr_t load_addr)

Definition at line 599 of file DynamicLoaderDarwinKernel.cpp.

References m_load_address.

◆ SetModule()

void DynamicLoaderDarwinKernel::KextImageInfo::SetModule ( lldb::ModuleSP module)

Definition at line 590 of file DynamicLoaderDarwinKernel.cpp.

References is_kernel(), m_kernel_image, and m_module_sp.

◆ SetName()

void DynamicLoaderDarwinKernel::KextImageInfo::SetName ( const char * name)

Definition at line 634 of file DynamicLoaderDarwinKernel.cpp.

References m_name.

◆ SetProcessStopId()

void DynamicLoaderDarwinKernel::KextImageInfo::SetProcessStopId ( uint32_t stop_id)

Definition at line 620 of file DynamicLoaderDarwinKernel.cpp.

References m_load_process_stop_id.

◆ SetSize()

void DynamicLoaderDarwinKernel::KextImageInfo::SetSize ( uint64_t size)

Definition at line 612 of file DynamicLoaderDarwinKernel.cpp.

References m_size.

◆ SetUUID()

void DynamicLoaderDarwinKernel::KextImageInfo::SetUUID ( const lldb_private::UUID & uuid)

Definition at line 642 of file DynamicLoaderDarwinKernel.cpp.

References m_uuid.

Member Data Documentation

◆ m_kernel_image

bool DynamicLoaderDarwinKernel::KextImageInfo::m_kernel_image
private
Initial value:
=
false

Definition at line 238 of file DynamicLoaderDarwinKernel.h.

Referenced by IsKernel(), ReadMemoryModule(), SetIsKernel(), and SetModule().

◆ m_load_address

lldb::addr_t DynamicLoaderDarwinKernel::KextImageInfo::m_load_address = LLDB_INVALID_ADDRESS
private

◆ m_load_process_stop_id

uint32_t DynamicLoaderDarwinKernel::KextImageInfo::m_load_process_stop_id
private
Initial value:
=
#define UINT32_MAX

Definition at line 231 of file DynamicLoaderDarwinKernel.h.

Referenced by Clear(), GetProcessStopId(), IsLoaded(), LoadImageAtFileAddress(), LoadLocatedImage(), and SetProcessStopId().

◆ m_memory_module_sp

lldb::ModuleSP DynamicLoaderDarwinKernel::KextImageInfo::m_memory_module_sp
private

◆ m_module_sp

◆ m_name

std::string DynamicLoaderDarwinKernel::KextImageInfo::m_name
private

◆ m_size

uint64_t DynamicLoaderDarwinKernel::KextImageInfo::m_size = 0
private

Definition at line 237 of file DynamicLoaderDarwinKernel.h.

Referenced by Clear(), GetSize(), PutToLog(), and SetSize().

◆ m_uuid

lldb_private::UUID DynamicLoaderDarwinKernel::KextImageInfo::m_uuid
private

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