Skip to content

feat(startup): --debug arms extdebug (niu extension) - #1192

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/debug-arm-extdebug
Oct 23, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/debug-arm-extdebug

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Follow-up to #1191, per owner decision: repurpose --debug.

GNU shell.c:255's --debug writes the debugging variable that no code in bash ever reads (write-only static, shell.c:218; zero reads across the vendored 5.3 tree — variables.c/trap.c/shopt.def all zero). A flag with zero observable GNU behavior cannot conflict with anything, so niu semantics: extdebug armed from the first command — the DEBUG-trap substrate a script debugger needs when it cannot edit the script, and the same gate predicate #497's native debugger builds on; that work upgrades this meaning in place (a native debugger wants extdebug armed anyway).

--debugger (bashdb starter mode, #1191) is unchanged and orthogonal.

Tests: debug_flag_arms_extdebug flips the vestigial no-op expectation to extdebug-ON; parse-level split tests unchanged; lib 789 ✓, fmt clean.

GNU shell.c:255's --debug writes the `debugging` variable that NO code
in bash ever reads (write-only static, shell.c:218; zero reads repo-wide
in the vendored 5.3 tree) — the flag carries zero observable GNU
behavior, so repurposing it conflicts with nothing. niu semantics:
extdebug armed from the first command — the DEBUG-trap substrate a
script debugger needs when it cannot edit the script, and the same gate
predicate rubash#497's native debugger builds on; that work upgrades
the meaning in place (a native debugger wants extdebug anyway).

Follows #1191, which separated --debug from --debugger and documented
the name as reserved.
@caomengxuan666
caomengxuan666 merged commit 54b9900 into master Oct 23, 2026
8 checks passed
@caomengxuan666
caomengxuan666 deleted the fix/debug-arm-extdebug branch October 23, 2026 08:54
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