diff options
| author | Austin Clements <austin@google.com> | 2018-04-26 21:43:19 -0400 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2018-05-22 15:55:05 +0000 |
| commit | c5ed10f3bed104448b8c8f924e63a6d818c1ecb2 (patch) | |
| tree | cb5dd9c31a9c7cae245db23dea8bf396e8f1f1ab /src/runtime/export_test.go | |
| parent | 9f95c9db23d9e137bc30c206b67b58cc325a8c7e (diff) | |
| download | go-c5ed10f3bed104448b8c8f924e63a6d818c1ecb2.tar.xz | |
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>
Diffstat (limited to 'src/runtime/export_test.go')
| -rw-r--r-- | src/runtime/export_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go index 8c428dc119..b21179cc8c 100644 --- a/src/runtime/export_test.go +++ b/src/runtime/export_test.go @@ -447,3 +447,7 @@ func GetNextArenaHint() uintptr { } type G = g + +func Getg() *G { + return getg() +} |
