1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-21 15:17:39 +01:00

Adjust use_prev_instr for syscall and frame-chain frames.

Mark frames which are unwound with the frame-chain walker or
syscall frame code, as non-interrupted.  The return PC in the frame
points to the instruction after the call.
This commit is contained in:
Konstantin Belousov 2014-06-28 23:28:09 +03:00 committed by Arun Sharma
parent 85946d9766
commit 3723511003
4 changed files with 4 additions and 0 deletions

View file

@ -140,6 +140,7 @@ unw_handle_signal_frame (unw_cursor_t *cursor)
c->dwarf.loc[EIP] = DWARF_LOC (c->dwarf.cfa, 0);
c->dwarf.loc[EAX] = DWARF_NULL_LOC;
c->dwarf.cfa += 4;
c->dwarf.use_prev_instr = 1;
} else {
Debug (8, "Gstep: not handling frame format %d\n", c->sigcontext_format);
abort();

View file

@ -88,6 +88,7 @@ unw_step (unw_cursor_t *cursor)
c->dwarf.loc[EBP] = ebp_loc;
c->dwarf.loc[EIP] = eip_loc;
c->dwarf.use_prev_instr = 1;
}
c->dwarf.ret_addr_column = EIP;

View file

@ -144,6 +144,7 @@ unw_handle_signal_frame (unw_cursor_t *cursor)
return ret;
}
c->dwarf.cfa += 8;
c->dwarf.use_prev_instr = 1;
return 1;
}
else

View file

@ -194,6 +194,7 @@ unw_step (unw_cursor_t *cursor)
c->dwarf.loc[RBP] = rbp_loc;
c->dwarf.loc[RSP] = rsp_loc;
c->dwarf.loc[RIP] = rip_loc;
c->dwarf.use_prev_instr = 1;
}
c->dwarf.ret_addr_column = RIP;