From: Vitaly Kuzmichev <[email protected]> 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 <[email protected]> Signed-off-by: Vitaly Kuzmichev <[email protected]> --- 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 mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/libunwind-devel
