[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH 2/6] Consistently use symbolic name UNW_EUNSPEC
From: |
Konstantin Belousov |
Subject: |
[Libunwind-devel] [PATCH 2/6] Consistently use symbolic name UNW_EUNSPEC for error code instead of hard-coding -1. |
Date: |
Mon, 23 Apr 2012 13:51:53 +0300 |
---
src/os-freebsd.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/os-freebsd.c b/src/os-freebsd.c
index aa786da..da6ce37 100644
--- a/src/os-freebsd.c
+++ b/src/os-freebsd.c
@@ -69,14 +69,14 @@ tdep_get_elf_image (struct elf_image *ei, pid_t pid,
unw_word_t ip,
len1 = len * 4 / 3;
buf = get_mem(len1);
if (buf == NULL)
- return (-1);
+ return (-UNW_EUNSPEC);
len = len1;
error = sysctl(mib, 4, buf, &len, NULL, 0);
- if (error) {
+ if (error == -1) {
free_mem(buf, len1);
- return (-1);
+ return (-UNW_EUNSPEC);
}
- ret = -1;
+ ret = -UNW_EUNSPEC;
for (bp = buf, eb = buf + len; bp < eb; bp += kv->kve_structsize) {
kv = (struct kinfo_vmentry *)(uintptr_t)bp;
if (ip < kv->kve_start || ip >= kv->kve_end)
--
1.7.9.6
- [Libunwind-devel] [PATCH 0/6] FreeBSD improvements, 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 <=
- [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