[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH 1/2] Fix compilation on IA64
From: |
Martin Milata |
Subject: |
[Libunwind-devel] [PATCH 1/2] Fix compilation on IA64 |
Date: |
Tue, 22 May 2012 11:51:06 +0200 |
- 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 <address@hidden>
---
include/tdep-arm/libunwind_i.h | 1 +
include/tdep-hppa/libunwind_i.h | 1 +
include/tdep-ia64/libunwind_i.h | 1 +
include/tdep-mips/libunwind_i.h | 1 +
include/tdep-ppc32/libunwind_i.h | 1 +
include/tdep-ppc64/libunwind_i.h | 1 +
include/tdep-x86/libunwind_i.h | 1 +
include/tdep-x86_64/libunwind_i.h | 1 +
src/Makefile.am | 4 ++--
src/ia64/Gfind_unwind_table.c | 3 ---
src/ptrace/_UPT_find_proc_info.c | 2 +-
src/ptrace/_UPT_get_dyn_info_list_addr.c | 2 +-
tests/Makefile.am | 11 +++++++++++
13 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/include/tdep-arm/libunwind_i.h b/include/tdep-arm/libunwind_i.h
index a6c515d..af92f41 100644
--- a/include/tdep-arm/libunwind_i.h
+++ b/include/tdep-arm/libunwind_i.h
@@ -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
tdep_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_get_elf_image UNW_ARCH_OBJ(get_elf_image)
#define tdep_access_reg UNW_OBJ(access_reg)
diff --git a/include/tdep-hppa/libunwind_i.h b/include/tdep-hppa/libunwind_i.h
index ef0bb5a..f216849 100644
--- a/include/tdep-hppa/libunwind_i.h
+++ b/include/tdep-hppa/libunwind_i.h
@@ -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
tdep_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_get_elf_image UNW_ARCH_OBJ(get_elf_image)
#define tdep_access_reg UNW_OBJ(access_reg)
diff --git a/include/tdep-ia64/libunwind_i.h b/include/tdep-ia64/libunwind_i.h
index 619425c..71e4310 100644
--- a/include/tdep-ia64/libunwind_i.h
+++ b/include/tdep-ia64/libunwind_i.h
@@ -222,6 +222,7 @@ struct ia64_global_unwind_state
/* Platforms that support UNW_INFO_FORMAT_TABLE need to define
tdep_search_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_uc_addr UNW_OBJ(uc_addr)
#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image)
diff --git a/include/tdep-mips/libunwind_i.h b/include/tdep-mips/libunwind_i.h
index 5713d95..f2bc893 100644
--- a/include/tdep-mips/libunwind_i.h
+++ b/include/tdep-mips/libunwind_i.h
@@ -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
tdep_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_get_elf_image UNW_ARCH_OBJ(get_elf_image)
#define tdep_access_reg UNW_OBJ(access_reg)
diff --git a/include/tdep-ppc32/libunwind_i.h b/include/tdep-ppc32/libunwind_i.h
index 292da62..7e66997 100644
--- a/include/tdep-ppc32/libunwind_i.h
+++ b/include/tdep-ppc32/libunwind_i.h
@@ -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
tdep_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_get_elf_image UNW_ARCH_OBJ(get_elf_image)
#define tdep_access_reg UNW_OBJ(access_reg)
diff --git a/include/tdep-ppc64/libunwind_i.h b/include/tdep-ppc64/libunwind_i.h
index 31c9ccf..aa979b9 100644
--- a/include/tdep-ppc64/libunwind_i.h
+++ b/include/tdep-ppc64/libunwind_i.h
@@ -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
tdep_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_get_elf_image UNW_ARCH_OBJ(get_elf_image)
#define tdep_access_reg UNW_OBJ(access_reg)
diff --git a/include/tdep-x86/libunwind_i.h b/include/tdep-x86/libunwind_i.h
index 1f2e144..ddcdc10 100644
--- a/include/tdep-x86/libunwind_i.h
+++ b/include/tdep-x86/libunwind_i.h
@@ -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
tdep_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_get_elf_image UNW_ARCH_OBJ(get_elf_image)
#define tdep_access_reg UNW_OBJ(access_reg)
diff --git a/include/tdep-x86_64/libunwind_i.h
b/include/tdep-x86_64/libunwind_i.h
index c4c6960..3bd0101 100644
--- a/include/tdep-x86_64/libunwind_i.h
+++ b/include/tdep-x86_64/libunwind_i.h
@@ -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
tdep_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_access_reg UNW_OBJ(access_reg)
#define tdep_access_fpreg UNW_OBJ(access_fpreg)
diff --git a/src/Makefile.am b/src/Makefile.am
index af8d578..10a61a1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -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/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/Ltables.c ia64/Lfind_unwind_tables.c
+ ia64/Ltables.c ia64/Lfind_unwind_table.c
# The list of files that go into libunwind-ia64:
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/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/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:
noinst_HEADERS += hppa/init.h hppa/offsets.h hppa/unwind_i.h
diff --git a/src/ia64/Gfind_unwind_table.c b/src/ia64/Gfind_unwind_table.c
index a871eec..f7d3168 100644
--- a/src/ia64/Gfind_unwind_table.c
+++ b/src/ia64/Gfind_unwind_table.c
@@ -30,9 +30,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
#include <sys/mman.h>
#include "libunwind_i.h"
-
-#if UNW_TARGET_IA64
-
#include "elf64.h"
static unw_word_t
diff --git a/src/ptrace/_UPT_find_proc_info.c b/src/ptrace/_UPT_find_proc_info.c
index 93b3f22..dfa30b5 100644
--- a/src/ptrace/_UPT_find_proc_info.c
+++ b/src/ptrace/_UPT_find_proc_info.c
@@ -65,7 +65,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
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;
/* This can happen in corner cases where dynamically generated
diff --git a/src/ptrace/_UPT_get_dyn_info_list_addr.c
b/src/ptrace/_UPT_get_dyn_info_list_addr.c
index 60286ac..edc998f 100644
--- a/src/ptrace/_UPT_get_dyn_info_list_addr.c
+++ b/src/ptrace/_UPT_get_dyn_info_list_addr.c
@@ -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);
- 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);
if (res && count++ == 0)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 26e7987..4b3bce3 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -165,3 +165,14 @@ test_setjmp_LDADD = $(LIBUNWIND_setjmp)
ia64_test_setjmp_LDADD = $(LIBUNWIND_setjmp)
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)
--
1.7.7.6