Commit ec913c42 authored by Rob Pike's avatar Rob Pike

tweak pcs in traceback so they point to calling line instead of line after call.

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=19745
CL=19745
parent 0998eaf4
......@@ -32,7 +32,7 @@ void
sys·printpc(void *p)
{
prints("PC=0x");
sys·printpointer(sys·getcallerpc(p));
sys·printpointer((byte*)sys·getcallerpc(p) - 1); // -1 to get to CALL instr.
}
void
......
......@@ -70,7 +70,7 @@ traceback(uint8 *pc, uint8 *sp, void* r15)
/* print this frame */
prints("0x");
sys·printpointer(callpc);
sys·printpointer(callpc - 1); // -1 to get to CALL instr.
prints("?zi\n");
prints("\t");
prints(name);
......
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