From 748974ef2c0e969e95cccc9cb061436d5a1d1b35 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Tue, 29 Oct 2024 14:03:04 +1300 Subject: Load and display symbols in debug information The assembler saves out symbols files, which are loaded automatically by the emulator when present. The name and location of the most recent label is displayed with the debug information when symbols are loaded. --- src/emulators/graphical_emulator.rs | 2 +- src/emulators/headless_emulator.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/emulators') diff --git a/src/emulators/graphical_emulator.rs b/src/emulators/graphical_emulator.rs index a183262..bc6aaeb 100644 --- a/src/emulators/graphical_emulator.rs +++ b/src/emulators/graphical_emulator.rs @@ -115,7 +115,7 @@ impl GraphicalEmulator { let devices = GraphicalDeviceBus::new(config); Self { br: BedrockEmulator::new(devices), - debug: DebugState::new(debug), + debug: DebugState::new(debug, config.symbols_path.as_ref()), dimensions: config.dimensions, fullscreen: config.fullscreen, scale: config.scale, diff --git a/src/emulators/headless_emulator.rs b/src/emulators/headless_emulator.rs index 418ea9c..3f54f6a 100644 --- a/src/emulators/headless_emulator.rs +++ b/src/emulators/headless_emulator.rs @@ -89,7 +89,7 @@ impl HeadlessEmulator { pub fn new(config: &EmulatorConfig, debug: bool) -> Self { Self { br: BedrockEmulator::new(HeadlessDeviceBus::new(config)), - debug: DebugState::new(debug), + debug: DebugState::new(debug, config.symbols_path.as_ref()), } } -- cgit v1.2.3-70-g09d2