fix(debug): hardware watchpoints, signal stops and breakpoint restore
Assisted-by: GLM 5.3
This commit is contained in:
@@ -126,5 +126,9 @@ func (r *Regs) RegValue(name string) (uint64, bool) {
|
||||
// breakpointInsn is the software breakpoint instruction (EBREAK).
|
||||
var breakpointInsn = []byte{0x73, 0x00, 0x10, 0x00} // ebreak
|
||||
|
||||
// breakpointPCAdjust is how far PC is past the breakpoint instruction after a trap.
|
||||
const breakpointPCAdjust = 4
|
||||
// breakpointPCAdjust is how far PC is past the breakpoint instruction after
|
||||
// a trap: 0, because the kernel delivers the EBREAK SIGTRAP with sepc still
|
||||
// on the ebreak. handle_break passes regs->epc straight to
|
||||
// force_sig_fault(SIGTRAP, TRAP_BRKPT, ...) and only the kernel-internal
|
||||
// WARN/CFI paths advance epc (arch/riscv/kernel/traps.c).
|
||||
const breakpointPCAdjust = 0
|
||||
|
||||
Reference in New Issue
Block a user