AntOS Library — debug (reference)
The
debuglibrary's design and native core — the GDB remote (RSP) debug server. Exposed to scripts asrequire("dbg"). The script-facing API is luau_debug.
What it is
Control for the GDB-remote-serial-protocol server built into AntOS: start it, and a standard gdb (from a PC, or from another AntOS machine) attaches over TCP to inspect the live system — breakpoints, memory regions, and tracing.
Design notes
- Named
dbg, notdebug— the Luau VM already has a small sandbox-safedebugtable (standard libraries); the AntOS debug server is a different thing, so it takes thedbgname to avoid shadowing it. - Explicit memory regions — a debugger can only read the regions the server declares (
addMemRegion), which bounds what an attached client can touch — the same bounds-checked posture assys.mem. - Two-ended — AntOS ships the client side too, so one Ant64 can debug another; the console
panicmonitor and the?interface are the other two entry points (AntOS).
Native core — libantos_debug
sys_debug implements the RSP server, breakpoint table, memory-region map, and trace buffer; the binding is server + breakpoint + region + trace control. No Luau dependency.
Related
- luau_debug — the script API · AntOS · antos_sys · AntOS Libraries hub