1
0
mirror of https://github.com/golang/go synced 2024-11-26 02:17:58 -07:00

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
This commit is contained in:
Russ Cox 2013-02-15 14:48:47 -05:00
parent c8214c78bd
commit 6c1539bb01
2 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -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)