mirror of
https://github.com/golang/go
synced 2024-11-20 01:14:40 -07:00
Don't try to account for CALL instruction in 0th frame.
R=rsc APPROVED=rsc DELTA=9 (4 added, 3 deleted, 2 changed) OCL=33238 CL=33251
This commit is contained in:
parent
45ce825544
commit
dbecfbf86d
@ -60,7 +60,9 @@ traceback(byte *pc0, byte *sp, G *g)
|
|||||||
printf("%S", f->name);
|
printf("%S", f->name);
|
||||||
if(pc > f->entry)
|
if(pc > f->entry)
|
||||||
printf("+%p", (uintptr)(pc - f->entry));
|
printf("+%p", (uintptr)(pc - f->entry));
|
||||||
printf(" %S:%d\n", f->src, funcline(f, pc-1)); // -1 to get to CALL instr.
|
if(n > 0)
|
||||||
|
pc--; // get to CALL instruction
|
||||||
|
printf(" %S:%d\n", f->src, funcline(f, pc));
|
||||||
printf("\t%S(", f->name);
|
printf("\t%S(", f->name);
|
||||||
for(i = 0; i < f->args; i++) {
|
for(i = 0; i < f->args; i++) {
|
||||||
if(i != 0)
|
if(i != 0)
|
||||||
@ -144,4 +146,3 @@ runtime·Caller(int32 n, uintptr retpc, String retfile, int32 retline, bool retb
|
|||||||
FLUSH(&retline);
|
FLUSH(&retline);
|
||||||
FLUSH(&retbool);
|
FLUSH(&retbool);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,9 @@ traceback(byte *pc0, byte *sp, G *g)
|
|||||||
printf("%S", f->name);
|
printf("%S", f->name);
|
||||||
if(pc > f->entry)
|
if(pc > f->entry)
|
||||||
printf("+%p", (uintptr)(pc - f->entry));
|
printf("+%p", (uintptr)(pc - f->entry));
|
||||||
printf(" %S:%d\n", f->src, funcline(f, pc-1)); // -1 to get to CALL instr.
|
if(n > 0)
|
||||||
|
pc--; // get to CALL instruction
|
||||||
|
printf(" %S:%d\n", f->src, funcline(f, pc));
|
||||||
printf("\t%S(", f->name);
|
printf("\t%S(", f->name);
|
||||||
for(i = 0; i < f->args; i++) {
|
for(i = 0; i < f->args; i++) {
|
||||||
if(i != 0)
|
if(i != 0)
|
||||||
@ -141,5 +143,3 @@ runtime·Caller(int32 n, uint64 retpc, String retfile, int32 retline, bool retbo
|
|||||||
FLUSH(&retline);
|
FLUSH(&retline);
|
||||||
FLUSH(&retbool);
|
FLUSH(&retbool);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user