From: Dmitriy Vyukov Date: Thu, 6 Mar 2014 20:01:24 +0000 (+0400) Subject: runtime: print goroutine header on fault X-Git-Tag: go1.3beta1~439 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2fb87ddb59218797686f8d725a5accb195ccbaca;p=gostls13.git runtime: print goroutine header on fault I've just needed the G status on fault to debug runtime bug. For some reason we print everything except header here. Make it more informative and consistent. R=rsc CC=golang-codereviews https://golang.org/cl/67870056 --- diff --git a/src/pkg/runtime/signal_386.c b/src/pkg/runtime/signal_386.c index 9f3f52179c..829f389cc2 100644 --- a/src/pkg/runtime/signal_386.c +++ b/src/pkg/runtime/signal_386.c @@ -112,6 +112,7 @@ Throw: runtime·printf("\n"); if(runtime·gotraceback(&crash)){ + runtime·goroutineheader(gp); runtime·traceback(SIG_EIP(info, ctxt), SIG_ESP(info, ctxt), 0, gp); runtime·tracebackothers(gp); runtime·printf("\n"); diff --git a/src/pkg/runtime/signal_amd64.c b/src/pkg/runtime/signal_amd64.c index 2184b7f64b..01af0e7edf 100644 --- a/src/pkg/runtime/signal_amd64.c +++ b/src/pkg/runtime/signal_amd64.c @@ -122,6 +122,7 @@ Throw: runtime·printf("\n"); if(runtime·gotraceback(&crash)){ + runtime·goroutineheader(gp); runtime·traceback(SIG_RIP(info, ctxt), SIG_RSP(info, ctxt), 0, gp); runtime·tracebackothers(gp); runtime·printf("\n"); diff --git a/src/pkg/runtime/signal_arm.c b/src/pkg/runtime/signal_arm.c index 4f797346c8..563f1f2bef 100644 --- a/src/pkg/runtime/signal_arm.c +++ b/src/pkg/runtime/signal_arm.c @@ -112,6 +112,7 @@ Throw: runtime·printf("\n"); if(runtime·gotraceback(&crash)){ + runtime·goroutineheader(gp); runtime·traceback(SIG_PC(info, ctxt), SIG_SP(info, ctxt), SIG_LR(info, ctxt), gp); runtime·tracebackothers(gp); runtime·printf("\n");