summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/arm/traceback.c
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-09-13 13:13:44 +0200
committerOndřej Surý <ondrej@sury.org>2011-09-13 13:13:44 +0200
commit9464a0c36318f8a801c07d6874bd0cea40f12504 (patch)
treef0178491c19d4f1ebc7b92eede86690998466480 /src/pkg/runtime/arm/traceback.c
parentba9fda6068cfadd42db0b152fdca7e8b67aaf77d (diff)
parent5ff4c17907d5b19510a62e08fd8d3b11e62b431d (diff)
downloadgolang-9464a0c36318f8a801c07d6874bd0cea40f12504.tar.gz
Merge commit 'upstream/60' into debian-sid
Diffstat (limited to 'src/pkg/runtime/arm/traceback.c')
-rw-r--r--src/pkg/runtime/arm/traceback.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pkg/runtime/arm/traceback.c b/src/pkg/runtime/arm/traceback.c
index c3934c37c..5628b8349 100644
--- a/src/pkg/runtime/arm/traceback.c
+++ b/src/pkg/runtime/arm/traceback.c
@@ -9,6 +9,7 @@ void runtime·deferproc(void);
void runtime·newproc(void);
void runtime·newstack(void);
void runtime·morestack(void);
+void runtime·sigpanic(void);
void _div(void);
void _mod(void);
void _divu(void);
@@ -20,12 +21,14 @@ runtime·gentraceback(byte *pc0, byte *sp, byte *lr0, G *g, int32 skip, uintptr
int32 i, n, iter;
uintptr pc, lr, tracepc, x;
byte *fp, *p;
+ bool waspanic;
Stktop *stk;
Func *f;
pc = (uintptr)pc0;
lr = (uintptr)lr0;
fp = nil;
+ waspanic = false;
// If the PC is goexit, the goroutine hasn't started yet.
if(pc == (uintptr)runtime·goexit) {
@@ -121,7 +124,7 @@ runtime·gentraceback(byte *pc0, byte *sp, byte *lr0, G *g, int32 skip, uintptr
if(pc > f->entry)
runtime·printf("+%p", (uintptr)(pc - f->entry));
tracepc = pc; // back up to CALL instruction for funcline.
- if(n > 0 && pc > f->entry)
+ if(n > 0 && pc > f->entry && !waspanic)
tracepc -= sizeof(uintptr);
runtime·printf(" %S:%d\n", f->src, runtime·funcline(f, tracepc));
runtime·printf("\t%S(", f->name);
@@ -137,6 +140,8 @@ runtime·gentraceback(byte *pc0, byte *sp, byte *lr0, G *g, int32 skip, uintptr
runtime·prints(")\n");
n++;
}
+
+ waspanic = f->entry == (uintptr)runtime·sigpanic;
if(pcbuf == nil && f->entry == (uintptr)runtime·newstack && g == m->g0) {
runtime·printf("----- newstack called from goroutine %d -----\n", m->curg->goid);