delve/pkg/proc
Alessandro Arzilli e994047355 proc: correctly mark closure variables as shadowed (#1674)
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
2019-09-15 11:40:35 -07:00
..
core Edited to fix issue #1071 (#1664) 2019-08-13 11:13:56 -07:00
fbsdutil *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
gdbserial proc/gdbserial: reset thread updater in step loop (#1665) 2019-08-13 11:14:47 -07:00
linutil proc/linutil: Fix register bitmasks 2019-06-16 09:35:14 +02:00
native proc: next/step/stepout restarts thread from wrong instruction (#1657) 2019-08-12 15:11:19 -07:00
test travis-ci: fix dwz test problems (#1648) 2019-07-31 13:09:00 -07:00
winutil proc/gdbserial: do not return floating point regs when not requested (#1497) 2019-02-26 08:53:45 -08:00
arch.go pkg/proc: Untangle Arch from G struct 2019-08-09 18:15:44 +02:00
bininfo.go proc: round TLS segment size to its alignment (#1682) 2019-09-04 09:01:53 -07:00
breakpoints.go proc/*: allow stepping into functions without debug_info symbols 2018-11-20 12:57:25 -08:00
disasm_amd64.go proc/*: allow stepping into functions without debug_info symbols 2018-11-20 12:57:25 -08:00
disasm.go pkg/proc: Consolidate BinaryInfo/Image methods 2019-08-10 14:03:12 +02:00
doc.go Move top-level packages into pkg 2017-02-08 12:17:19 -08:00
dwarf_expr_test.go proc: remove (*EvalScope).globalFor (#1658) 2019-08-11 13:56:16 -07:00
eval.go proc: correctly mark closure variables as shadowed (#1674) 2019-09-15 11:40:35 -07:00
fncall.go proc: remove (*EvalScope).globalFor (#1658) 2019-08-11 13:56:16 -07:00
interface.go proc: allow simultaneous call injection to multiple goroutines (#1591) 2019-06-30 10:44:30 -07:00
mem.go More Function Calls, parts 2 (#1504) 2019-05-30 08:08:37 -07:00
moduledata.go proc: support debugging plugins (#1414) 2019-05-08 14:06:38 -07:00
proc_general_test.go proc: change memCache to delay reading 2018-04-23 10:13:21 -07:00
proc_linux_test.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
proc_test.go tests: remove duplicate code (#1669) 2019-08-14 08:57:05 -07:00
proc_unix_test.go tests: remove duplicate code (#1669) 2019-08-14 08:57:05 -07:00
proc.go proc: next/step/stepout restarts thread from wrong instruction (#1657) 2019-08-12 15:11:19 -07:00
registers_amd64.go proc/gdbserial: do not return floating point regs when not requested (#1497) 2019-02-26 08:53:45 -08:00
registers.go proc/gdbserial: do not return floating point regs when not requested (#1497) 2019-02-26 08:53:45 -08:00
scope_test.go proc: correctly mark closure variables as shadowed (#1674) 2019-09-15 11:40:35 -07:00
stack.go pkg/proc: Untangle Arch from G struct 2019-08-09 18:15:44 +02:00
threads.go proc: next/step/stepout restarts thread from wrong instruction (#1657) 2019-08-12 15:11:19 -07:00
types.go pkg/proc: Consolidate BinaryInfo/Image methods 2019-08-10 14:03:12 +02:00
variable_test.go tests: remove duplicate code (#1669) 2019-08-14 08:57:05 -07:00
variables.go proc: correctly mark closure variables as shadowed (#1674) 2019-09-15 11:40:35 -07:00