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 (BRK $0).
|
||||
var breakpointInsn = []byte{0x05, 0x00, 0x2a, 0x00} // break 0
|
||||
|
||||
// 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 break SIGTRAP with csr_era
|
||||
// still on the break instruction. do_bp passes regs->csr_era straight to
|
||||
// force_sig_fault(SIGTRAP, TRAP_BRKPT, ...) and never adjusts era on the
|
||||
// signal path (arch/loongarch/kernel/traps.c).
|
||||
const breakpointPCAdjust = 0
|
||||
|
||||
Reference in New Issue
Block a user