
If a closure captures a variable but also defines a variable of the same name in its root scope the shadowed flag would, sometimes, not be appropriately applied to the captured variable. This change: 1. sorts the variable list by depth *and* declaration line, so that closure captured variables always appear before other root-scope variables, regardless of the order used by the compiler 2. marks variable with the same name as shadowed even if there is only one scope at play. This fixes the problem but as a side effect: 1. programs compiled with Go prior to version 1.9 will have the shadowed flag applied arbitrarily (previously the shadowed flag was not applied at all) 2. programs compiled with Go prior to versoin 1.11 will still exhibit the bug, as they do not have DeclLine information. Fixes #1672
791 B
791 B
Known Bugs
- Delve does not currently support 32bit systems. This will usually manifest as a compiler error in
proc/disasm.go
. See Issue #20. - When Delve is compiled with versions of go prior to 1.7.0 it is not possible to set a breakpoint on a function in a remote package using the
Receiver.MethodName
syntax. See Issue #528. - When running Delve on binaries compiled with a version of go prior to 1.9.0
locals
will print all local variables, including ones that are out of scope, the shadowed flag will be applied arbitrarily. If there are multiple variables defined with the same name in the current functionprint
will not be able to select the correct one for the current line.