mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 20:19:07 +00:00
Add missing HwBreakpointOps impl to GdbStub
Migration to gdbstub 0.5.0 broke hardware breakpoints. (https://crrev.com/c/3071900). This fixes it. BUG=chromium:1259868 TEST=Manually with `hbreak start_kernel` on a volteer device Change-Id: I35097b4ad2ec9990e78e68c3274c12ba7a5dbea9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3244555 Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Woody Chow <woodychow@google.com>
This commit is contained in:
parent
4ca0429e8d
commit
f5db3e5186
1 changed files with 9 additions and 3 deletions
12
src/gdb.rs
12
src/gdb.rs
|
@ -17,7 +17,9 @@ use vm_memory::GuestAddress;
|
|||
use gdbstub::arch::Arch;
|
||||
use gdbstub::target::ext::base::singlethread::{ResumeAction, SingleThreadOps, StopReason};
|
||||
use gdbstub::target::ext::base::{BaseOps, GdbInterrupt};
|
||||
use gdbstub::target::ext::breakpoints::{Breakpoints, BreakpointsOps, HwBreakpoint};
|
||||
use gdbstub::target::ext::breakpoints::{
|
||||
Breakpoints, BreakpointsOps, HwBreakpoint, HwBreakpointOps,
|
||||
};
|
||||
use gdbstub::target::TargetError::NonFatal;
|
||||
use gdbstub::target::{Target, TargetResult};
|
||||
use gdbstub::Connection;
|
||||
|
@ -292,6 +294,12 @@ impl SingleThreadOps for GdbStub {
|
|||
}
|
||||
}
|
||||
|
||||
impl Breakpoints for GdbStub {
|
||||
fn hw_breakpoint(&mut self) -> Option<HwBreakpointOps<Self>> {
|
||||
Some(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl HwBreakpoint for GdbStub {
|
||||
/// Add a new hardware breakpoint.
|
||||
/// Return `Ok(false)` if the operation could not be completed.
|
||||
|
@ -346,5 +354,3 @@ impl HwBreakpoint for GdbStub {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Breakpoints for GdbStub {}
|
||||
|
|
Loading…
Reference in a new issue