sp = stk->gobuf.sp;
stk = (Stktop*)stk->stackbase;
}
+ p = (byte*)pc;
+ if(n > 0 && pc != (uint64)goexit)
+ pc--; // get to CALL instruction
f = findfunc(pc);
if(f == nil) {
// dangerous, but poke around to see if it is a closure
- p = (byte*)pc;
// ADDL $xxx, SP; RET
if(p != 0 && p[0] == 0x81 && p[1] == 0xc4 && p[6] == 0xc3) {
sp += *(uint32*)(p+2) + 8;
printf("%S", f->name);
if(pc > f->entry)
printf("+%p", (uintptr)(pc - f->entry));
- 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++) {
sp = stk->gobuf.sp;
stk = (Stktop*)stk->stackbase;
}
+ p = (byte*)pc;
+ if(n > 0 && pc != (uint64)goexit)
+ pc--; // get to CALL instruction
f = findfunc(pc);
if(f == nil) {
// dangerous, but poke around to see if it is a closure
- p = (byte*)pc;
// ADDQ $xxx, SP; RET
if(p[0] == 0x48 && p[1] == 0x81 && p[2] == 0xc4 && p[7] == 0xc3) {
sp += *(uint32*)(p+3) + 8;
printf("%S", f->name);
if(pc > f->entry)
printf("+%p", (uintptr)(pc - f->entry));
- 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++) {