mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-29 02:07:39 +01:00
ALIAS dwarf symbols
This commit is contained in:
parent
e5fc8e77fc
commit
c73a0f4d4e
3 changed files with 14 additions and 6 deletions
|
@ -36,7 +36,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
# define UNUSED __attribute__((unused))
|
# define UNUSED __attribute__((unused))
|
||||||
# define NOINLINE __attribute__((noinline))
|
# define NOINLINE __attribute__((noinline))
|
||||||
# define NORETURN __attribute__((noreturn))
|
# define NORETURN __attribute__((noreturn))
|
||||||
# define ALIAS(name) __attribute__((alias (#name)))
|
# define ALIAS2(name) #name
|
||||||
|
# define ALIAS(name) __attribute__((alias (ALIAS2(name))))
|
||||||
# if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 2)
|
# if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 2)
|
||||||
# define ALWAYS_INLINE inline __attribute__((always_inline))
|
# define ALWAYS_INLINE inline __attribute__((always_inline))
|
||||||
# define HIDDEN __attribute__((visibility ("hidden")))
|
# define HIDDEN __attribute__((visibility ("hidden")))
|
||||||
|
|
|
@ -413,6 +413,7 @@ extern int dwarf_search_unwind_table (unw_addr_space_t as,
|
||||||
unw_dyn_info_t *di,
|
unw_dyn_info_t *di,
|
||||||
unw_proc_info_t *pi,
|
unw_proc_info_t *pi,
|
||||||
int need_unwind_info, void *arg);
|
int need_unwind_info, void *arg);
|
||||||
|
|
||||||
extern int dwarf_find_unwind_table (struct elf_dyn_info *edi, unw_addr_space_t as,
|
extern int dwarf_find_unwind_table (struct elf_dyn_info *edi, unw_addr_space_t as,
|
||||||
char *path, unw_word_t segbase, unw_word_t mapoff,
|
char *path, unw_word_t segbase, unw_word_t mapoff,
|
||||||
unw_word_t ip);
|
unw_word_t ip);
|
||||||
|
|
|
@ -46,6 +46,12 @@ struct table_entry
|
||||||
#include "os-linux.h"
|
#include "os-linux.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static ALIAS(dwarf_search_unwind_table) int
|
||||||
|
dwarf_search_unwind_table_int (unw_addr_space_t as,
|
||||||
|
unw_word_t ip,
|
||||||
|
unw_dyn_info_t *di,
|
||||||
|
unw_proc_info_t *pi,
|
||||||
|
int need_unwind_info, void *arg);
|
||||||
static int
|
static int
|
||||||
linear_search (unw_addr_space_t as, unw_word_t ip,
|
linear_search (unw_addr_space_t as, unw_word_t ip,
|
||||||
unw_word_t eh_frame_start, unw_word_t eh_frame_end,
|
unw_word_t eh_frame_start, unw_word_t eh_frame_end,
|
||||||
|
@ -265,7 +271,7 @@ debug_frame_tab_compare (const void *a, const void *b)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
HIDDEN int
|
||||||
dwarf_find_debug_frame (int found, unw_dyn_info_t *di_debug, unw_word_t ip,
|
dwarf_find_debug_frame (int found, unw_dyn_info_t *di_debug, unw_word_t ip,
|
||||||
unw_word_t segbase, const char* obj_name,
|
unw_word_t segbase, const char* obj_name,
|
||||||
unw_word_t start, unw_word_t end)
|
unw_word_t start, unw_word_t end)
|
||||||
|
@ -706,13 +712,13 @@ dwarf_find_proc_info (unw_addr_space_t as, unw_word_t ip,
|
||||||
|
|
||||||
/* search the table: */
|
/* search the table: */
|
||||||
if (cb_data.di.format != -1)
|
if (cb_data.di.format != -1)
|
||||||
ret = dwarf_search_unwind_table (as, ip, &cb_data.di,
|
ret = dwarf_search_unwind_table_int (as, ip, &cb_data.di,
|
||||||
pi, need_unwind_info, arg);
|
pi, need_unwind_info, arg);
|
||||||
else
|
else
|
||||||
ret = -UNW_ENOINFO;
|
ret = -UNW_ENOINFO;
|
||||||
|
|
||||||
if (ret == -UNW_ENOINFO && cb_data.di_debug.format != -1)
|
if (ret == -UNW_ENOINFO && cb_data.di_debug.format != -1)
|
||||||
ret = dwarf_search_unwind_table (as, ip, &cb_data.di_debug, pi,
|
ret = dwarf_search_unwind_table_int (as, ip, &cb_data.di_debug, pi,
|
||||||
need_unwind_info, arg);
|
need_unwind_info, arg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue