Enum minidump::UnifiedMemoryInfoList
source · [−]pub enum UnifiedMemoryInfoList<'a> {
Maps(MinidumpLinuxMaps<'a>),
Info(MinidumpMemoryInfoList<'a>),
}
Expand description
Provides a unified interface for getting metadata about the process’s mapped memory regions at the time of the crash.
Currently this is one of MinidumpMemoryInfoList
, available in Windows minidumps,
or MinidumpLinuxMaps
, available in Linux minidumps.
This allows you to e.g. check whether an address was executable or not without
worrying about which platform the crash occured on. If you need to do more
specific analysis, you can get the native formats with UnifiedMemoryInfoList::info
and UnifiedMemoryInfoList::maps
.
Currently an enum because there is no situation where you can have both, but this may change if the format evolves. Prefer using this type’s methods over pattern matching.
Variants
Maps(MinidumpLinuxMaps<'a>)
Info(MinidumpMemoryInfoList<'a>)
Implementations
sourceimpl<'a> UnifiedMemoryInfoList<'a>
impl<'a> UnifiedMemoryInfoList<'a>
sourcepub fn new(
info: Option<MinidumpMemoryInfoList<'a>>,
maps: Option<MinidumpLinuxMaps<'a>>
) -> Option<Self>
pub fn new(
info: Option<MinidumpMemoryInfoList<'a>>,
maps: Option<MinidumpLinuxMaps<'a>>
) -> Option<Self>
Take two potential memory info sources and create an interface that unifies them.
Under normal circumstances a minidump should only contain one of these. If both are provided, one will be arbitrarily preferred to attempt to make progress.
sourcepub fn memory_info_at_address(
&self,
address: u64
) -> Option<UnifiedMemoryInfo<'_>>
pub fn memory_info_at_address(
&self,
address: u64
) -> Option<UnifiedMemoryInfo<'_>>
Return a MinidumpMemory
containing memory at address
, if one exists.
sourcepub fn iter(&self) -> impl Iterator<Item = UnifiedMemoryInfo<'_>>
pub fn iter(&self) -> impl Iterator<Item = UnifiedMemoryInfo<'_>>
Iterate over the memory regions in the order contained in the minidump.
sourcepub fn by_addr(&self) -> impl Iterator<Item = UnifiedMemoryInfo<'_>>
pub fn by_addr(&self) -> impl Iterator<Item = UnifiedMemoryInfo<'_>>
Iterate over the memory regions in order by memory address.
sourcepub fn print<T: Write>(&self, f: &mut T) -> Result<()>
pub fn print<T: Write>(&self, f: &mut T) -> Result<()>
Write a human-readable description of this MinidumpMemoryList
to f
.
This is very verbose, it is the format used by minidump_dump
.
sourcepub fn maps(&self) -> Option<&MinidumpLinuxMaps<'a>>
pub fn maps(&self) -> Option<&MinidumpLinuxMaps<'a>>
Get the MinidumpLinuxMaps
contained inside, if it exists.
Potentially useful for doing a more refined analysis in specific places.
sourcepub fn info(&self) -> Option<&MinidumpMemoryInfoList<'a>>
pub fn info(&self) -> Option<&MinidumpMemoryInfoList<'a>>
Get the MinidumpMemoryInfoList
contained inside, if it exists.
Potentially useful for doing a more refined analysis in specific places.
Trait Implementations
sourceimpl<'a> Clone for UnifiedMemoryInfoList<'a>
impl<'a> Clone for UnifiedMemoryInfoList<'a>
sourcefn clone(&self) -> UnifiedMemoryInfoList<'a>
fn clone(&self) -> UnifiedMemoryInfoList<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for UnifiedMemoryInfoList<'a>
impl<'a> Debug for UnifiedMemoryInfoList<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for UnifiedMemoryInfoList<'a>
impl<'a> Send for UnifiedMemoryInfoList<'a>
impl<'a> Sync for UnifiedMemoryInfoList<'a>
impl<'a> Unpin for UnifiedMemoryInfoList<'a>
impl<'a> UnwindSafe for UnifiedMemoryInfoList<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more