1
0
mirror of https://github.com/golang/go synced 2024-11-19 20:54:39 -07:00

runtime: adjust GC debug print to include source pointers

Having the pointers means you can grub around in the
binary finding out more about them.

This helped with issue 7748.

LGTM=minux.ma, bradfitz
R=golang-codereviews, minux.ma, bradfitz
CC=golang-codereviews
https://golang.org/cl/88090045
This commit is contained in:
Russ Cox 2014-04-16 11:39:43 -04:00
parent d0d425a987
commit a5b1530557

View File

@ -702,8 +702,8 @@ checkptr(void *obj, uintptr objti)
// A simple best-effort check until first GC_END.
for(j = 1; pc1[j] != GC_END && pc2[j] != GC_END; j++) {
if(pc1[j] != pc2[j]) {
runtime·printf("invalid gc type info for '%s' at %p, type info %p, block info %p\n",
t->string ? (int8*)t->string->str : (int8*)"?", j, pc1[j], pc2[j]);
runtime·printf("invalid gc type info for '%s', type info %p [%d]=%p, block info %p [%d]=%p\n",
t->string ? (int8*)t->string->str : (int8*)"?", pc1, (int32)j, pc1[j], pc2, (int32)j, pc2[j]);
runtime·throw("invalid gc type info");
}
}