Ported from https://github.com/latte-c/rCore/tree/bpf/kernel
- add dependencies in Cargo.toml to your project.
- change
osutils.rs
according to your OS. - If your OS dosen't use the trapframe crate, modify trapframe related functions in arch/{arch}/trapframe.rs accordingly.
- call
kprobes_breakpoint_handler
with trapframe in your OS's breakpoint handler.
port on zCore: https://github.com/cubele/zCore
port on rCore-Tutorial: https://github.com/cubele/rCore-Tutorial-Code-2022A/tree/main/os8