fix: resolve audit findings — stale text, dead code, build tags, docs
Test / vet (push) Successful in 47s
Test / test (push) Successful in 2m39s
Test / build (push) Successful in 42s

Assisted-by: MiMo V2.5 Pro
This commit is contained in:
2026-08-21 00:50:31 +02:00
parent f9eb4021d6
commit 1bf95a169e
10 changed files with 21 additions and 19 deletions
+2
View File
@@ -1,6 +1,8 @@
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
// SPDX-License-Identifier: BSD-3-Clause
//go:build linux
package debug
import "fmt"
+2 -4
View File
@@ -94,7 +94,7 @@ func REPL(s *Session, bm *Breakpoints, codeBase uint64, funcOffset, funcSize, ar
text, instLen, _ := s.Disassemble(pc)
if strings.HasPrefix(strings.ToLower(text), "call") || strings.HasPrefix(strings.ToLower(text), "bl") {
afterAddr := pc + uint64(instLen)
bp, err := bm.Set(afterAddr, "(next)")
_, err := bm.Set(afterAddr, "(next)")
if err != nil {
fmt.Printf("cannot set next breakpoint: %v\n", err)
continue
@@ -109,7 +109,6 @@ func REPL(s *Session, bm *Breakpoints, codeBase uint64, funcOffset, funcSize, ar
}
bm.HandleTrap(&regs)
bm.Clear(afterAddr)
_ = bp
} else {
if err := s.Step(); err != nil {
fmt.Println(err)
@@ -130,7 +129,7 @@ func REPL(s *Session, bm *Breakpoints, codeBase uint64, funcOffset, funcSize, ar
fmt.Printf("cannot read return address: %v\n", err)
continue
}
bp, err := bm.Set(retAddr, "(finish)")
_, err = bm.Set(retAddr, "(finish)")
if err != nil {
fmt.Printf("cannot set finish breakpoint: %v\n", err)
continue
@@ -147,7 +146,6 @@ func REPL(s *Session, bm *Breakpoints, codeBase uint64, funcOffset, funcSize, ar
bm.HandleTrap(&regs)
}
bm.Clear(retAddr)
_ = bp
if s.Exited() {
fmt.Println("debuggee exited")
} else {
+2
View File
@@ -1,6 +1,8 @@
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
// SPDX-License-Identifier: BSD-3-Clause
//go:build linux
package debug
// tracer abstracts the minimal ptrace operations needed by the breakpoint