]> Cypherpunks repositories - gostls13.git/commit
runtime: support for debugger function calls
authorAustin Clements <austin@google.com>
Fri, 27 Apr 2018 01:43:19 +0000 (21:43 -0400)
committerAustin Clements <austin@google.com>
Tue, 22 May 2018 15:55:05 +0000 (15:55 +0000)
commitc5ed10f3bed104448b8c8f924e63a6d818c1ecb2
treecb5dd9c31a9c7cae245db23dea8bf396e8f1f1ab
parent9f95c9db23d9e137bc30c206b67b58cc325a8c7e
runtime: support for debugger function calls

This adds a mechanism for debuggers to safely inject calls to Go
functions on amd64. Debuggers must participate in a protocol with the
runtime, and need to know how to lay out a call frame, but the runtime
support takes care of the details of handling live pointers in
registers, stack growth, and detecting the trickier conditions when it
is unsafe to inject a user function call.

Fixes #21678.
Updates derekparker/delve#119.

Change-Id: I56d8ca67700f1f77e19d89e7fc92ab337b228834
Reviewed-on: https://go-review.googlesource.com/109699
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
13 files changed:
src/cmd/internal/objabi/funcid.go
src/cmd/link/internal/ld/pcln.go
src/runtime/asm_amd64.s
src/runtime/debug_test.go [new file with mode: 0644]
src/runtime/debugcall.go [new file with mode: 0644]
src/runtime/defs_nacl_386.go
src/runtime/defs_nacl_amd64p32.go
src/runtime/defs_nacl_arm.go
src/runtime/export_debug_test.go [new file with mode: 0644]
src/runtime/export_test.go
src/runtime/signal_sighandler.go
src/runtime/stack.go
src/runtime/symtab.go