From ca1655b01e0f15289f5b8e7b760373c733cbdd83 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 15 Apr 2008 17:44:32 -0400 Subject: PR6410: unwinder-less architecture tolerance --- runtime/ChangeLog | 6 ++++++ runtime/stack-x86_64.c | 4 ++++ runtime/transport/ChangeLog | 5 +++++ runtime/transport/symbols.c | 2 ++ runtime/unwind.c | 5 +++++ runtime/unwind/unwind.h | 4 ++++ 6 files changed, 26 insertions(+) (limited to 'runtime') diff --git a/runtime/ChangeLog b/runtime/ChangeLog index b33fa22a..98ca569e 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,9 @@ +2008-04-15 Frank Ch. Eigler + + PR 6410. + * unwind.c, unwind.h: Make body conditional in STP_USE_DWARF_UNWINDER. + * stack-x86_64.c (__stp_stack_print): Tolerate !unwinder. + 2008-04-15 Frank Ch. Eigler PR 6405 diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c index 9915c594..c3b171ea 100644 --- a/runtime/stack-x86_64.c +++ b/runtime/stack-x86_64.c @@ -25,6 +25,7 @@ static void _stp_stack_print_fallback(unsigned long stack, int verbose) static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels) { +#ifdef STP_USE_DWARF_UNWINDER // FIXME: large stack allocation struct unwind_frame_info info; arch_unw_init_frame_info(&info, regs); @@ -42,4 +43,7 @@ static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels) _stp_stack_print_fallback(UNW_SP(&info), verbose); break; } +#else /* ! STP_USE_DWARF_UNWINDER */ + _stp_stack_print_fallback(REG_SP(regs), verbose); +#endif } diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog index f031c088..807f6eda 100644 --- a/runtime/transport/ChangeLog +++ b/runtime/transport/ChangeLog @@ -1,3 +1,8 @@ +2008-04-15 Frank Ch. Eigler + + PR 6410 + * symbols.c (_stp_do_unwind_data): Tolerate !STP_USE_DWARF_UNWINDER. + 2008-04-15 Frank Ch. Eigler PR 6405 diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c index 8cce2fd4..087bf893 100644 --- a/runtime/transport/symbols.c +++ b/runtime/transport/symbols.c @@ -290,7 +290,9 @@ static void _stp_do_unwind_data(const char __user *buf, size_t count) goto done; } m->unwind_data_len = count; +#ifdef STP_USE_DWARF_UNWINDER _stp_create_unwind_hdr(m); +#endif done: write_unlock(&m->lock); } diff --git a/runtime/unwind.c b/runtime/unwind.c index f0010372..aa270cad 100644 --- a/runtime/unwind.c +++ b/runtime/unwind.c @@ -15,6 +15,8 @@ #include "unwind/unwind.h" +#ifdef STP_USE_DWARF_UNWINDER + struct eh_frame_hdr_table_entry { unsigned long start, fde; }; @@ -957,3 +959,6 @@ done: #undef CASES #undef FRAME_REG } + + +#endif /* STP_USE_DWARF_UNWINDER */ diff --git a/runtime/unwind/unwind.h b/runtime/unwind/unwind.h index 8651cb9e..ae5e75d3 100644 --- a/runtime/unwind/unwind.h +++ b/runtime/unwind/unwind.h @@ -13,6 +13,8 @@ #ifndef _STP_UNWIND_H_ #define _STP_UNWIND_H_ +#ifdef STP_USE_DWARF_UNWINDER + #if defined (__x86_64__) #include "x86_64.h" #elif defined (__i386__) @@ -139,4 +141,6 @@ static const u32 bad_cie, not_fde; static const u32 *cie_for_fde(const u32 *fde, const struct _stp_module *); static signed fde_pointer_type(const u32 *cie); + +#endif /* STP_USE_DWARF_UNWINDER */ #endif /*_STP_UNWIND_H_*/ -- cgit