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§
source§impl<'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§
source§impl<'a> Clone for UnifiedMemoryInfoList<'a>
impl<'a> Clone for UnifiedMemoryInfoList<'a>
source§fn clone(&self) -> UnifiedMemoryInfoList<'a>
fn clone(&self) -> UnifiedMemoryInfoList<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'a> Debug for UnifiedMemoryInfoList<'a>
impl<'a> Debug for UnifiedMemoryInfoList<'a>
Auto Trait Implementations§
impl<'a> Freeze for UnifiedMemoryInfoList<'a>
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)