feat(debug): add named buffer allocation with pattern filling
Test / vet (push) Successful in 45s
Test / test (push) Successful in 1m58s
Test / build (push) Successful in 42s

This commit is contained in:
2026-08-04 23:55:25 +02:00
parent 5cb7e3e231
commit f58a4fe51d
5 changed files with 390 additions and 27 deletions
+1 -15
View File
@@ -34,21 +34,7 @@ type SourceLine struct {
func REPL(s *Session, bm *Breakpoints, codeBase uint64, funcOffset, funcSize, argsSize int, labels []Label, lines []SourceLine) {
entryAddr := codeBase + uint64(funcOffset)
// Run to the function entry.
bp, err := bm.Set(entryAddr, "(entry)")
if err != nil {
fmt.Printf("warning: cannot set entry breakpoint: %v\n", err)
} else {
if err := s.Continue(); err != nil {
fmt.Printf("warning: continue to entry: %v\n", err)
}
regs, _ := s.GetRegs()
bm.HandleTrap(&regs)
// Remove the temporary entry breakpoint.
bm.Clear(entryAddr)
_ = bp
}
// The debuggee is already stopped at the function entry point.
fmt.Printf("stopped at function entry: %#x (%d bytes)\n", entryAddr, funcSize)
fmt.Println("commands: break <label|addr> | step [n] | continue | disas [n] | regs | where | x <addr> [len] | w <addr> <val...> | labels | quit")