From: Austin Clements Date: Thu, 6 Jul 2017 16:36:25 +0000 (-0400) Subject: runtime: document FuncForPC behavior with inlining X-Git-Tag: go1.9rc1~91 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d58125ecd22649eb0a4b33715f39d6696b13c5fb;p=gostls13.git runtime: document FuncForPC behavior with inlining Change-Id: I1c02aa4f7131ae984fda66b32e8a993c0a40b8f4 Reviewed-on: https://go-review.googlesource.com/47690 Reviewed-by: Brad Fitzpatrick Reviewed-by: Russ Cox --- diff --git a/src/runtime/symtab.go b/src/runtime/symtab.go index 40add013e4..ced42dad61 100644 --- a/src/runtime/symtab.go +++ b/src/runtime/symtab.go @@ -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() }