1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-30 21:21:45 +02:00

dwarf: fix single_fde

Usage of the single_fde field in cb_data suggests that it should be
set only when dwarf_extract_proc_info_from_fde has completed successfully,
but instead it is set before the linear search for the matching ip has
begun.  Set it only when that search has completed successfully, and
has thus extracted the proc_info.
This commit is contained in:
Doug Moore 2017-07-06 11:31:38 -05:00 committed by Dave Watson
parent 90d0d15c4e
commit 55eb47d6e5

View file

@ -618,12 +618,13 @@ dwarf_callback (struct dl_phdr_info *info, size_t size, void *ptr)
/* XXX we know how to build a local binary search table for
.debug_frame, so we could do that here too. */
cb_data->single_fde = 1;
found = linear_search (unw_local_addr_space, ip,
eh_frame_start, eh_frame_end, fde_count,
pi, need_unwind_info, NULL);
if (found != 1)
found = 0;
else
cb_data->single_fde = 1;
}
else
{