Skip to content

docs(design): debugger M0 — DAP-over-stdio minimal design (#497) - #582

Merged
caomengxuan666 merged 1 commit into
masterfrom
docs/497-debugger-m0-design
Oct 13, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
docs/497-debugger-m0-design

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Summary

M0 design draft for rubash#497 — adds docs/design/debugger-m0.md, written to be startable as-is:

Issue #497 stays open — the PR delivers the design draft; consensus on DP1–DP3 is requested in the issue comment.

Checklist

  • Docs-only change; no src/ behavior touched
  • All file:line anchors verified against 7f18b44

M0 design draft for rubash#497, written to be startable as-is:

- Scope pinned: one debuggee topology (script in the host process,
  pdb/debugpy model), DAP minimal surface over stdio (launch /
  same-process-spawn-only attach / setBreakpoints by file:line /
  stackTrace / scopes / variables / evaluate / pause-continue-step).
- Stop substrate anchored to the existing run_debug_trap seam family —
  all 11 dispatch points enumerated with file:line at 7f18b44
  (trap_exec.rs:716 funnel; ast_exec.rs:541; compound_exec.rs:334/982/
  1135/1170/1232/2305; function_calls.rs:531; loop_select.rs:117;
  pipeline_exec.rs:672; select_exec.rs:64) plus the function-return
  patch point (trap_exec.rs:781) for the extdebug force-return hole.
- Breakpoint injection: recommends executor PC hooks (the seam family is
  the PC, GNU DEBUG-trap distribution is the stop-site set, no second
  admission list per #117) with the parse-tree line walk
  (parser/nodes.rs:1252 CommandNode.line) used only for verified:false
  resolution at setBreakpoints time; reasons stated.
- Frame/scope/evaluate reuses landed structures: funcname_stack /
  bash_source_stack / bash_lineno_view (dynamic_arrays.rs:683/687/409),
  main-frame rule (#519, dynamic_arrays.rs:389-395), ERR entry-state
  parity pattern (#520), function_definition_locations
  (function_calls.rs:495-511); extdebug surface (#569 sites,
  trap_exec.rs:773-775) and #571 bind -v registry as the CLI's
  readline foundation.
- Non-goals, acceptance (golden DAP transcripts + bashdb oracle),
  scale estimate (~3,000-4,500 LOC, no new crates), M1 outlook, and
  three owner decision points (frontend order; --debug flag semantics;
  M0 stop-site granularity).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant