[−]Struct symbolic::debuginfo::pdb::pdb::FrameTable
Describes stack frame layout of functions.
The table contains FrameData
entries ordered by PdbInternalRva
. Each entry describes a
range of instructions starting at code_rva
for code_size
bytes.
A procedure/function might be described by multiple entries, with the first one declaring
is_function_start
. To retrieve frame information for a specific function, use
[FrameTable::at_rva
].
Not every function in the image file must have frame data defined for it. Those functions that do not have frame data are assumed to have normal stack frames.
Example
let mut pdb = PDB::open(source)?; // Read the frame table once and reuse it let frame_table = pdb.frame_table()?; let mut frames = frame_table.iter(); // Iterate frame data in RVA order while let Some(frame) = frames.next()? { println!("{:#?}", frame); }
Implementations
impl<'s> FrameTable<'s>
pub fn iter(&self) -> FrameDataIter<'_>
Returns an iterator over all frame data in this table, ordered by code_rva
.
pub fn iter_at_rva(&self, rva: PdbInternalRva) -> FrameDataIter<'_>
Returns an iterator over frame data starting at the given PdbInternalRva
.
The first item returned by this iterator covers the given RVA. If the address is not a direct start of a function or block, this is the closest element preceding the block. If no frame data covers the given RVA, the iterator starts at the first item after the RVA. Therefore, check for the desired RVA range when iterating frame data.
To obtain a PdbInternalRva
, use the to_internal_rva
methods on
PdbInternalSectionOffset
or Rva
.
pub fn is_empty(&self) -> bool
Indicates whether any frame data is available.
Auto Trait Implementations
impl<'s> !RefUnwindSafe for FrameTable<'s>
[src]
impl<'s> !Send for FrameTable<'s>
[src]
impl<'s> !Sync for FrameTable<'s>
[src]
impl<'s> Unpin for FrameTable<'s>
[src]
impl<'s> !UnwindSafe for FrameTable<'s>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,