mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-14 04:18:11 +01:00
ARM: prefer to unwind using DWARF info
In case the user doesn't specify whether to unwind using the ARM specific unwind tabler or DWARF info libunwind should prefer the latter. Since DWARF expressions are more powerful than the ARM specific unwind tables arm_find_proc_info is changed to check for DWARF first. Signed-off-by: Ken Werner <ken.werner@linaro.org>
This commit is contained in:
parent
912db91b05
commit
92327a3647
1 changed files with 21 additions and 21 deletions
|
@ -507,27 +507,7 @@ arm_find_proc_info (unw_addr_space_t as, unw_word_t ip,
|
|||
|
||||
Debug (14, "looking for IP=0x%lx\n", (long) ip);
|
||||
|
||||
if (UNW_TRY_METHOD (UNW_ARM_METHOD_EXIDX))
|
||||
{
|
||||
struct arm_cb_data cb_data;
|
||||
|
||||
memset (&cb_data, 0, sizeof (cb_data));
|
||||
cb_data.ip = ip;
|
||||
cb_data.pi = pi;
|
||||
cb_data.di.format = -1;
|
||||
|
||||
SIGPROCMASK (SIG_SETMASK, &unwi_full_mask, &saved_mask);
|
||||
ret = dl_iterate_phdr (arm_phdr_cb, &cb_data);
|
||||
SIGPROCMASK (SIG_SETMASK, &saved_mask, NULL);
|
||||
|
||||
if (cb_data.di.format != -1)
|
||||
ret = tdep_search_unwind_table (as, ip, &cb_data.di, pi,
|
||||
need_unwind_info, arg);
|
||||
else
|
||||
ret = -UNW_ENOINFO;
|
||||
}
|
||||
|
||||
if (ret < 0 && UNW_TRY_METHOD(UNW_ARM_METHOD_DWARF))
|
||||
if (UNW_TRY_METHOD(UNW_ARM_METHOD_DWARF))
|
||||
{
|
||||
struct dwarf_callback_data cb_data;
|
||||
|
||||
|
@ -553,6 +533,26 @@ arm_find_proc_info (unw_addr_space_t as, unw_word_t ip,
|
|||
ret = -UNW_ENOINFO;
|
||||
}
|
||||
|
||||
if (ret < 0 && UNW_TRY_METHOD (UNW_ARM_METHOD_EXIDX))
|
||||
{
|
||||
struct arm_cb_data cb_data;
|
||||
|
||||
memset (&cb_data, 0, sizeof (cb_data));
|
||||
cb_data.ip = ip;
|
||||
cb_data.pi = pi;
|
||||
cb_data.di.format = -1;
|
||||
|
||||
SIGPROCMASK (SIG_SETMASK, &unwi_full_mask, &saved_mask);
|
||||
ret = dl_iterate_phdr (arm_phdr_cb, &cb_data);
|
||||
SIGPROCMASK (SIG_SETMASK, &saved_mask, NULL);
|
||||
|
||||
if (cb_data.di.format != -1)
|
||||
ret = tdep_search_unwind_table (as, ip, &cb_data.di, pi,
|
||||
need_unwind_info, arg);
|
||||
else
|
||||
ret = -UNW_ENOINFO;
|
||||
}
|
||||
|
||||
if (ret < 0)
|
||||
Debug (14, "IP=0x%lx not found\n", (long) ip);
|
||||
|
||||
|
|
Loading…
Reference in a new issue