mirror of
https://github.com/golang/go
synced 2024-11-22 03:44:39 -07:00
runtime: fix argument dump in traceback
Was printing words at SP instead of at FP after shuffle due to nascent flag. R=r, r2 CC=golang-dev https://golang.org/cl/2316044
This commit is contained in:
parent
53fff1e74d
commit
7eb13b95a3
@ -21,7 +21,7 @@ gentraceback(byte *pc0, byte *sp, G *g, int32 skip, uintptr *pcbuf, int32 m)
|
||||
{
|
||||
byte *p;
|
||||
int32 i, n, iter, nascent;
|
||||
uintptr pc, tracepc;
|
||||
uintptr pc, tracepc, *fp;
|
||||
Stktop *stk;
|
||||
Func *f;
|
||||
|
||||
@ -93,10 +93,15 @@ gentraceback(byte *pc0, byte *sp, G *g, int32 skip, uintptr *pcbuf, int32 m)
|
||||
tracepc--;
|
||||
printf(" %S:%d\n", f->src, funcline(f, tracepc));
|
||||
printf("\t%S(", f->name);
|
||||
fp = (uintptr*)sp;
|
||||
if(f->frame < sizeof(uintptr))
|
||||
fp++;
|
||||
else
|
||||
fp += f->frame/sizeof(uintptr);
|
||||
for(i = 0; i < f->args; i++) {
|
||||
if(i != 0)
|
||||
prints(", ");
|
||||
·printhex(((uintptr*)sp)[i]);
|
||||
·printhex(fp[i]);
|
||||
if(i >= 4) {
|
||||
prints(", ...");
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user