Commit 6c1539bb authored by Russ Cox's avatar Russ Cox

runtime: show frame pointer values during throw

Should help if stack overflows start happening again.

Fixes #3582.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7311098
parent c8214c78
......@@ -125,6 +125,8 @@ runtime·gentraceback(byte *pc0, byte *sp, byte *lr0, G *gp, int32 skip, uintptr
tracepc = pc; // back up to CALL instruction for funcline.
if(n > 0 && pc > f->entry && !waspanic)
tracepc -= sizeof(uintptr);
if(m->throwing && gp == m->curg)
runtime·printf("[fp=%p] ", fp);
runtime·printf("%S(", f->name);
for(i = 0; i < f->args; i++) {
if(i != 0)
......
......@@ -127,6 +127,8 @@ runtime·gentraceback(byte *pc0, byte *sp, byte *lr0, G *gp, int32 skip, uintptr
tracepc = pc; // back up to CALL instruction for funcline.
if(n > 0 && pc > f->entry && !waspanic)
tracepc--;
if(m->throwing && gp == m->curg)
runtime·printf("[fp=%p] ", fp);
runtime·printf("%S(", f->name);
for(i = 0; i < f->args; i++) {
if(i != 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment