mirror of https://github.com/golang/go.git
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
This commit is contained in:
parent
0998eaf4a1
commit
ec913c42b3
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue