fix(debug): hardware watchpoints, signal stops and breakpoint restore
Assisted-by: GLM 5.3
This commit is contained in:
@@ -7,6 +7,7 @@ package debug
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"sourcedock.dev/petrbalvin/gasm-devkit/arch"
|
||||
"sourcedock.dev/petrbalvin/gasm-devkit/disasm"
|
||||
@@ -44,3 +45,17 @@ func (s *Session) DisassembleN(addr uint64, n int) string {
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// isCallInsn reports whether disassembled text (riscv64asm.GoSyntax) is a
|
||||
// call. GoSyntax renders jal and jalr calls as CALL; the native mnemonics
|
||||
// are accepted too. The first token must match exactly: a prefix test on
|
||||
// "bl" would catch branches on other architectures, and jalr as ret prints
|
||||
// RET, which must not be stepped over.
|
||||
func isCallInsn(text string) bool {
|
||||
m, _, _ := strings.Cut(text, " ")
|
||||
switch strings.ToLower(m) {
|
||||
case "call", "jal", "jalr":
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user