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

#include <MemoryRegionInfo.h>

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

Public Types

enum  OptionalBool { eDontKnow = -1, eNo = 0, eYes = 1 }
 
typedef Range< lldb::addr_t, lldb::addr_tRangeType
 

Public Member Functions

 MemoryRegionInfo ()=default
 
 MemoryRegionInfo (RangeType range, OptionalBool read, OptionalBool write, OptionalBool execute, OptionalBool shared, OptionalBool mapped, ConstString name, OptionalBool flash, lldb::offset_t blocksize, OptionalBool memory_tagged, OptionalBool stack_memory)
 
RangeTypeGetRange ()
 
void Clear ()
 
const RangeTypeGetRange () const
 
OptionalBool GetReadable () const
 
OptionalBool GetWritable () const
 
OptionalBool GetExecutable () const
 
OptionalBool GetShared () const
 
OptionalBool GetMapped () const
 
ConstString GetName () const
 
OptionalBool GetMemoryTagged () const
 
void SetReadable (OptionalBool val)
 
void SetWritable (OptionalBool val)
 
void SetExecutable (OptionalBool val)
 
void SetShared (OptionalBool val)
 
void SetMapped (OptionalBool val)
 
void SetName (const char *name)
 
OptionalBool GetFlash () const
 
void SetFlash (OptionalBool val)
 
lldb::offset_t GetBlocksize () const
 
void SetBlocksize (lldb::offset_t blocksize)
 
void SetMemoryTagged (OptionalBool val)
 
uint32_t GetLLDBPermissions () const
 
void SetLLDBPermissions (uint32_t permissions)
 
bool operator== (const MemoryRegionInfo &rhs) const
 
bool operator!= (const MemoryRegionInfo &rhs) const
 
int GetPageSize () const
 Get the target system's VM page size in bytes. More...
 
const llvm::Optional< std::vector< lldb::addr_t > > & GetDirtyPageList () const
 Get a vector of target VM pages that are dirty – that have been modified – within this memory region. More...
 
OptionalBool IsStackMemory () const
 
void SetIsStackMemory (OptionalBool val)
 
void SetPageSize (int pagesize)
 
void SetDirtyPageList (std::vector< lldb::addr_t > pagelist)
 

Protected Attributes

RangeType m_range
 
OptionalBool m_read = eDontKnow
 
OptionalBool m_write = eDontKnow
 
OptionalBool m_execute = eDontKnow
 
OptionalBool m_shared = eDontKnow
 
OptionalBool m_mapped = eDontKnow
 
ConstString m_name
 
OptionalBool m_flash = eDontKnow
 
lldb::offset_t m_blocksize = 0
 
OptionalBool m_memory_tagged = eDontKnow
 
OptionalBool m_is_stack_memory = eDontKnow
 
int m_pagesize = 0
 
llvm::Optional< std::vector< lldb::addr_t > > m_dirty_pages
 

Detailed Description

Definition at line 21 of file MemoryRegionInfo.h.

Member Typedef Documentation

◆ RangeType

Definition at line 23 of file MemoryRegionInfo.h.

Member Enumeration Documentation

◆ OptionalBool

Enumerator
eDontKnow 
eNo 
eYes 

Definition at line 25 of file MemoryRegionInfo.h.

Constructor & Destructor Documentation

◆ MemoryRegionInfo() [1/2]

lldb_private::MemoryRegionInfo::MemoryRegionInfo ( )
default

Referenced by Clear().

◆ MemoryRegionInfo() [2/2]

lldb_private::MemoryRegionInfo::MemoryRegionInfo ( RangeType  range,
OptionalBool  read,
OptionalBool  write,
OptionalBool  execute,
OptionalBool  shared,
OptionalBool  mapped,
ConstString  name,
OptionalBool  flash,
lldb::offset_t  blocksize,
OptionalBool  memory_tagged,
OptionalBool  stack_memory 
)
inline

Definition at line 28 of file MemoryRegionInfo.h.

Member Function Documentation

◆ Clear()

void lldb_private::MemoryRegionInfo::Clear ( )
inline

◆ GetBlocksize()

lldb::offset_t lldb_private::MemoryRegionInfo::GetBlocksize ( ) const
inline

◆ GetDirtyPageList()

const llvm::Optional<std::vector<lldb::addr_t> >& lldb_private::MemoryRegionInfo::GetDirtyPageList ( ) const
inline

Get a vector of target VM pages that are dirty – that have been modified – within this memory region.

This is an Optional return value; it will only be available if the remote stub was able to detail this.

Definition at line 123 of file MemoryRegionInfo.h.

References m_dirty_pages.

Referenced by CommandObjectMemoryRegion::DumpRegion(), and ObjectFileMachO::SaveCore().

◆ GetExecutable()

OptionalBool lldb_private::MemoryRegionInfo::GetExecutable ( ) const
inline

◆ GetFlash()

OptionalBool lldb_private::MemoryRegionInfo::GetFlash ( ) const
inline

◆ GetLLDBPermissions()

uint32_t lldb_private::MemoryRegionInfo::GetLLDBPermissions ( ) const
inline

Definition at line 82 of file MemoryRegionInfo.h.

References m_execute, m_read, and m_write.

Referenced by MinidumpFileBuilder::AddMemoryList(), and findStackHelper().

◆ GetMapped()

OptionalBool lldb_private::MemoryRegionInfo::GetMapped ( ) const
inline

◆ GetMemoryTagged()

OptionalBool lldb_private::MemoryRegionInfo::GetMemoryTagged ( ) const
inline

◆ GetName()

ConstString lldb_private::MemoryRegionInfo::GetName ( ) const
inline

◆ GetPageSize()

int lldb_private::MemoryRegionInfo::GetPageSize ( ) const
inline

Get the target system's VM page size in bytes.

Returns
0 is returned if this information is unavailable.

Definition at line 117 of file MemoryRegionInfo.h.

References m_pagesize.

Referenced by ObjectFileMachO::SaveCore().

◆ GetRange() [1/2]

RangeType& lldb_private::MemoryRegionInfo::GetRange ( )
inline

Definition at line 38 of file MemoryRegionInfo.h.

References m_range.

Referenced by MinidumpFileBuilder::AddMemoryList(), lldb_private::minidump::ProcessMinidump::BuildMemoryRegions(), CheckForLinuxExecutable(), CreateRegionsCacheFromMemory64List(), CreateRegionsCacheFromMemoryInfoList(), CreateRegionsCacheFromMemoryList(), CommandObjectMemoryRegion::DoExecute(), ProcessMachCore::DoGetMemoryRegionInfo(), ProcessElfCore::DoGetMemoryRegionInfo(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoWriteMemory(), CommandObjectMemoryRegion::DumpRegion(), lldb_private::IRMemoryMap::FindSpace(), findStackHelper(), lldb_private::process_gdb_remote::ProcessGDBRemote::FlashErase(), lldb_private::process_netbsd::NativeProcessNetBSD::GetMemoryRegionInfo(), lldb_private::process_freebsd::NativeProcessFreeBSD::GetMemoryRegionInfo(), lldb_private::process_linux::NativeProcessLinux::GetMemoryRegionInfo(), lldb_private::ProcessDebugger::GetMemoryRegionInfo(), lldb_private::minidump::MinidumpParser::GetMemoryRegionInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetMemoryRegionInfo(), lldb_private::ScriptedProcess::GetMemoryRegions(), lldb_private::Process::GetMemoryRegions(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qMemoryRegionInfo(), DynamicLoaderPOSIXDYLD::LoadModuleAtAddress(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::LoadQXferMemoryMap(), DynamicLoaderPOSIXDYLD::LoadVDSO(), lldb_private::MemoryTagManagerAArch64MTE::MakeTaggedRange(), lldb_private::operator<(), ParseMemoryRegionInfoFromProcMapsLine(), lldb_private::process_netbsd::NativeProcessNetBSD::PopulateMemoryRegionCache(), lldb_private::process_freebsd::NativeProcessFreeBSD::PopulateMemoryRegionCache(), and ObjectFileMachO::SaveCore().

◆ GetRange() [2/2]

const RangeType& lldb_private::MemoryRegionInfo::GetRange ( ) const
inline

Definition at line 42 of file MemoryRegionInfo.h.

References m_range.

◆ GetReadable()

OptionalBool lldb_private::MemoryRegionInfo::GetReadable ( ) const
inline

◆ GetShared()

OptionalBool lldb_private::MemoryRegionInfo::GetShared ( ) const
inline

Definition at line 50 of file MemoryRegionInfo.h.

References m_shared.

◆ GetWritable()

OptionalBool lldb_private::MemoryRegionInfo::GetWritable ( ) const
inline

◆ IsStackMemory()

OptionalBool lldb_private::MemoryRegionInfo::IsStackMemory ( ) const
inline

Definition at line 127 of file MemoryRegionInfo.h.

References m_is_stack_memory.

Referenced by ObjectFileMachO::SaveCore().

◆ operator!=()

bool lldb_private::MemoryRegionInfo::operator!= ( const MemoryRegionInfo rhs) const
inline

Definition at line 112 of file MemoryRegionInfo.h.

◆ operator==()

bool lldb_private::MemoryRegionInfo::operator== ( const MemoryRegionInfo rhs) const
inline

◆ SetBlocksize()

void lldb_private::MemoryRegionInfo::SetBlocksize ( lldb::offset_t  blocksize)
inline

◆ SetDirtyPageList()

void lldb_private::MemoryRegionInfo::SetDirtyPageList ( std::vector< lldb::addr_t pagelist)
inline

◆ SetExecutable()

void lldb_private::MemoryRegionInfo::SetExecutable ( OptionalBool  val)
inline

◆ SetFlash()

void lldb_private::MemoryRegionInfo::SetFlash ( OptionalBool  val)
inline

◆ SetIsStackMemory()

void lldb_private::MemoryRegionInfo::SetIsStackMemory ( OptionalBool  val)
inline

◆ SetLLDBPermissions()

void lldb_private::MemoryRegionInfo::SetLLDBPermissions ( uint32_t  permissions)
inline

Definition at line 95 of file MemoryRegionInfo.h.

References eNo, eYes, m_execute, m_read, and m_write.

◆ SetMapped()

void lldb_private::MemoryRegionInfo::SetMapped ( OptionalBool  val)
inline

◆ SetMemoryTagged()

void lldb_private::MemoryRegionInfo::SetMemoryTagged ( OptionalBool  val)
inline

◆ SetName()

void lldb_private::MemoryRegionInfo::SetName ( const char *  name)
inline

◆ SetPageSize()

void lldb_private::MemoryRegionInfo::SetPageSize ( int  pagesize)
inline

◆ SetReadable()

void lldb_private::MemoryRegionInfo::SetReadable ( OptionalBool  val)
inline

◆ SetShared()

void lldb_private::MemoryRegionInfo::SetShared ( OptionalBool  val)
inline

Definition at line 64 of file MemoryRegionInfo.h.

References m_shared.

Referenced by ParseMemoryRegionInfoFromProcMapsLine().

◆ SetWritable()

void lldb_private::MemoryRegionInfo::SetWritable ( OptionalBool  val)
inline

Member Data Documentation

◆ m_blocksize

lldb::offset_t lldb_private::MemoryRegionInfo::m_blocksize = 0
protected

Definition at line 148 of file MemoryRegionInfo.h.

Referenced by GetBlocksize(), operator==(), and SetBlocksize().

◆ m_dirty_pages

llvm::Optional<std::vector<lldb::addr_t> > lldb_private::MemoryRegionInfo::m_dirty_pages
protected

Definition at line 152 of file MemoryRegionInfo.h.

Referenced by GetDirtyPageList(), and SetDirtyPageList().

◆ m_execute

OptionalBool lldb_private::MemoryRegionInfo::m_execute = eDontKnow
protected

◆ m_flash

OptionalBool lldb_private::MemoryRegionInfo::m_flash = eDontKnow
protected

Definition at line 147 of file MemoryRegionInfo.h.

Referenced by GetFlash(), operator==(), and SetFlash().

◆ m_is_stack_memory

OptionalBool lldb_private::MemoryRegionInfo::m_is_stack_memory = eDontKnow
protected

Definition at line 150 of file MemoryRegionInfo.h.

Referenced by IsStackMemory(), operator==(), and SetIsStackMemory().

◆ m_mapped

OptionalBool lldb_private::MemoryRegionInfo::m_mapped = eDontKnow
protected

Definition at line 145 of file MemoryRegionInfo.h.

Referenced by GetMapped(), operator==(), and SetMapped().

◆ m_memory_tagged

OptionalBool lldb_private::MemoryRegionInfo::m_memory_tagged = eDontKnow
protected

Definition at line 149 of file MemoryRegionInfo.h.

Referenced by GetMemoryTagged(), operator==(), and SetMemoryTagged().

◆ m_name

ConstString lldb_private::MemoryRegionInfo::m_name
protected

Definition at line 146 of file MemoryRegionInfo.h.

Referenced by GetName(), operator==(), and SetName().

◆ m_pagesize

int lldb_private::MemoryRegionInfo::m_pagesize = 0
protected

Definition at line 151 of file MemoryRegionInfo.h.

Referenced by GetPageSize(), operator==(), and SetPageSize().

◆ m_range

RangeType lldb_private::MemoryRegionInfo::m_range
protected

Definition at line 140 of file MemoryRegionInfo.h.

Referenced by GetRange(), and operator==().

◆ m_read

OptionalBool lldb_private::MemoryRegionInfo::m_read = eDontKnow
protected

◆ m_shared

OptionalBool lldb_private::MemoryRegionInfo::m_shared = eDontKnow
protected

Definition at line 144 of file MemoryRegionInfo.h.

Referenced by GetShared(), operator==(), and SetShared().

◆ m_write

OptionalBool lldb_private::MemoryRegionInfo::m_write = eDontKnow
protected

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