Implements handle_breakpoint with stop reason (#1076)
Some checks are pending
Development Build / Build (push) Waiting to run
Development Build / Update PRs (push) Waiting to run

Co-authored-by: tompro <tomas.prochazka@apertia.cz>
This commit is contained in:
SuchAFuriousDeath 2024-10-27 18:34:38 +01:00 committed by GitHub
parent 4e2d4c3991
commit 301b1e3db8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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};
@ -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();