pub enum MachDebugTagPos {
Post,
Pre,
}
Expand description
Debug tag position on an instruction.
We need to distinguish position on an instruction, and not just use offsets, because of the following case:
<tag1, tag2> call ...
<tag3, tag4> trapping_store ...
If the stack is walked and interpreted with debug tags while within the call, the PC seen will be the return point, i.e. the address after the call. If the stack is walked and interpreted with debug tags upon a trap of the following instruction, it will be the PC of that instruction – which is the same PC! Thus to disambiguate which tags we want, we attach a “pre/post” flag to every group of tags at an offset; and when we look up tags, we look them up for an offset and “position” at that offset.
Thus there are logically two positions at every offset – so the above will be emitted as
0: call ...
4, post: <tag1, tag2>
4, pre: <tag3, tag4>
4: trapping_store ...
Variants§
Post
Tags attached after the instruction that ends at this offset.
This is used to attach tags to a call, because the PC we see when walking the stack is the return point.
Pre
Tags attached before the instruction that starts at this offset.
This is used to attach tags to every other kind of instruction, because the PC we see when processing a trap of that instruction is the PC of that instruction, not the following one.
Trait Implementations§
Source§impl Clone for MachDebugTagPos
impl Clone for MachDebugTagPos
Source§fn clone(&self) -> MachDebugTagPos
fn clone(&self) -> MachDebugTagPos
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MachDebugTagPos
impl Debug for MachDebugTagPos
Source§impl<'de> Deserialize<'de> for MachDebugTagPos
impl<'de> Deserialize<'de> for MachDebugTagPos
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for MachDebugTagPos
impl PartialEq for MachDebugTagPos
Source§impl Serialize for MachDebugTagPos
impl Serialize for MachDebugTagPos
impl Copy for MachDebugTagPos
impl Eq for MachDebugTagPos
impl StructuralPartialEq for MachDebugTagPos
Auto Trait Implementations§
impl Freeze for MachDebugTagPos
impl RefUnwindSafe for MachDebugTagPos
impl Send for MachDebugTagPos
impl Sync for MachDebugTagPos
impl Unpin for MachDebugTagPos
impl UnwindSafe for MachDebugTagPos
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.