delve/pkg
Alessandro Arzilli f0a32c8e1b
Go 1.17 support branch (#2451)
* proc: support new Go 1.17 panic/defer mechanism

Go 1.17 will create wrappers for deferred calls that take arguments.
Change defer reading code so that wrappers are automatically unwrapped.

Also the deferred function is called directly by runtime.gopanic, without going through runtime.callN which means that sometimes when a panic happens the stack is either:

0. deferred function call
1. deferred call wrapper
2. runtime.gopanic

or:

0. deferred function call
1. runtime.gopanic

instead of always being:

0. deferred function call
1. runtime.callN
2. runtime.gopanic

the isPanicCall check is changed accordingly.

* test: miscellaneous minor test fixes for Go 1.17

* proc: resolve inlined calls when stepping out of runtime.breakpoint

Calls to runtime.Breakpoint are inlined in Go 1.17 when inlining is
enabled, resolve inlined calls in stepInstructionOut.

* proc: add support for debugCallV2 with regabi

This change adds support for the new debug call protocol which had to
change for the new register ABI introduced in Go 1.17.

Summary of changes:
- Abstracts over the debug call version depending on the Go version
  found in the binary.
- Uses R12 instead of RAX as the debug protocol register when the binary
  is from Go 1.17 or later.
- Creates a variable directly from the DWARF entry for function
  arguments to support passing arguments however the ABI expects.
- Computes a very conservative stack frame size for the call when
  injecting a call into a Go process whose version is >=1.17.

Co-authored-by: Michael Anthony Knyszek <mknyszek@google.com>
Co-authored-by: Alessandro Arzilli <alessandro.arzilli@gmail.com>

* TeamCity: enable tests on go-tip

* goversion: version compatibility bump

* TeamCity: fix go-tip builds on macOS/arm64

Co-authored-by: Michael Anthony Knyszek <mknyszek@google.com>
2021-07-08 08:47:53 -07:00
..
astutil proc: simplify next/step/stepout condition code 2020-04-04 11:00:54 -07:00
config terminal: Go syntax highlighting for listings (#2294) 2021-01-28 07:08:14 -08:00
dwarf proc,dwarf: Improve DWARF v5 support (#2544) 2021-06-22 13:37:46 +02:00
elfwriter terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
gobuild service/dap: move build error to output event (#2482) 2021-05-17 09:13:25 -07:00
goversion Go 1.17 support branch (#2451) 2021-07-08 08:47:53 -07:00
locspec locspec,proc: improve documentation (#2338) 2021-02-10 09:31:37 -08:00
logflags service/rpccommon: log error for conns rejected by --only-same-user (#2211) 2020-10-22 08:23:55 -07:00
proc Go 1.17 support branch (#2451) 2021-07-08 08:47:53 -07:00
terminal terminal,service: Add filtering and grouping to goroutines command (#2504) 2021-07-01 11:25:33 -07:00
version all: v1.6.1 2021-05-19 09:24:05 +02:00