mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-22 07:37:38 +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:
parent
85946d9766
commit
3723511003
4 changed files with 4 additions and 0 deletions
|
@ -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[EIP] = DWARF_LOC (c->dwarf.cfa, 0);
|
||||||
c->dwarf.loc[EAX] = DWARF_NULL_LOC;
|
c->dwarf.loc[EAX] = DWARF_NULL_LOC;
|
||||||
c->dwarf.cfa += 4;
|
c->dwarf.cfa += 4;
|
||||||
|
c->dwarf.use_prev_instr = 1;
|
||||||
} else {
|
} else {
|
||||||
Debug (8, "Gstep: not handling frame format %d\n", c->sigcontext_format);
|
Debug (8, "Gstep: not handling frame format %d\n", c->sigcontext_format);
|
||||||
abort();
|
abort();
|
||||||
|
|
|
@ -88,6 +88,7 @@ unw_step (unw_cursor_t *cursor)
|
||||||
|
|
||||||
c->dwarf.loc[EBP] = ebp_loc;
|
c->dwarf.loc[EBP] = ebp_loc;
|
||||||
c->dwarf.loc[EIP] = eip_loc;
|
c->dwarf.loc[EIP] = eip_loc;
|
||||||
|
c->dwarf.use_prev_instr = 1;
|
||||||
}
|
}
|
||||||
c->dwarf.ret_addr_column = EIP;
|
c->dwarf.ret_addr_column = EIP;
|
||||||
|
|
||||||
|
|
|
@ -144,6 +144,7 @@ unw_handle_signal_frame (unw_cursor_t *cursor)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
c->dwarf.cfa += 8;
|
c->dwarf.cfa += 8;
|
||||||
|
c->dwarf.use_prev_instr = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -194,6 +194,7 @@ unw_step (unw_cursor_t *cursor)
|
||||||
c->dwarf.loc[RBP] = rbp_loc;
|
c->dwarf.loc[RBP] = rbp_loc;
|
||||||
c->dwarf.loc[RSP] = rsp_loc;
|
c->dwarf.loc[RSP] = rsp_loc;
|
||||||
c->dwarf.loc[RIP] = rip_loc;
|
c->dwarf.loc[RIP] = rip_loc;
|
||||||
|
c->dwarf.use_prev_instr = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
c->dwarf.ret_addr_column = RIP;
|
c->dwarf.ret_addr_column = RIP;
|
||||||
|
|
Loading…
Reference in a new issue