mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
9f95c9db23
commit
c5ed10f3be
13 changed files with 706 additions and 7 deletions
|
|
@ -447,3 +447,7 @@ func GetNextArenaHint() uintptr {
|
|||
}
|
||||
|
||||
type G = g
|
||||
|
||||
func Getg() *G {
|
||||
return getg()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue