Full path of this document:docs/DAP_COMMAND_TEST_MATRIX.md
Every DAP command supported by the nd500x adapter, its usage (following the
nd100x conventions), and the live test result. All live tests were run against
the NC compiler DOM:
cd build/nc_sandbox
../bin/nd500x --dom $ND500_TESTDATA/FraTor/nc/nc-a06.dom --dap 4500
driven by the dap-debugger MCP client, on 2026-07-11. Unit-level coverage is
in test/test_dap_adapter.c (ctest name
dap_adapter, 103 checks).
PASS - full capabilities returned (data breakpoints, read/write memory, disassemble, instruction breakpoints, stepping granularity, setVariable, evaluate, restart, terminate)
attach
debug_attach
attach to already-loaded machine (DOM workflow)
PASS - attached; CPU stays stopped until continue
launch
debug_launch
program = a.out path; stopOnEntry true/false
PASS (a.out load path); launching a .dom returns an error response - DOMs must be loaded with --dom + attach (details are sent as a stderr output event; response text is generic "Command failed")
configurationDone
(sent by client during attach/launch)
-
PASS
disconnect
debug_disconnect
terminate true/false
PASS - server recycles its transport; a new client can reconnect to the same session
restart
(no MCP tool; VS Code sends it)
resets PC to the captured entry point
Implemented; covered by adapter code + capabilities. Not drivable from the MCP client
PASS - runs at full speed; stopped event delivered on breakpoint/watchpoint/exception. Negative: continue before attach returns "Debugger not running or attached"
next
debug_step_over
granularity statement/line/instruction (all step one instruction on nd500x)
PASS - stopped reason "step"; stepping off a breakpoint the CPU is parked on executes the instruction (resume-skip) instead of re-breaking
file+lines; resolves via loaded symbol/source maps
PASS - with no source map loaded returns verified:false, message "No address known for this source line" (a.out workflow with .map/.s loads maps)
setInstructionBreakpoints
debug_set_instruction_breakpoints
hex addresses (virtual, PC-space); replace-all per request
PASS - verified:true, breakpoint hit at 0x08023E9C with stopped reason "breakpoint". CLI-created bp entries survive DAP replace-all
setFunctionBreakpoints
debug_set_function_breakpoints
function names
NOT IMPLEMENTED - clean error "Function breakpoints callback failed" (needs symbol tables; candidate for a.out workflow)
setExceptionBreakpoints
(client-driven)
filters all/uncaught
Accepted (no-op: nd500x always reports CPU traps as exception stops)
dataBreakpointInfo
(used internally by the MCP data-bp tools)
name = 0xADDR, phys:0xADDR, dspace:/ispace: prefix, symbol name, or register name (PC, I1-I4, L, B, R)
PASS - returns dataId V:0xADDR:len, P:0xADDR:len, or R:NAME
setDataBreakpoints
debug_set_data_breakpoints
accessType read/write/readWrite; address_space virtual/physical; replace-all per request
PASS - virtual addresses translated through the MMU at set time; readWrite installs read+write entries; watchpoint fires with stopped reason "data breakpoint"
(register watch)
debug_watch_register
register name, e.g. I1; break on change
PASS (live) - continue stopped with reason "data breakpoint", description "watchpoint (register) at PC=0x08023EA9" right after the instruction that wrote I1
NOT IMPLEMENTED - clean error "setCpuTracing not implemented by this server" (nd500x has file-based tracing via the CLI show trace; a ring buffer is future work)
stepOut / step granularity line/statement degrade to single-instruction
steps (no frame-chain unwinding on the ND-500 yet); stackTrace reports one
frame.
setFunctionBreakpoints, source, setCpuTracing, getCpuTraceRing are not
implemented (clean error responses).
launch loads a.out files only; DOM files use the --dom + attach workflow.
Instruction breakpoint conditions are accepted but not evaluated
(bp_add_conditional exists in the engine; wiring is future work).
The MCP client accumulates instruction breakpoints client-side; to clear
them, disconnect/reconnect (server-side replace-all works, verified by
unit test).