Commit d58125ec authored by Austin Clements's avatar Austin Clements

runtime: document FuncForPC behavior with inlining

Change-Id: I1c02aa4f7131ae984fda66b32e8a993c0a40b8f4
Reviewed-on: https://go-review.googlesource.com/47690Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent fcc35147
......@@ -573,6 +573,9 @@ func moduledataverify1(datap *moduledata) {
// FuncForPC returns a *Func describing the function that contains the
// given program counter address, or else nil.
//
// If pc represents multiple functions because of inlining, it returns
// the *Func describing the outermost frame at pc.
func FuncForPC(pc uintptr) *Func {
return findfunc(pc)._Func()
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment