From aa05308d1e40674936d57166dad4c10a3ef7f8e3 Mon Sep 17 00:00:00 2001 From: pjht Date: Wed, 12 Oct 2022 15:52:13 -0500 Subject: [PATCH] Add symbol support to disas and peek --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index b178229..94d7cc6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -359,7 +359,7 @@ fn main() -> Result<(), ReplError> { let fmt = PeekFormat::try_from(fmt_str.chars().next().unwrap())?; let size = PeekSize::try_from(fmt_str.chars().nth(1).unwrap())?; let count = parse::(args.get_one::("count").map_or("1", String::as_str))?; - let addr = parse::(args.get_one::("addr").unwrap())?; + let addr = parse_addr(args.get_one::("addr").unwrap(), &state.symbols)?; let mut data = Vec::new(); let bus = state.cpu.bus_mut(); @@ -405,7 +405,7 @@ fn main() -> Result<(), ReplError> { |args, state| { let mut addr = args .get_one::("addr") - .map_or(Ok(state.cpu.pc()), |s| parse::(s))?; + .map_or(Ok(state.cpu.pc()), |s| parse_addr(s, &state.symbols))?; let count = parse::(args.get_one::("count").map_or("1", String::as_str))?; let mut out = String::new(); for _ in 0..count {