[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH 6/6] Fixes for interation end conditions of non
From: |
Konstantin Belousov |
Subject: |
[Libunwind-devel] [PATCH 6/6] Fixes for interation end conditions of non-dwarf walker on x86_64. |
Date: |
Mon, 23 Apr 2012 13:29:02 +0300 |
In the commit d04dc94cc2b0141f06ed9de1665ab89a3f549e0b, the check for
dwarf.ip == 0 was removed from non-dwarf walker in x86_64 version of
unw_step(). Apparently this broke the detection of the end of frame
chain when NULL %rbp is specified, because the case just marked
dwarf.ip as 0. Explicitely set ret to 0 to indicate the end of
iteration.
Similarly, if dwarf_get() reading of %rip succeeds for non-dward walker,
reset the ret to 1. The success value of 0 stops the iteration.
---
src/x86_64/Gstep.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/x86_64/Gstep.c b/src/x86_64/Gstep.c
index 5ecee26..e05fcae 100644
--- a/src/x86_64/Gstep.c
+++ b/src/x86_64/Gstep.c
@@ -85,7 +85,10 @@ unw_step (unw_cursor_t *cursor)
/* 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;
+ {
+ c->dwarf.ip = 0;
+ ret = 0;
+ }
}
else
{
@@ -206,6 +209,7 @@ unw_step (unw_cursor_t *cursor)
Debug (2, "returning %d\n", ret);
return ret;
}
+ ret = 1;
}
else
c->dwarf.ip = 0;
--
1.7.9.6
- [Libunwind-devel] [PATCH 1/6] Compare current sigset with the sigset saved right before _setjmp() call., (continued)
- [Libunwind-devel] [PATCH 1/6] Compare current sigset with the sigset saved right before _setjmp() call., Konstantin Belousov, 2012/04/23
- [Libunwind-devel] [PATCH 4/6] Workaround for old FreeBSD kernels not understanding tid for procinfo sysctls., Konstantin Belousov, 2012/04/23
- [Libunwind-devel] [PATCH 3/6] Fix logic error. When encountered vm map entry is not backed by a vnode, continue search for matching entry instead of aborting the loop., Konstantin Belousov, 2012/04/23
- [Libunwind-devel] [PATCH 6/6] Fixes for interation end conditions of non-dwarf walker on x86_64., Konstantin Belousov, 2012/04/23
- [Libunwind-devel] [PATCH 5/6] Account for the possible ERESTART handling of the syscalls., Konstantin Belousov, 2012/04/23
- [Libunwind-devel] [PATCH 0/6] FreeBSD improvements, Konstantin Belousov, 2012/04/23
- [Libunwind-devel] [PATCH 3/6] Fix logic error. When encountered vm map entry is not backed by a vnode, continue search for matching entry instead of aborting the loop., Konstantin Belousov, 2012/04/23
- [Libunwind-devel] [PATCH 1/6] Compare current sigset with the sigset saved right before _setjmp() call., Konstantin Belousov, 2012/04/23
- [Libunwind-devel] [PATCH 5/6] Account for the possible ERESTART handling of the syscalls., Konstantin Belousov, 2012/04/23
- [Libunwind-devel] [PATCH 2/6] Consistently use symbolic name UNW_EUNSPEC for error code instead of hard-coding -1., Konstantin Belousov, 2012/04/23
- [Libunwind-devel] [PATCH 6/6] Fixes for interation end conditions of non-dwarf walker on x86_64.,
Konstantin Belousov <=
- [Libunwind-devel] [PATCH 4/6] Workaround for old FreeBSD kernels not understanding tid for procinfo sysctls., Konstantin Belousov, 2012/04/23