AntOS Library — debug (reference)

The debug library's design and native core — the GDB remote (RSP) debug server. Exposed to scripts as require("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, not debug — the Luau VM already has a small sandbox-safe debug table (standard libraries); the AntOS debug server is a different thing, so it takes the dbg name 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 as sys.mem.
  • Two-ended — AntOS ships the client side too, so one Ant64 can debug another; the console panic monitor 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

Important: The Ant64 family of home computers are at early design/prototype stage, everything you see here is subject to change.