}
func addpctab(ftab *LSym, off int32, d *Pcdata) int32 {
- start := int32(len(ftab.P))
- Symgrow(Ctxt, ftab, int64(start)+int64(len(d.P)))
- copy(ftab.P[start:], d.P)
-
+ var start int32
+ if len(d.P) > 0 {
+ start = int32(len(ftab.P))
+ Symgrow(Ctxt, ftab, int64(start)+int64(len(d.P)))
+ copy(ftab.P[start:], d.P)
+ }
return int32(setuint32(Ctxt, ftab, int64(off), uint32(start)))
}
}
}
+const debugPcln = false
+
func moduledataverify1(datap *moduledata) {
// See golang.org/s/go12symtab for header: 0xfffffffb,
// two zero bytes, a byte giving the PC quantum,
}
throw("invalid runtime symbol table")
}
+
+ if debugPcln || nftab-i < 5 {
+ f := (*_func)(unsafe.Pointer(&datap.pclntable[datap.ftab[i].funcoff]))
+ pcvalue(f, f.pcfile, datap.ftab[i+1].entry-1, true)
+ pcvalue(f, f.pcln, datap.ftab[i+1].entry-1, true)
+ pcvalue(f, f.pcsp, datap.ftab[i+1].entry-1, true)
+ }
}
if datap.minpc != datap.ftab[0].entry ||
func funcspdelta(f *_func, targetpc uintptr) int32 {
x := pcvalue(f, f.pcsp, targetpc, true)
if x&(ptrSize-1) != 0 {
- print("invalid spdelta ", hex(f.entry), " ", hex(targetpc), " ", hex(f.pcsp), " ", x, "\n")
+ print("invalid spdelta ", funcname(f), " ", hex(f.entry), " ", hex(targetpc), " ", hex(f.pcsp), " ", x, "\n")
}
return x
}