runtime: strongly encourage CallersFrames with the result of Callers
runtime: strongly encourage CallersFrames with the result of Callers

For historical reasons, it's still commonplace to iterate over the
slice returned by runtime.Callers and call FuncForPC on each PC. This
is broken in gccgo and somewhat broken in gc and will become more
broken in gc with mid-stack inlining.

In Go 1.7, we introduced runtime.CallersFrames to deal with these
problems, but didn't strongly direct people toward using it. Reword
the documentation on runtime.Callers to more strongly encourage people
to use CallersFrames and explicitly discourage them from iterating
over the PCs or using FuncForPC on the results.

Fixes #19426.

Change-Id: Id0d14cb51a0e9521c8fdde9612610f2c2b9383c4
Reviewed-on: https://go-review.googlesource.com/37726
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>

Cofyc/go,akutz/go,golang/go,derekmarcotte/go,akutz/go,cloudflare/go,derekmarcotte/go,ImJasonH/go,nawawi/go,derekmarcotte/go,linux-on-ibm-z/go,derekmarcotte/go,linux-on-ibm-z/go,linux-on-ibm-z/go,linux-on-ibm-z/go,Cofyc/go,golang/go,vsekhar/elastic-go,Cofyc/go,linux-on-ibm-z/go,nawawi/go,nawawi/go,cloudflare/go,linux-on-ibm-z/go,cloudflare/go,vsekhar/elastic-go,CAFxX/go,CAFxX/go,golang/go,akutz/go,ImJasonH/go,nawawi/go,codestation/go,josharian/go,akutz/go,akutz/go,golang/go,linux-on-ibm-z/go,Cofyc/go,ImJasonH/go,Cofyc/go,golang/go,linux-on-ibm-z/go,vsekhar/elastic-go,CAFxX/go,golang/go,derekmarcotte/go,ImJasonH/go,polyverse-security/go,polyverse-security/go,josharian/go,cloudflare/go,cloudflare/go,polyverse-security/go,codestation/go,cloudflare/go,nawawi/go,polyverse-security/go,akutz/go,vsekhar/elastic-go,polyverse-security/go,polyverse-security/go,derekmarcotte/go,ImJasonH/go,Cofyc/go,Cofyc/go,cloudflare/go,ImJasonH/go,codestation/go,derekmarcotte/go,josharian/go,codestation/go,vsekhar/elastic-go,golang/go,CAFxX/go,josharian/go,codestation/go,CAFxX/go,josharian/go,josharian/go,derekmarcotte/go,nawawi/go,nawawi/go,golang/go,CAFxX/go,vsekhar/elastic-go,josharian/go,ImJasonH/go,cloudflare/go,vsekhar/elastic-go,CAFxX/go,codestation/go,polyverse-security/go,akutz/go,polyverse-security/go,nawawi/go,ImJasonH/go,josharian/go,codestation/go,CAFxX/go,vsekhar/elastic-go,codestation/go,christopher-henderson/Go,akutz/go,Cofyc/go