LLDB mainline
lldb::SBMemoryRegionInfo Class Reference

#include <SBMemoryRegionInfo.h>

Public Member Functions

 SBMemoryRegionInfo ()
 SBMemoryRegionInfo (const lldb::SBMemoryRegionInfo &rhs)
 SBMemoryRegionInfo (const char *name, lldb::addr_t begin, lldb::addr_t end, uint32_t permissions, bool mapped, bool stack_memory=false)
 ~SBMemoryRegionInfo ()
const lldb::SBMemoryRegionInfooperator= (const lldb::SBMemoryRegionInfo &rhs)
void Clear ()
lldb::addr_t GetRegionBase ()
 Get the base address of this memory range.
lldb::addr_t GetRegionEnd ()
 Get the end address of this memory range.
bool IsReadable ()
 Check if this memory address is marked readable to the process.
bool IsWritable ()
 Check if this memory address is marked writable to the process.
bool IsExecutable ()
 Check if this memory address is marked executable to the process.
bool IsMapped ()
 Check if this memory address is mapped into the process address space.
const char * GetName ()
 Returns the name of the memory region mapped at the given address.
bool HasDirtyMemoryPageList ()
 Returns whether this memory region has a list of memory pages that have been modified – that are dirty.
uint32_t GetNumDirtyPages ()
 Returns the number of modified pages – dirty pages – in this memory region.
addr_t GetDirtyPageAddressAtIndex (uint32_t idx)
 Returns the address of a memory page that has been modified in this region.
int GetPageSize ()
 Returns the size of a memory page in this region.
bool operator== (const lldb::SBMemoryRegionInfo &rhs) const
bool operator!= (const lldb::SBMemoryRegionInfo &rhs) const
bool GetDescription (lldb::SBStream &description)
 writes a description of the memory region to a SBStream.

Private Member Functions

lldb_private::MemoryRegionInforef ()
const lldb_private::MemoryRegionInforef () const
 SBMemoryRegionInfo (const lldb_private::MemoryRegionInfo *lldb_object_ptr)

Private Attributes

lldb::MemoryRegionInfoUP m_opaque_up

Friends

class SBProcess
class SBMemoryRegionInfoList
class SBSaveCoreOptions
class lldb_private::ScriptInterpreter

Detailed Description

Definition at line 17 of file SBMemoryRegionInfo.h.

Constructor & Destructor Documentation

◆ SBMemoryRegionInfo() [1/4]

SBMemoryRegionInfo::SBMemoryRegionInfo ( )

◆ SBMemoryRegionInfo() [2/4]

SBMemoryRegionInfo::SBMemoryRegionInfo ( const lldb::SBMemoryRegionInfo & rhs)

◆ SBMemoryRegionInfo() [3/4]

SBMemoryRegionInfo::SBMemoryRegionInfo ( const char * name,
lldb::addr_t begin,
lldb::addr_t end,
uint32_t permissions,
bool mapped,
bool stack_memory = false )

◆ ~SBMemoryRegionInfo()

◆ SBMemoryRegionInfo() [4/4]

SBMemoryRegionInfo::SBMemoryRegionInfo ( const lldb_private::MemoryRegionInfo * lldb_object_ptr)
private

Definition at line 41 of file SBMemoryRegionInfo.cpp.

References m_opaque_up, and ref().

Member Function Documentation

◆ Clear()

void SBMemoryRegionInfo::Clear ( )

Definition at line 63 of file SBMemoryRegionInfo.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by ~SBMemoryRegionInfo().

◆ GetDescription()

bool SBMemoryRegionInfo::GetDescription ( lldb::SBStream & description)

writes a description of the memory region to a SBStream.

Parameters
[in,out]descriptionA stream object where the description will be written.
Returns
Returns true if the description was successfully written, false otherwise.

The description format is: [Hex start - Hex End) with associated permissions (RWX)

Definition at line 163 of file SBMemoryRegionInfo.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_up, lldb_private::Stream::Printf(), and lldb::SBStream::ref().

Referenced by ~SBMemoryRegionInfo().

◆ GetDirtyPageAddressAtIndex()

addr_t SBMemoryRegionInfo::GetDirtyPageAddressAtIndex ( uint32_t idx)

Returns the address of a memory page that has been modified in this region.

Returns
Returns the address for his dirty page in the list. If this memory region does not have a dirty page list, LLDB_INVALID_ADDRESS is returned.

Definition at line 145 of file SBMemoryRegionInfo.cpp.

References LLDB_INSTRUMENT_VA, LLDB_INVALID_ADDRESS, and m_opaque_up.

Referenced by ~SBMemoryRegionInfo().

◆ GetName()

const char * SBMemoryRegionInfo::GetName ( )

Returns the name of the memory region mapped at the given address.

Returns
In case of memory mapped files it is the absolute path of the file otherwise it is a name associated with the memory region. If no name can be determined the returns nullptr.

Definition at line 121 of file SBMemoryRegionInfo.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

◆ GetNumDirtyPages()

uint32_t SBMemoryRegionInfo::GetNumDirtyPages ( )

Returns the number of modified pages – dirty pages – in this memory region.

Returns
The number of dirty page entries will be returned. If there are no dirty pages in this memory region, 0 will be returned. 0 will also be returned if the dirty page list is not available for this memory region – you must use HasDirtyMemoryPageList() to check for that.

Definition at line 133 of file SBMemoryRegionInfo.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by ~SBMemoryRegionInfo().

◆ GetPageSize()

int SBMemoryRegionInfo::GetPageSize ( )

Returns the size of a memory page in this region.

Returns
Returns the size of the memory pages in this region, or 0 if this information is unavailable.

Definition at line 157 of file SBMemoryRegionInfo.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by ~SBMemoryRegionInfo().

◆ GetRegionBase()

lldb::addr_t SBMemoryRegionInfo::GetRegionBase ( )

Get the base address of this memory range.

Returns
The base address of this memory range.

Definition at line 85 of file SBMemoryRegionInfo.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by ~SBMemoryRegionInfo().

◆ GetRegionEnd()

lldb::addr_t SBMemoryRegionInfo::GetRegionEnd ( )

Get the end address of this memory range.

Returns
The base address of this memory range.

Definition at line 91 of file SBMemoryRegionInfo.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by ~SBMemoryRegionInfo().

◆ HasDirtyMemoryPageList()

bool SBMemoryRegionInfo::HasDirtyMemoryPageList ( )

Returns whether this memory region has a list of memory pages that have been modified – that are dirty.

Returns
True if the dirty page list is available.

Definition at line 127 of file SBMemoryRegionInfo.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by ~SBMemoryRegionInfo().

◆ IsExecutable()

bool SBMemoryRegionInfo::IsExecutable ( )

Check if this memory address is marked executable to the process.

Returns
true if this memory address is marked executable

Definition at line 109 of file SBMemoryRegionInfo.cpp.

References lldb_private::MemoryRegionInfo::eYes, LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by ~SBMemoryRegionInfo().

◆ IsMapped()

bool SBMemoryRegionInfo::IsMapped ( )

Check if this memory address is mapped into the process address space.

Returns
true if this memory address is in the process address space.

Definition at line 115 of file SBMemoryRegionInfo.cpp.

References lldb_private::MemoryRegionInfo::eYes, LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by ~SBMemoryRegionInfo().

◆ IsReadable()

bool SBMemoryRegionInfo::IsReadable ( )

Check if this memory address is marked readable to the process.

Returns
true if this memory address is marked readable

Definition at line 97 of file SBMemoryRegionInfo.cpp.

References lldb_private::MemoryRegionInfo::eYes, LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by ~SBMemoryRegionInfo().

◆ IsWritable()

bool SBMemoryRegionInfo::IsWritable ( )

Check if this memory address is marked writable to the process.

Returns
true if this memory address is marked writable

Definition at line 103 of file SBMemoryRegionInfo.cpp.

References lldb_private::MemoryRegionInfo::eYes, LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by ~SBMemoryRegionInfo().

◆ operator!=()

bool SBMemoryRegionInfo::operator!= ( const lldb::SBMemoryRegionInfo & rhs) const

Definition at line 75 of file SBMemoryRegionInfo.cpp.

References LLDB_INSTRUMENT_VA, ref(), and SBMemoryRegionInfo().

Referenced by ~SBMemoryRegionInfo().

◆ operator=()

const SBMemoryRegionInfo & SBMemoryRegionInfo::operator= ( const lldb::SBMemoryRegionInfo & rhs)

◆ operator==()

bool SBMemoryRegionInfo::operator== ( const lldb::SBMemoryRegionInfo & rhs) const

Definition at line 69 of file SBMemoryRegionInfo.cpp.

References LLDB_INSTRUMENT_VA, ref(), and SBMemoryRegionInfo().

Referenced by ~SBMemoryRegionInfo().

◆ ref() [1/2]

◆ ref() [2/2]

const MemoryRegionInfo & SBMemoryRegionInfo::ref ( ) const
private

Definition at line 83 of file SBMemoryRegionInfo.cpp.

References m_opaque_up.

◆ lldb_private::ScriptInterpreter

friend class lldb_private::ScriptInterpreter
friend

Definition at line 135 of file SBMemoryRegionInfo.h.

References ref(), and SBMemoryRegionInfo().

◆ SBMemoryRegionInfoList

friend class SBMemoryRegionInfoList
friend

Definition at line 133 of file SBMemoryRegionInfo.h.

References SBMemoryRegionInfoList.

Referenced by SBMemoryRegionInfoList.

◆ SBProcess

friend class SBProcess
friend

Definition at line 132 of file SBMemoryRegionInfo.h.

References SBProcess.

Referenced by SBProcess.

◆ SBSaveCoreOptions

friend class SBSaveCoreOptions
friend

Definition at line 134 of file SBMemoryRegionInfo.h.

References SBSaveCoreOptions.

Referenced by SBSaveCoreOptions.

Member Data Documentation

◆ m_opaque_up


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