summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-04-15 17:44:32 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-04-15 17:44:32 -0400
commitca1655b01e0f15289f5b8e7b760373c733cbdd83 (patch)
treee489df7957f98063dbb08af15a3b37535ee88881
parent8558d3925ee2931b654a19f243bfa8b3be0bfc12 (diff)
downloadsystemtap-steved-ca1655b01e0f15289f5b8e7b760373c733cbdd83.tar.gz
systemtap-steved-ca1655b01e0f15289f5b8e7b760373c733cbdd83.tar.xz
systemtap-steved-ca1655b01e0f15289f5b8e7b760373c733cbdd83.zip
PR6410: unwinder-less architecture tolerance
-rw-r--r--runtime/ChangeLog6
-rw-r--r--runtime/stack-x86_64.c4
-rw-r--r--runtime/transport/ChangeLog5
-rw-r--r--runtime/transport/symbols.c2
-rw-r--r--runtime/unwind.c5
-rw-r--r--runtime/unwind/unwind.h4
6 files changed, 26 insertions, 0 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index b33fa22a..98ca569e 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,5 +1,11 @@
2008-04-15 Frank Ch. Eigler <fche@elastic.org>
+ 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 <fche@elastic.org>
+
PR 6405
* autoconf-module-nsections.c: New file.
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,5 +1,10 @@
2008-04-15 Frank Ch. Eigler <fche@elastic.org>
+ PR 6410
+ * symbols.c (_stp_do_unwind_data): Tolerate !STP_USE_DWARF_UNWINDER.
+
+2008-04-15 Frank Ch. Eigler <fche@elastic.org>
+
PR 6405
* symbols.c (_stp_load_module_symbols): Support older kernels
without module->sect_attrs->nsections.
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_*/