]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: print goroutine header on fault
authorDmitriy Vyukov <dvyukov@google.com>
Thu, 6 Mar 2014 20:01:24 +0000 (00:01 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Thu, 6 Mar 2014 20:01:24 +0000 (00:01 +0400)
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

src/pkg/runtime/signal_386.c
src/pkg/runtime/signal_amd64.c
src/pkg/runtime/signal_arm.c

index 9f3f52179c480a1bb9b7a0ef35ee941d06bf9269..829f389cc27a0459c355daf133886dd8c34fb889 100644 (file)
@@ -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");
index 2184b7f64bf78d2b242c09b35de093ede55dbab9..01af0e7edf1ffa44dbf09c010e2f15b1f3d01831 100644 (file)
@@ -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");
index 4f797346c889548f195b7402e9332060f1c17e04..563f1f2befdcf21f1a4fbcf0a24b863e232dc8ee 100644 (file)
@@ -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");