summaryrefslogtreecommitdiff
path: root/src/pal/src/exception/seh-unwind.cpp
diff options
context:
space:
mode:
authorGeoff Norton <grompf@gmail.com>2015-02-20 08:32:03 -0800
committerGeoff Norton <grompf@gmail.com>2015-02-20 08:32:03 -0800
commit4f86dee3d943568bef119e415ea8576e11108b1a (patch)
treeb2fec63e46eb62d8ed989e96daf10227c3ee5bc1 /src/pal/src/exception/seh-unwind.cpp
parent44fb223c6240d303363dfa9003b17bc7cac753bc (diff)
downloadcoreclr-4f86dee3d943568bef119e415ea8576e11108b1a.tar.gz
coreclr-4f86dee3d943568bef119e415ea8576e11108b1a.tar.bz2
coreclr-4f86dee3d943568bef119e415ea8576e11108b1a.zip
Check for libunwind in configure, and setup seh-unwind to have possible other future alternatives
Diffstat (limited to 'src/pal/src/exception/seh-unwind.cpp')
-rw-r--r--src/pal/src/exception/seh-unwind.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pal/src/exception/seh-unwind.cpp b/src/pal/src/exception/seh-unwind.cpp
index b3b5d18f87..da4bed6989 100644
--- a/src/pal/src/exception/seh-unwind.cpp
+++ b/src/pal/src/exception/seh-unwind.cpp
@@ -28,8 +28,10 @@ Abstract:
#include "pal/context.h"
#include <dlfcn.h>
#include <exception>
+#if HAVE_LIBUNWIND_H
#define UNW_LOCAL_ONLY
#include <libunwind.h>
+#endif
//----------------------------------------------------------------------
// Exception Handling ABI Level I: Base ABI
@@ -74,6 +76,7 @@ struct __cxa_exception
// Virtual Unwinding
//----------------------------------------------------------------------
+#if HAVE_LIBUNWIND_H
#if UNWIND_CONTEXT_IS_UCONTEXT_T
static void WinContextToUnwindContext(CONTEXT *winContext, unw_context_t *unwContext)
{
@@ -195,6 +198,9 @@ BOOL PAL_VirtualUnwind(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextP
return TRUE;
}
+#else
+#error don't know how to unwind on this platform
+#endif
#if _DEBUG
//----------------------------------------------------------------------