delve/pkg/proc
Alessandro Arzilli f9c8f7f55b
Go 1.15 support (#2011)
* proc: start variable visibility one line after their decl line

In most cases variables shouldn't be visible on their declaration line
because they won't be initialized there.
Function arguments are treated as an exception.

This fix is only applied to programs compiled with Go 1.15 or later as
previous versions of Go did not report the correct declaration line for
variables captured by closures.

Fixes #1134

* proc: silence go vet error

* Makefile: enable PIE tests on windows/Go 1.15

* core: support core files for PIEs on windows

* goversion: add Go 1.15 to supported versions

* proc: fix function call injection for Go 1.15

Go 1.15 changed the call injection protocol so that the runtime will
execute the injected call on a different (new) goroutine.

This commit changes the function call support in delve to:

1. correctly track down the call injection state after the runtime
   switches to a different goroutine.
2. correctly perform the escapeCheck when stack values can come from
   multiple goroutine stacks.

* proc: miscellaneous fixed for call injection under macOS with go 1.15

- create copy of SP in debugCallAXCompleteCall case because the code
  used to assume that regs doesn't change
- fix automatic address calculation for function arguments when an
  argument has a spurious DW_OP_piece at entry
2020-07-28 09:19:51 -07:00
..
core Go 1.15 support (#2011) 2020-07-28 09:19:51 -07:00
fbsdutil proc/*: only load floating point registers when needed (#1981) 2020-05-13 11:56:50 -07:00
gdbserial gdbserial: ensure registers are loaded in SetDX/SetSP/SetPC (#2054) 2020-07-21 13:40:16 -07:00
linutil proc/*: only load floating point registers when needed (#1981) 2020-05-13 11:56:50 -07:00
native proc/*: move Set/Clear Breakpoint methods to Target (#2064) 2020-06-03 11:14:14 -07:00
test Go 1.15 support (#2011) 2020-07-28 09:19:51 -07:00
winutil proc/*: only load floating point registers when needed (#1981) 2020-05-13 11:56:50 -07:00
amd64_arch.go proc/*: only load floating point registers when needed (#1981) 2020-05-13 11:56:50 -07:00
amd64_disasm.go proc: convert Arch into a struct (#1972) 2020-03-30 11:03:29 -07:00
arch.go proc: convert Arch into a struct (#1972) 2020-03-30 11:03:29 -07:00
arm64_arch.go proc/*: only load floating point registers when needed (#1981) 2020-05-13 11:56:50 -07:00
arm64_disasm.go Go 1.15 support (#2011) 2020-07-28 09:19:51 -07:00
bininfo.go proc: keep track of nesting depth while reading compile units 2020-07-16 15:34:00 +02:00
breakpoints.go proc/*: move Set/Clear Breakpoint methods to Target (#2064) 2020-06-03 11:14:14 -07:00
disasm.go Go 1.15 support (#2011) 2020-07-28 09:19:51 -07:00
doc.go Move top-level packages into pkg 2017-02-08 12:17:19 -08:00
dwarf_export_test.go proc: keep track of nesting depth while reading compile units 2020-07-16 15:34:00 +02:00
dwarf_expr_test.go proc: keep track of nesting depth while reading compile units 2020-07-16 15:34:00 +02:00
eval.go Go 1.15 support (#2011) 2020-07-28 09:19:51 -07:00
fncall.go Go 1.15 support (#2011) 2020-07-28 09:19:51 -07:00
goroutine_cache.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
i386_arch.go proc/*: only load floating point registers when needed (#1981) 2020-05-13 11:56:50 -07:00
i386_disasm.go proc: convert Arch into a struct (#1972) 2020-03-30 11:03:29 -07:00
interface.go proc/*: move Set/Clear Breakpoint methods to Target (#2064) 2020-06-03 11:14:14 -07:00
mem.go proc/*: only load floating point registers when needed (#1981) 2020-05-13 11:56:50 -07:00
moduledata.go proc: support DW_AT_go_package_name (#1757) 2019-11-25 09:10:18 -08:00
pe.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
proc_general_test.go proc: better support for C pointers (#1997) 2020-06-05 11:22:40 -07:00
proc_linux_test.go *: Add --tty flag for debug / exec 2020-04-10 09:53:13 -07:00
proc_test.go Go 1.15 support (#2011) 2020-07-28 09:19:51 -07:00
proc_unexported_test.go proc: allow calls to optimized functions (#1684) 2019-09-25 10:23:02 -07:00
proc_unix_test.go pkg/proc: Move proc exec funcs to Target methods 2020-03-25 17:45:12 +01:00
registers.go proc/*: only load floating point registers when needed (#1981) 2020-05-13 11:56:50 -07:00
scope_test.go pkg/proc: Move proc exec funcs to Target methods 2020-03-25 17:45:12 +01:00
stack.go proc/*: only load floating point registers when needed (#1981) 2020-05-13 11:56:50 -07:00
target_exec.go Go 1.15 support (#2011) 2020-07-28 09:19:51 -07:00
target.go proc/*: move Set/Clear Breakpoint methods to Target (#2064) 2020-06-03 11:14:14 -07:00
threads.go proc/*: only load floating point registers when needed (#1981) 2020-05-13 11:56:50 -07:00
types.go proc: convert Arch into a struct (#1972) 2020-03-30 11:03:29 -07:00
variable_test.go pkg/proc: Move proc exec funcs to Target methods 2020-03-25 17:45:12 +01:00
variables.go proc: better support for C pointers (#1997) 2020-06-05 11:22:40 -07:00
x86_disasm.go Go 1.15 support (#2011) 2020-07-28 09:19:51 -07:00