diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 03a714b..b1c69b9 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4105,7 +4105,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "titan" version = "0.1.0" -source = "git+https://github.com/1whatleytay/titan.git?branch=main#3c22f130cbc0a1c9827313ac826480eb6491333c" +source = "git+https://github.com/1whatleytay/titan.git?branch=main#db590c2abca9d0e3d4ba0c2ecf34de3965f429c2" dependencies = [ "bitflags 2.4.2", "byteorder", diff --git a/src-tauri/src/state/commands.rs b/src-tauri/src/state/commands.rs index c46af08..b4a6469 100644 --- a/src-tauri/src/state/commands.rs +++ b/src-tauri/src/state/commands.rs @@ -72,9 +72,7 @@ pub async fn resume( #[tauri::command] pub fn rewind(state: tauri::State<'_, DebuggerBody>, count: u32) -> Option { - let Some(pointer) = &*state.lock().unwrap() else { return None }; - - Some(pointer.rewind(count)) + Some(state.lock().unwrap().as_ref()?.rewind(count)) } #[tauri::command] diff --git a/src-tauri/src/state/execution.rs b/src-tauri/src/state/execution.rs index 3280601..1673895 100644 --- a/src-tauri/src/state/execution.rs +++ b/src-tauri/src/state/execution.rs @@ -351,6 +351,8 @@ impl ExecutionRewindable for ExecutionState, His }) }; + self.debugger.pause(); + self.debugger.with_state(|state| { entry.apply(&mut state.registers, &mut state.memory.backing); });