mirror of
https://github.com/golang/go
synced 2024-11-19 07:14:45 -07:00
runtime: poison pcln.frame value
Nothing uses it, nothing should start using it. Stop leaving plausible-looking values there. It would be nice to remove entirely, but that would require a new version number for the object file format, in order not to break external readers like debug/gosym. It's easier to leave and poison. I came across an old mail thread suggesting we start using it to speed up tracebacks. I want to make sure that doesn't happen. (The values there were never quite right, and the number is fundamentally PC-specific anyway.) Change-Id: Iaf38e8a6b523cbae30b69c28497c4588ef397519 Reviewed-on: https://go-review.googlesource.com/6890 Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
parent
0bf79b2de8
commit
a0ac493852
@ -231,7 +231,6 @@ func pclntab() {
|
||||
nfunc = 0
|
||||
var last *LSym
|
||||
var end int32
|
||||
var frameptrsize int32
|
||||
var funcstart int32
|
||||
var i int32
|
||||
var it Pciter
|
||||
@ -273,17 +272,11 @@ func pclntab() {
|
||||
off = int32(setuint32(Ctxt, ftab, int64(off), uint32(Ctxt.Cursym.Args)))
|
||||
|
||||
// frame int32
|
||||
// TODO: Remove entirely. The pcsp table is more precise.
|
||||
// This is only used by a fallback case during stack walking
|
||||
// when a called function doesn't have argument information.
|
||||
// We need to make sure everything has argument information
|
||||
// and then remove this.
|
||||
frameptrsize = int32(Thearch.Ptrsize)
|
||||
|
||||
if Ctxt.Cursym.Leaf != 0 {
|
||||
frameptrsize = 0
|
||||
}
|
||||
off = int32(setuint32(Ctxt, ftab, int64(off), uint32(Ctxt.Cursym.Locals)+uint32(frameptrsize)))
|
||||
// This has been removed (it was never set quite correctly anyway).
|
||||
// Nothing should use it.
|
||||
// Leave an obviously incorrect value.
|
||||
// TODO: Remove entirely.
|
||||
off = int32(setuint32(Ctxt, ftab, int64(off), 0x1234567))
|
||||
|
||||
if pcln != &pclntab_zpcln {
|
||||
renumberfiles(Ctxt, pcln.File, &pcln.Pcfile)
|
||||
|
Loading…
Reference in New Issue
Block a user