mirror of
https://github.com/golang/go
synced 2024-11-26 07:47:57 -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:
parent
c8214c78bd
commit
6c1539bb01
@ -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.
|
tracepc = pc; // back up to CALL instruction for funcline.
|
||||||
if(n > 0 && pc > f->entry && !waspanic)
|
if(n > 0 && pc > f->entry && !waspanic)
|
||||||
tracepc -= sizeof(uintptr);
|
tracepc -= sizeof(uintptr);
|
||||||
|
if(m->throwing && gp == m->curg)
|
||||||
|
runtime·printf("[fp=%p] ", fp);
|
||||||
runtime·printf("%S(", f->name);
|
runtime·printf("%S(", f->name);
|
||||||
for(i = 0; i < f->args; i++) {
|
for(i = 0; i < f->args; i++) {
|
||||||
if(i != 0)
|
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.
|
tracepc = pc; // back up to CALL instruction for funcline.
|
||||||
if(n > 0 && pc > f->entry && !waspanic)
|
if(n > 0 && pc > f->entry && !waspanic)
|
||||||
tracepc--;
|
tracepc--;
|
||||||
|
if(m->throwing && gp == m->curg)
|
||||||
|
runtime·printf("[fp=%p] ", fp);
|
||||||
runtime·printf("%S(", f->name);
|
runtime·printf("%S(", f->name);
|
||||||
for(i = 0; i < f->args; i++) {
|
for(i = 0; i < f->args; i++) {
|
||||||
if(i != 0)
|
if(i != 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user