aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2014-10-27 17:17:06 -0400
committerAustin Clements <austin@google.com>2014-10-27 17:17:06 -0400
commit5a653089ef756ecda170e4ee030480d547496362 (patch)
treefe2c3550eb05fe487b5870dfef3d06972582c1a9 /src/runtime
parent32c75a2d3d121f31ace325d48d9fcbdde58cc042 (diff)
parent3e62d2184ab2d2ac6053e3f4af5e3f99902c1e32 (diff)
downloadgo-5a653089ef756ecda170e4ee030480d547496362.tar.xz
[dev.power64] all: merge default into dev.power64
LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/164110043
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/symtab.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/runtime/symtab.go b/src/runtime/symtab.go
index 48d4023b9a..45d107b777 100644
--- a/src/runtime/symtab.go
+++ b/src/runtime/symtab.go
@@ -84,10 +84,13 @@ func symtabinit() {
}
}
- // file table follows ftab.
+ // The ftab ends with a half functab consisting only of
+ // 'entry', followed by a uint32 giving the pcln-relative
+ // offset of the file table.
sp = (*sliceStruct)(unsafe.Pointer(&filetab))
- p = unsafe.Pointer(add(unsafe.Pointer(pcln), ftab[nftab].funcoff))
- sp.array = unsafe.Pointer(add(unsafe.Pointer(pcln), ftab[nftab].funcoff))
+ end := unsafe.Pointer(&ftab[nftab].funcoff) // just beyond ftab
+ fileoffset := *(*uint32)(end)
+ sp.array = unsafe.Pointer(&pclntable[fileoffset])
// length is in first element of array.
// set len to 1 so we can get first element.
sp.len = 1
@@ -224,7 +227,7 @@ func funcline(f *_func, targetpc uintptr, file *string) int32 {
func funcspdelta(f *_func, targetpc uintptr) int32 {
x := pcvalue(f, f.pcsp, targetpc, true)
if x&(ptrSize-1) != 0 {
- print("invalid spdelta ", f.pcsp, " ", x, "\n")
+ print("invalid spdelta ", hex(f.entry), " ", hex(targetpc), " ", hex(f.pcsp), " ", x, "\n")
}
return x
}