aboutsummaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/gosym/pclntab.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/debug/gosym/pclntab.go b/src/debug/gosym/pclntab.go
index 134cb3d194..a687c406b2 100644
--- a/src/debug/gosym/pclntab.go
+++ b/src/debug/gosym/pclntab.go
@@ -297,6 +297,7 @@ func (t *LineTable) go12Funcs() []Func {
ft := t.funcTab()
funcs := make([]Func, ft.Count())
+ syms := make([]Sym, len(funcs))
for i := range funcs {
f := &funcs[i]
f.Entry = ft.pc(i)
@@ -304,13 +305,14 @@ func (t *LineTable) go12Funcs() []Func {
info := t.funcData(uint32(i))
f.LineTable = t
f.FrameSize = int(info.deferreturn())
- f.Sym = &Sym{
+ syms[i] = Sym{
Value: f.Entry,
Type: 'T',
Name: t.funcName(info.nameoff()),
GoType: 0,
Func: f,
}
+ f.Sym = &syms[i]
}
return funcs
}