summaryrefslogtreecommitdiffstats
path: root/runtime/unwind
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/unwind')
-rw-r--r--runtime/unwind/i386.h18
-rw-r--r--runtime/unwind/unwind.h4
2 files changed, 4 insertions, 18 deletions
diff --git a/runtime/unwind/i386.h b/runtime/unwind/i386.h
index 1f69b4a9..79e6ba73 100644
--- a/runtime/unwind/i386.h
+++ b/runtime/unwind/i386.h
@@ -34,15 +34,6 @@ struct unwind_frame_info
#define UNW_PC(frame) (frame)->regs.ip
#define UNW_SP(frame) (frame)->regs.sp
-#ifdef STP_USE_FRAME_POINTER
-#define UNW_FP(frame) (frame)->regs.bp
-#define FRAME_RETADDR_OFFSET 4
-#define FRAME_LINK_OFFSET 0
-#define STACK_BOTTOM(tsk) STACK_LIMIT((tsk)->thread.sp0)
-#define STACK_TOP(tsk) ((tsk)->thread.sp0)
-#else
-#define UNW_FP(frame) ((void)(frame), 0)
-#endif
#define UNW_REGISTER_INFO \
PTREGS_INFO(ax), \
@@ -59,15 +50,6 @@ struct unwind_frame_info
#define UNW_PC(frame) (frame)->regs.eip
#define UNW_SP(frame) (frame)->regs.esp
-#ifdef STP_USE_FRAME_POINTER
-#define UNW_FP(frame) (frame)->regs.ebp
-#define FRAME_RETADDR_OFFSET 4
-#define FRAME_LINK_OFFSET 0
-#define STACK_BOTTOM(tsk) STACK_LIMIT((tsk)->thread.esp0)
-#define STACK_TOP(tsk) ((tsk)->thread.esp0)
-#else
-#define UNW_FP(frame) ((void)(frame), 0)
-#endif
#define UNW_REGISTER_INFO \
PTREGS_INFO(eax), \
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_*/