Skip to content

Commit

Permalink
Implements handle_breakpoint with stop reason (#1076)
Browse files Browse the repository at this point in the history
Co-authored-by: tompro <[email protected]>
  • Loading branch information
SuchAFuriousDeath and tompro authored Oct 27, 2024
1 parent 4e2d4c3 commit 301b1e3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gui/src/vmm/cpu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use self::debug::{DebugReq, DebugRes, Debugger};
use super::hv::{Cpu, CpuDebug, CpuExit, CpuIo, CpuRun, CpuStates, Hypervisor};
use super::hw::{DeviceContext, DeviceTree};
use super::ram::RamMap;
use super::{VmmEvent, VmmEventHandler};
use super::{KernelStop, VmmEvent, VmmEventHandler};
use crate::error::RustError;
use crate::screen::Screen;
use gdbstub::common::{Signal, Tid};
Expand Down Expand Up @@ -281,10 +281,10 @@ impl<H: Hypervisor, S: Screen> CpuManager<H, S> {
stop: Option<MultiThreadStopReason<u64>>,
) -> bool {
// Convert stop reason.
let stop = match stop {
Some(_) => todo!(),
None => null_mut(),
};
let stop = stop
.map(KernelStop)
.map(Box::new)
.map_or(null_mut(), Box::into_raw);

// Notify GUI. We need to allow only one CPU to enter the debugger dispatch loop.
let lock = args.breakpoint.lock().unwrap();
Expand Down

0 comments on commit 301b1e3

Please sign in to comment.