use crate::defs::HookHandler;
use std::collections::HashMap;
pub struct Breakpoint {
pub original_byte: u8,
pub handlers: Vec<HookHandler>,
pub module_name: String,
pub export_name: String,
}
impl Breakpoint {
pub fn new(original_byte: u8, handler: HookHandler, module: String, export: String) -> Self {
Self {
original_byte,
handlers: vec![handler],
module_name: module,
export_name: export,
}
}
pub fn push_handler(&mut self, handler: HookHandler) {
self.handlers.push(handler);
}
}
pub type BreakpointMap = HashMap<usize, Breakpoint>;
pub type ModuleBaseCache = HashMap<String, usize>;