From a5b1530557833708050c0e2508ffeaab1bf8bc29 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 16 Apr 2014 11:39:43 -0400 Subject: [PATCH] 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 --- src/pkg/runtime/mgc0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"); } }