Debian Codegraph @

third_party/rust/framehop/src/aarch64/instruction_analysis/mod.rs

raw
1 use super::arch::ArchAarch64;
2 use crate::instruction_analysis::InstructionAnalysis;
3
4 mod epilogue;
5 mod prologue;
6
7 use epilogue::unwind_rule_from_detected_epilogue;
8 use prologue::unwind_rule_from_detected_prologue;
9
10 impl InstructionAnalysis for ArchAarch64 {
11 fn rule_from_prologue_analysis(
12 text_bytes: &[u8],
13 pc_offset: usize,
14 ) -> Option<Self::UnwindRule> {
15 let (slice_from_start, slice_to_end) = text_bytes.split_at(pc_offset);
16 unwind_rule_from_detected_prologue(slice_from_start, slice_to_end)
17 }
18
19 fn rule_from_epilogue_analysis(
20 text_bytes: &[u8],
21 pc_offset: usize,
22 ) -> Option<Self::UnwindRule> {
23 unwind_rule_from_detected_epilogue(text_bytes, pc_offset)
24 }
25 }