delve/service
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
..
api Go 1.17 support branch (#2451) 2021-07-08 08:47:53 -07:00
dap Go 1.17 support branch (#2451) 2021-07-08 08:47:53 -07:00
debugger Go 1.17 support branch (#2451) 2021-07-08 08:47:53 -07:00
internal/sameuser sameuser: log the uid/remoteUID when they are not matching (#2535) 2021-06-15 15:36:39 +02:00
rpc1 Go 1.17 support branch (#2451) 2021-07-08 08:47:53 -07:00
rpc2 Go 1.17 support branch (#2451) 2021-07-08 08:47:53 -07:00
rpccommon dap: add sameuser check (#2494) 2021-05-19 10:29:05 -07:00
test Go 1.17 support branch (#2451) 2021-07-08 08:47:53 -07:00
client.go terminal,service: Add filtering and grouping to goroutines command (#2504) 2021-07-01 11:25:33 -07:00
config.go cmd/dlv: Fix trace output (#2038) 2020-05-13 08:38:10 +02:00
listenerpipe.go cmd,service: in non-headless mode use an in-memory connection 2018-10-08 15:11:13 -07:00
rpccallback.go service: serialize calls to Command API (#2370) 2021-03-08 10:05:10 -08:00
server.go cmd,service: remove temporary def of Server interface in func 2018-10-09 07:56:48 -07:00