mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
The gdb server runs on an additional serial port and provides process-level debugging to the kernel. Signed-off-by: Sean Cross <sean@xobs.io>
35 lines
1.1 KiB
Rust
35 lines
1.1 KiB
Rust
use gdbstub::target::ext::base::BaseOps;
|
|
use gdbstub::target::ext::breakpoints::BreakpointsOps;
|
|
use gdbstub::target::ext::extended_mode::ExtendedModeOps;
|
|
use gdbstub::target::ext::monitor_cmd::MonitorCmdOps;
|
|
use gdbstub::target::Target;
|
|
|
|
use super::XousTarget;
|
|
|
|
impl Target for XousTarget {
|
|
type Arch = gdbstub_arch::riscv::Riscv32;
|
|
type Error = &'static str;
|
|
|
|
fn base_ops(&mut self) -> BaseOps<Self::Arch, Self::Error> {
|
|
BaseOps::MultiThread(self)
|
|
}
|
|
|
|
fn support_breakpoints(&mut self) -> Option<BreakpointsOps<Self>> {
|
|
Some(self)
|
|
}
|
|
|
|
/// Opt in to having GDB handle breakpoints for us. This allows for an unlimited number
|
|
/// of breakpoints without having us keep track of the breakpoints ourselves, but
|
|
/// doesn't work with XIP programs.
|
|
fn guard_rail_implicit_sw_breakpoints(&self) -> bool {
|
|
true
|
|
}
|
|
|
|
fn support_monitor_cmd(&mut self) -> Option<MonitorCmdOps<'_, Self>> {
|
|
Some(self)
|
|
}
|
|
|
|
fn support_extended_mode(&mut self) -> Option<ExtendedModeOps<'_, Self>> {
|
|
Some(self)
|
|
}
|
|
}
|