pub struct MappingInfo {
    pub start_address: usize,
    pub size: usize,
    pub system_mapping_info: SystemMappingInfo,
    pub offset: usize,
    pub permissions: MMPermissions,
    pub name: Option<OsString>,
}

Fields§

§start_address: usize§size: usize§system_mapping_info: SystemMappingInfo§offset: usize§permissions: MMPermissions§name: Option<OsString>

Implementations§

source§

impl MappingInfo

source

pub fn name_is_path(&self) -> bool

Return whether the name field is a path (contains a /).

source

pub fn is_empty_page(&self) -> bool

source

pub fn end_address(&self) -> usize

source

pub fn aggregate( memory_maps: MemoryMaps, linux_gate_loc: u64 ) -> Result<Vec<Self>, MapsReaderError>

source

pub fn get_mmap( name: &Option<OsString>, offset: usize ) -> Result<Mmap, MapsReaderError>

source

pub fn fixup_deleted_file( &self, pid: Pid ) -> Result<(OsString, Option<&OsStr>), MapsReaderError>

Check whether the mapping refers to a deleted file, and if so try to find the file elsewhere and return that path.

Currently this only supports fixing a deleted file that was the main exe of the given pid.

Returns a tuple, where the first element is the file path (which is possibly different than self.name), and the second element is the original file path if a different path was used. If no mapping name exists, returns an error.

source

pub fn stack_has_pointer_to_mapping( &self, stack_copy: &[u8], sp_offset: usize ) -> bool

source

pub fn is_mapped_file_safe_to_open(name: &Option<OsString>) -> bool

source

pub fn get_mapping_effective_path_name_and_version( &self ) -> Result<(PathBuf, String, Option<SoVersion>), MapsReaderError>

source

pub fn is_contained_in(&self, user_mapping_list: &MappingList) -> bool

source

pub fn is_interesting(&self) -> bool

source

pub fn contains_address(&self, address: usize) -> bool

source

pub fn is_executable(&self) -> bool

source

pub fn is_readable(&self) -> bool

source

pub fn is_writable(&self) -> bool

Trait Implementations§

source§

impl Clone for MappingInfo

source§

fn clone(&self) -> MappingInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MappingInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for MappingInfo

source§

fn eq(&self, other: &MappingInfo) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for MappingInfo

source§

impl StructuralPartialEq for MappingInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.