1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-22 07:37:38 +01:00

Fix compilation on IA64

- Add tdep macro for {dwarf,ia64}_find_unwind_table so that ia64
   doesn't try to use dwarf code.
 - Fix extraneous #if.
 - Fix mistyped filename in Makefile.am.
 - Link ia64-specific tests with correct libraries.

Signed-off-by: Martin Milata <mmilata@redhat.com>
This commit is contained in:
Martin Milata 2012-05-22 11:51:06 +02:00 committed by Arun Sharma
parent fa5409387c
commit d93d96ad83
13 changed files with 23 additions and 7 deletions

View file

@ -234,6 +234,7 @@ dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
/* Platforms that support UNW_INFO_FORMAT_TABLE need to define /* Platforms that support UNW_INFO_FORMAT_TABLE need to define
tdep_search_unwind_table. */ tdep_search_unwind_table. */
#define tdep_search_unwind_table UNW_OBJ(search_unwind_table) #define tdep_search_unwind_table UNW_OBJ(search_unwind_table)
#define tdep_find_unwind_table dwarf_find_unwind_table
#define tdep_uc_addr UNW_ARCH_OBJ(uc_addr) #define tdep_uc_addr UNW_ARCH_OBJ(uc_addr)
#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image) #define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image)
#define tdep_access_reg UNW_OBJ(access_reg) #define tdep_access_reg UNW_OBJ(access_reg)

View file

@ -227,6 +227,7 @@ dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
/* Platforms that support UNW_INFO_FORMAT_TABLE need to define /* Platforms that support UNW_INFO_FORMAT_TABLE need to define
tdep_search_unwind_table. */ tdep_search_unwind_table. */
#define tdep_search_unwind_table dwarf_search_unwind_table #define tdep_search_unwind_table dwarf_search_unwind_table
#define tdep_find_unwind_table dwarf_find_unwind_table
#define tdep_uc_addr UNW_ARCH_OBJ(uc_addr) #define tdep_uc_addr UNW_ARCH_OBJ(uc_addr)
#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image) #define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image)
#define tdep_access_reg UNW_OBJ(access_reg) #define tdep_access_reg UNW_OBJ(access_reg)

View file

@ -222,6 +222,7 @@ struct ia64_global_unwind_state
/* Platforms that support UNW_INFO_FORMAT_TABLE need to define /* Platforms that support UNW_INFO_FORMAT_TABLE need to define
tdep_search_unwind_table. */ tdep_search_unwind_table. */
#define tdep_search_unwind_table unw_search_ia64_unwind_table #define tdep_search_unwind_table unw_search_ia64_unwind_table
#define tdep_find_unwind_table ia64_find_unwind_table
#define tdep_find_proc_info UNW_OBJ(find_proc_info) #define tdep_find_proc_info UNW_OBJ(find_proc_info)
#define tdep_uc_addr UNW_OBJ(uc_addr) #define tdep_uc_addr UNW_OBJ(uc_addr)
#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image) #define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image)

View file

@ -282,6 +282,7 @@ dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
/* Platforms that support UNW_INFO_FORMAT_TABLE need to define /* Platforms that support UNW_INFO_FORMAT_TABLE need to define
tdep_search_unwind_table. */ tdep_search_unwind_table. */
#define tdep_search_unwind_table dwarf_search_unwind_table #define tdep_search_unwind_table dwarf_search_unwind_table
#define tdep_find_unwind_table dwarf_find_unwind_table
#define tdep_uc_addr UNW_ARCH_OBJ(uc_addr) #define tdep_uc_addr UNW_ARCH_OBJ(uc_addr)
#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image) #define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image)
#define tdep_access_reg UNW_OBJ(access_reg) #define tdep_access_reg UNW_OBJ(access_reg)

View file

@ -257,6 +257,7 @@ dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
/* Platforms that support UNW_INFO_FORMAT_TABLE need to define /* Platforms that support UNW_INFO_FORMAT_TABLE need to define
tdep_search_unwind_table. */ tdep_search_unwind_table. */
#define tdep_search_unwind_table dwarf_search_unwind_table #define tdep_search_unwind_table dwarf_search_unwind_table
#define tdep_find_unwind_table dwarf_find_unwind_table
#define tdep_uc_addr UNW_ARCH_OBJ(uc_addr) #define tdep_uc_addr UNW_ARCH_OBJ(uc_addr)
#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image) #define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image)
#define tdep_access_reg UNW_OBJ(access_reg) #define tdep_access_reg UNW_OBJ(access_reg)

View file

@ -257,6 +257,7 @@ dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
/* Platforms that support UNW_INFO_FORMAT_TABLE need to define /* Platforms that support UNW_INFO_FORMAT_TABLE need to define
tdep_search_unwind_table. */ tdep_search_unwind_table. */
#define tdep_search_unwind_table dwarf_search_unwind_table #define tdep_search_unwind_table dwarf_search_unwind_table
#define tdep_find_unwind_table dwarf_find_unwind_table
#define tdep_uc_addr UNW_ARCH_OBJ(uc_addr) #define tdep_uc_addr UNW_ARCH_OBJ(uc_addr)
#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image) #define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image)
#define tdep_access_reg UNW_OBJ(access_reg) #define tdep_access_reg UNW_OBJ(access_reg)

View file

@ -243,6 +243,7 @@ dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
/* Platforms that support UNW_INFO_FORMAT_TABLE need to define /* Platforms that support UNW_INFO_FORMAT_TABLE need to define
tdep_search_unwind_table. */ tdep_search_unwind_table. */
#define tdep_search_unwind_table dwarf_search_unwind_table #define tdep_search_unwind_table dwarf_search_unwind_table
#define tdep_find_unwind_table dwarf_find_unwind_table
#define tdep_uc_addr UNW_ARCH_OBJ(uc_addr) #define tdep_uc_addr UNW_ARCH_OBJ(uc_addr)
#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image) #define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image)
#define tdep_access_reg UNW_OBJ(access_reg) #define tdep_access_reg UNW_OBJ(access_reg)

View file

@ -184,6 +184,7 @@ dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
/* Platforms that support UNW_INFO_FORMAT_TABLE need to define /* Platforms that support UNW_INFO_FORMAT_TABLE need to define
tdep_search_unwind_table. */ tdep_search_unwind_table. */
#define tdep_search_unwind_table dwarf_search_unwind_table #define tdep_search_unwind_table dwarf_search_unwind_table
#define tdep_find_unwind_table dwarf_find_unwind_table
#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image) #define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image)
#define tdep_access_reg UNW_OBJ(access_reg) #define tdep_access_reg UNW_OBJ(access_reg)
#define tdep_access_fpreg UNW_OBJ(access_fpreg) #define tdep_access_fpreg UNW_OBJ(access_fpreg)

View file

@ -191,7 +191,7 @@ libunwind_la_SOURCES_ia64 = $(libunwind_la_SOURCES_ia64_common) \
ia64/Lglobal.c ia64/Linit.c ia64/Linit_local.c ia64/Linit_remote.c \ ia64/Lglobal.c ia64/Linit.c ia64/Linit_local.c ia64/Linit_remote.c \
ia64/Linstall_cursor.S ia64/Lis_signal_frame.c ia64/Lparser.c \ ia64/Linstall_cursor.S ia64/Lis_signal_frame.c ia64/Lparser.c \
ia64/Lrbs.c ia64/Lregs.c ia64/Lresume.c ia64/Lscript.c ia64/Lstep.c \ ia64/Lrbs.c ia64/Lregs.c ia64/Lresume.c ia64/Lscript.c ia64/Lstep.c \
ia64/Ltables.c ia64/Lfind_unwind_tables.c ia64/Ltables.c ia64/Lfind_unwind_table.c
# The list of files that go into libunwind-ia64: # The list of files that go into libunwind-ia64:
libunwind_ia64_la_SOURCES_ia64 = $(libunwind_la_SOURCES_ia64_common) \ libunwind_ia64_la_SOURCES_ia64 = $(libunwind_la_SOURCES_ia64_common) \
@ -200,7 +200,7 @@ libunwind_ia64_la_SOURCES_ia64 = $(libunwind_la_SOURCES_ia64_common) \
ia64/Gglobal.c ia64/Ginit.c ia64/Ginit_local.c ia64/Ginit_remote.c \ ia64/Gglobal.c ia64/Ginit.c ia64/Ginit_local.c ia64/Ginit_remote.c \
ia64/Ginstall_cursor.S ia64/Gis_signal_frame.c ia64/Gparser.c \ ia64/Ginstall_cursor.S ia64/Gis_signal_frame.c ia64/Gparser.c \
ia64/Grbs.c ia64/Gregs.c ia64/Gresume.c ia64/Gscript.c ia64/Gstep.c \ ia64/Grbs.c ia64/Gregs.c ia64/Gresume.c ia64/Gscript.c ia64/Gstep.c \
ia64/Gtables.c ia64/Gfind_unwind_tables.c ia64/Gtables.c ia64/Gfind_unwind_table.c
# The list of files that go both into libunwind and libunwind-hppa: # The list of files that go both into libunwind and libunwind-hppa:
noinst_HEADERS += hppa/init.h hppa/offsets.h hppa/unwind_i.h noinst_HEADERS += hppa/init.h hppa/offsets.h hppa/unwind_i.h

View file

@ -30,9 +30,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include <sys/mman.h> #include <sys/mman.h>
#include "libunwind_i.h" #include "libunwind_i.h"
#if UNW_TARGET_IA64
#include "elf64.h" #include "elf64.h"
static unw_word_t static unw_word_t

View file

@ -64,7 +64,7 @@ get_unwind_info (struct elf_dyn_info *edi, pid_t pid, unw_addr_space_t as, unw_w
/* Here, SEGBASE is the starting-address of the (mmap'ped) segment /* Here, SEGBASE is the starting-address of the (mmap'ped) segment
which covers the IP we're looking for. */ which covers the IP we're looking for. */
if (dwarf_find_unwind_table (edi, as, path, segbase, mapoff, ip) < 0) if (tdep_find_unwind_table (edi, as, path, segbase, mapoff, ip) < 0)
return -UNW_ENOINFO; return -UNW_ENOINFO;
/* This can happen in corner cases where dynamically generated /* This can happen in corner cases where dynamically generated

View file

@ -54,7 +54,7 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
Debug (16, "checking object %s\n", path); Debug (16, "checking object %s\n", path);
if (dwarf_find_unwind_table (&ui->edi, as, path, lo, off, 0) > 0) if (tdep_find_unwind_table (&ui->edi, as, path, lo, off, 0) > 0)
{ {
res = _Uia64_find_dyn_list (as, &ui->edi.di_cache, arg); res = _Uia64_find_dyn_list (as, &ui->edi.di_cache, arg);
if (res && count++ == 0) if (res && count++ == 0)

View file

@ -165,3 +165,14 @@ test_setjmp_LDADD = $(LIBUNWIND_setjmp)
ia64_test_setjmp_LDADD = $(LIBUNWIND_setjmp) ia64_test_setjmp_LDADD = $(LIBUNWIND_setjmp)
test_coredump_unwind_LDADD = $(LIBUNWIND_coredump) $(LIBUNWIND) test_coredump_unwind_LDADD = $(LIBUNWIND_coredump) $(LIBUNWIND)
Gia64_test_nat_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Gia64_test_stack_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Gia64_test_rbs_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Gia64_test_readonly_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Lia64_test_nat_LDADD = $(LIBUNWIND_local)
Lia64_test_stack_LDADD = $(LIBUNWIND_local)
Lia64_test_rbs_LDADD = $(LIBUNWIND_local)
Lia64_test_readonly_LDADD = $(LIBUNWIND_local)
ia64_test_dyn1_LDADD = $(LIBUNWIND)
ia64_test_sig_LDADD = $(LIBUNWIND)