feat(debug): port the debugger to FreeBSD

Assisted-by: GLM 5.3 Flash
This commit is contained in:
2026-09-25 21:46:40 +02:00
parent b9015e1c2e
commit b306c210c6
28 changed files with 2444 additions and 15 deletions
+5 -3
View File
@@ -579,7 +579,9 @@ AST, so neither depends on an encoding.
--ground-truth`, `go list -json -export` locates the archives of the packages
a GOOBJ object references, and `_gen` parses
`$GOROOT/src/cmd/internal/obj/<arch>/anames.go` to rebuild the tables.
- **Linux process interfaces** for the dynamic work: `mmap` and `mprotect` for
the JIT mapping, ptrace with `/proc/pid/mem` for the debugger. That is why
- **Linux and FreeBSD process interfaces** for the dynamic work: `mmap` and
`mprotect` for the JIT mapping, ptrace for the debugger — with tracee
memory through `/proc/pid/mem` on Linux and through `PT_IO` on FreeBSD,
and the tracee's stop reports read from `PT_LWPINFO` there. That is why
`verify` runs a JIT check only when the host architecture matches the
kernel's, and why `debug` is Linux-only.
kernel's, and why `debug` is bounded to those two kernels.