[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH] arm: ptrace: Fix order of probing unwind table
From: |
Vitaly_Kuzmichev |
Subject: |
[Libunwind-devel] [PATCH] arm: ptrace: Fix order of probing unwind tables |
Date: |
Thu, 19 Jan 2017 20:08:00 +0300 |
From: Vitaly Kuzmichev <address@hidden>
Commit 92327a3 "ARM: prefer to unwind using DWARF info"
changes order of unwind info searching to prefer DWARF (.debug_frame)
section in prior to ARM specific (.ARM.exidx). This patch only affects
local process unwinding. Now the same is done for remote unwinding.
Sometimes probing .ARM.exidx first causes backtrace truncation
after __aeabi_ldiv0 (division by 0 handler that generates SIGFPE),
because it hits [cantunwind] generated by cross-gcc for __divsi3
function copied with __aeabi_ldiv0 from libgcc.a. Perhaps, lack of
debug info for __divsi3 causes [cantunwind], or there is a problem
converting DWARF to ARM unwind tables, but when unwinding using
DWARF, it hits proper entry, and backtrace is shown correctly.
Reported-by: Frederic Berat <address@hidden>
Signed-off-by: Vitaly Kuzmichev <address@hidden>
---
src/ptrace/_UPT_find_proc_info.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/ptrace/_UPT_find_proc_info.c b/src/ptrace/_UPT_find_proc_info.c
index d2a37ea..b3209f4 100644
--- a/src/ptrace/_UPT_find_proc_info.c
+++ b/src/ptrace/_UPT_find_proc_info.c
@@ -131,15 +131,15 @@ _UPT_find_proc_info (unw_addr_space_t as, unw_word_t ip,
unw_proc_info_t *pi,
ret = tdep_search_unwind_table (as, ip, &ui->edi.di_cache,
pi, need_unwind_info, arg);
+ if (ret == -UNW_ENOINFO && ui->edi.di_debug.format != -1)
+ ret = tdep_search_unwind_table (as, ip, &ui->edi.di_debug, pi,
+ need_unwind_info, arg);
+
#if UNW_TARGET_ARM
if (ret == -UNW_ENOINFO && ui->edi.di_arm.format != -1)
ret = tdep_search_unwind_table (as, ip, &ui->edi.di_arm, pi,
need_unwind_info, arg);
#endif
- if (ret == -UNW_ENOINFO && ui->edi.di_debug.format != -1)
- ret = tdep_search_unwind_table (as, ip, &ui->edi.di_debug, pi,
- need_unwind_info, arg);
-
return ret;
}
--
1.9.1
- [Libunwind-devel] [PATCH] arm: ptrace: Fix order of probing unwind tables,
Vitaly_Kuzmichev <=