framehop/unwind_rule.rs
1use crate::error::Error;
2
3pub trait UnwindRule: Copy + core::fmt::Debug {
4 type UnwindRegs;
5
6 fn exec<F>(
7 self,
8 is_first_frame: bool,
9 regs: &mut Self::UnwindRegs,
10 read_stack: &mut F,
11 ) -> Result<Option<u64>, Error>
12 where
13 F: FnMut(u64) -> Result<u64, ()>;
14
15 fn rule_for_stub_functions() -> Self;
16 fn rule_for_function_start() -> Self;
17 fn fallback_rule() -> Self;
18}