feat(debug): port the debugger to FreeBSD
Assisted-by: GLM 5.3 Flash
This commit is contained in:
@@ -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.
|
||||
|
||||
+2
-1
@@ -287,7 +287,8 @@ Usage: gasm debug <file.s> --func <name>
|
||||
The debugger re-executes the binary it is running as (`os.Executable()`) for the
|
||||
traced child, so the child is the same `gasm`, whether it is installed on `$PATH`
|
||||
or run with `go run ./cmd/gasm`; nothing has to be installed first. Requires
|
||||
Linux (ptrace), and all four architectures are supported.
|
||||
Linux or FreeBSD (ptrace): all four architectures on Linux, amd64, arm64 and
|
||||
riscv64 on FreeBSD.
|
||||
|
||||
REPL commands:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user