pub struct Patch {
pub at: usize,
pub before: usize,
}Expand description
Where the room a patcher was promised at the top of a function ended up.
What -fpatchable-function-entry= asks for, once it is bytes rather than instructions. Two
numbers because the writer has two questions: where the address it records points, and how much
of the function is in front of the symbol.
They are not the same number. The room can be split by the landing pad a function opens with, since the pad has to be the first instruction after the label and the room does not, so the part in front of the label and the part after it are not always next to each other. What is recorded is the front of the whole thing, which is the part in front of the label when there is one.
Fields§
§at: usizeWhere the room begins, as an offset into the same bytes Extent::start is one into.
before: usizeHow many bytes of the function are in front of Extent::start, which is where its symbol
is and where an unwinder is told the function begins.
Trait Implementations§
impl Copy for Patch
impl Eq for Patch
impl StructuralPartialEq for Patch
Auto Trait Implementations§
impl Freeze for Patch
impl RefUnwindSafe for Patch
impl Send for Patch
impl Sync for Patch
impl Unpin for Patch
impl UnsafeUnpin for Patch
impl UnwindSafe for Patch
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.