Repository navigation
docs(design): debugger M0 — DAP-over-stdio minimal design (#497) - #582
Merged
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
M0 design draft for rubash#497 — adds
docs/design/debugger-m0.md, written to be startable as-is:launch/attach(same-process spawn only),setBreakpointsby file:line,stackTrace,scopes,variables,evaluate, pause/continue/step. Host form:rubash --debug script.shstarts the DAP server on stdio.run_debug_trapseam family — all 11 dispatch points enumerated with file:line anchors at 7f18b44 — plus the function-return patch point (extdebug force-return hole, Native script debugger (rubash --debug / --dap): M0 design consensus #497 D1). Ordering contract (user DEBUG trap → extdebug skip decision → debugger stop) preserved.CommandNode.line, parser/nodes.rs:1252) serves onlyverified:falseresolution atsetBreakpointstime. Reasons spelled out in §4.bind -vregistry as the future CLI's readline foundation.setVariablein M0.--debugflag semantics, DP3 M0 stop-site granularity.Issue #497 stays open — the PR delivers the design draft; consensus on DP1–DP3 is requested in the issue comment.
Checklist
src/behavior touched