#[derive(Debug)]
pub enum MessageType {
LineExecuted(u8, u32),
Waiting,
Overflow,
BreakpointHit,
}
#[allow(missing_debug_implementations)]
pub struct Debugger<E> {
pub messenger: E,
#[allow(dead_code)]
pc: u16,
#[allow(dead_code)]
wait_next_instruction: bool,
#[allow(dead_code)]
halt: bool,
#[allow(dead_code)]
pub breakpoints: Vec<u16>,
}
impl<E> Debugger<E> {
pub fn new(messenger: E) -> Self {
Debugger {
messenger,
pc: 0,
wait_next_instruction: false,
halt: false,
breakpoints: Vec::new(),
}
}
}