fix(debug): hardware watchpoints, signal stops and breakpoint restore
Assisted-by: GLM 5.3
This commit is contained in:
@@ -130,5 +130,11 @@ func (r *Regs) RegValue(name string) (uint64, bool) {
|
||||
// breakpointInsn is the software breakpoint instruction (BRK #0).
|
||||
var breakpointInsn = []byte{0x00, 0x00, 0x20, 0xD4} // BRK #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 arm64 kernel delivers the BRK SIGTRAP with the PC
|
||||
// still on the BRK. do_el0_brk64 calls send_user_sigtrap, which uses
|
||||
// instruction_pointer(regs) unmodified (arch/arm64/kernel/debug-monitors.c);
|
||||
// only the kernel-internal skip paths advance the PC. GDB history agrees:
|
||||
// decr_pc_after_break on aarch64 Linux is 0 (the +4 variant was a QEMU bug,
|
||||
// sourceware PR 17280).
|
||||
const breakpointPCAdjust = 0
|
||||
|
||||
Reference in New Issue
Block a user