Merge pull request #9920 from 9999years/forbid-nested-debuggers
Forbid nested debuggers (cherry picked from commit e164b39ee90fd655dbb7f479fdd4fbe38cc883bd) Change-Id: Iff62f40fd251116516a63e2d3f9fb5b21480b16d
This commit is contained in:
committed by
eldritch horrors
parent
45623f077f
commit
6c29016a09
@@ -0,0 +1,39 @@
|
||||
we enter a debugger via builtins.break in the input file.
|
||||
|
||||
info: breakpoint reached
|
||||
|
||||
causing another debugger even should not nest, but simply
|
||||
print the error, skip the breakpoint, etc as appropriate.
|
||||
|
||||
nix-repl> "values show"
|
||||
"values show"
|
||||
|
||||
nix-repl> builtins.break 2
|
||||
2
|
||||
|
||||
nix-repl> builtins.throw "foo"
|
||||
error:
|
||||
… while calling the 'throw' builtin
|
||||
at «string»:1:1:
|
||||
1| builtins.throw "foo"
|
||||
| ^
|
||||
|
||||
error: foo
|
||||
|
||||
nix-repl> assert false; 2
|
||||
error: assertion 'false' failed
|
||||
at «string»:1:1:
|
||||
1| assert false; 2
|
||||
| ^
|
||||
|
||||
exiting the debug frame should allow another to open.
|
||||
|
||||
nix-repl> :c
|
||||
|
||||
nix-repl> builtins.throw "bar"
|
||||
error: bar
|
||||
|
||||
and once again, more breakpoints are ignored.
|
||||
|
||||
nix-repl> builtins.break 3
|
||||
3
|
||||
Reference in New Issue
Block a user