summaryrefslogtreecommitdiff
path: root/src/x86_64/Gstep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/x86_64/Gstep.c')
-rw-r--r--src/x86_64/Gstep.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/x86_64/Gstep.c b/src/x86_64/Gstep.c
index 809d60b0..5b24de42 100644
--- a/src/x86_64/Gstep.c
+++ b/src/x86_64/Gstep.c
@@ -83,12 +83,13 @@ unw_step (unw_cursor_t *cursor)
if (likely (ret >= 0))
{
/* x86_64 ABI specifies that end of call-chain is marked with a
- NULL RBP. */
- if (DWARF_IS_NULL_LOC (c->dwarf.loc[RBP]))
- {
- c->dwarf.ip = 0;
- ret = 0;
- }
+ NULL RBP or undefined return address */
+ if (DWARF_IS_NULL_LOC (c->dwarf.loc[RBP])
+ || DWARF_IS_NULL_LOC(c->dwarf.loc[c->dwarf.ret_addr_column]))
+ {
+ c->dwarf.ip = 0;
+ ret = 0;
+ }
}
else
{
@@ -194,6 +195,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;