[Nix#9729] Make debugger traces less confusing (and other low hanging fruit) #71
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#71
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Upstream-Issue: NixOS/nix#9729
Is your feature request related to a problem? Please describe.
The debugger has commands for two types of "traces".
:bt
, which aligns with the call stack:st
, which shows the scopeI wouldn't think of the latter as a "trace" but rather just the scope.
Nonetheless,
:st <num>
selects from the:bt
stack. I suppose the reasoning is that it switches the repl scope to a different call stack frame.Describe the solution you'd like
Add
:scope
(and not:scope <num>
). It behaves like:st
. Hide:st
and make it tell you to use:scope
.Add
:frame <num>
to select a scope from the backtrace. This matches GDB. (LLDB hasframe select <num>
.):bt
is good and aligns with GDB and LLDB.Maybe add a
:scope <num>
command for the purpose of accessing shadowed variables, or something more explicit like:scope leave <num>
.Clean up and clarify the
:?
help text.Review the output printed by the commands. Some terms don't match well with the user's frame of reference; e.g. "Env level" -> "Scope level", and "static:" seems irrelevant. Drop the printed pointers?
Reverse the print order of the call stack (
:bt
), to match the order of--show-trace
. (ie without changing the frame<->number mapping. 0 is still the latest frame, but will be printed last)Describe alternatives you've considered
Not so much an alternative, but alternative naming can be considered.
Maybe make it more noun-verb like, like the CLI. Feels more LLDB-like, although hopefully more consistent.
Doesn't feel like a big difference though, and more effort to type that in.
Additional context
Priorities
Add 👍 to issues you find important.