From: Russ Cox Date: Wed, 16 Apr 2014 15:39:43 +0000 (-0400) Subject: runtime: adjust GC debug print to include source pointers X-Git-Tag: go1.3beta1~56 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a5b1530557833708050c0e2508ffeaab1bf8bc29;p=gostls13.git 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 --- diff --git a/src/pkg/runtime/mgc0.c b/src/pkg/runtime/mgc0.c index be7f27e396..359d426fc8 100644 --- a/src/pkg/runtime/mgc0.c +++ b/src/pkg/runtime/mgc0.c @@ -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"); } }