Commit dbecfbf8 authored by Austin Clements's avatar Austin Clements

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
parent 45ce8255
......@@ -60,7 +60,9 @@ traceback(byte *pc0, byte *sp, G *g)
printf("%S", f->name);
if(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);
for(i = 0; i < f->args; i++) {
if(i != 0)
......@@ -144,4 +146,3 @@ runtime·Caller(int32 n, uintptr retpc, String retfile, int32 retline, bool retb
FLUSH(&retline);
FLUSH(&retbool);
}
......@@ -57,7 +57,9 @@ traceback(byte *pc0, byte *sp, G *g)
printf("%S", f->name);
if(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);
for(i = 0; i < f->args; i++) {
if(i != 0)
......@@ -141,5 +143,3 @@ runtime·Caller(int32 n, uint64 retpc, String retfile, int32 retline, bool retbo
FLUSH(&retline);
FLUSH(&retbool);
}
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