summaryrefslogtreecommitdiff
path: root/src/pal/src/exception/seh-unwind.cpp
diff options
context:
space:
mode:
authorBen Pye <ben@curlybracket.co.uk>2016-02-05 16:34:36 +0000
committerBen Pye <ben@curlybracket.co.uk>2016-02-05 17:42:55 +0000
commitc068030c11ef970f3223cba644166fcd76483496 (patch)
tree72dd95eadf614e2d6e28ba64f43a33f7a32ad4de /src/pal/src/exception/seh-unwind.cpp
parent6b039c47b9c7ab96c07d83dd3b1cc83ca5cc01db (diff)
downloadcoreclr-c068030c11ef970f3223cba644166fcd76483496.tar.gz
coreclr-c068030c11ef970f3223cba644166fcd76483496.tar.bz2
coreclr-c068030c11ef970f3223cba644166fcd76483496.zip
Detect libunwind features allowing LLVMs libunwind to be used
Diffstat (limited to 'src/pal/src/exception/seh-unwind.cpp')
-rw-r--r--src/pal/src/exception/seh-unwind.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pal/src/exception/seh-unwind.cpp b/src/pal/src/exception/seh-unwind.cpp
index fb2c32449c..5d3b353494 100644
--- a/src/pal/src/exception/seh-unwind.cpp
+++ b/src/pal/src/exception/seh-unwind.cpp
@@ -157,10 +157,7 @@ static void UnwindContextToWinContext(unw_cursor_t *cursor, CONTEXT *winContext)
static void GetContextPointer(unw_cursor_t *cursor, unw_context_t *unwContext, int reg, SIZE_T **contextPointer)
{
-#if defined(__APPLE__)
- // Returning NULL indicates that we don't have context pointers available
- *contextPointer = NULL;
-#else
+#if defined(HAVE_UNW_GET_SAVE_LOC)
unw_save_loc_t saveLoc;
unw_get_save_loc(cursor, reg, &saveLoc);
if (saveLoc.type == UNW_SLT_MEMORY)
@@ -170,6 +167,9 @@ static void GetContextPointer(unw_cursor_t *cursor, unw_context_t *unwContext, i
if (unwContext == NULL || (pLoc < (SIZE_T *)unwContext) || ((SIZE_T *)(unwContext + 1) <= pLoc))
*contextPointer = (SIZE_T *)saveLoc.u.addr;
}
+#else
+ // Returning NULL indicates that we don't have context pointers available
+ *contextPointer = NULL;
#endif
}
@@ -302,7 +302,7 @@ BOOL PAL_VirtualUnwind(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextP
// These methods are only used on the AMD64 build
#ifdef _AMD64_
-#ifdef __LINUX__
+#ifdef HAVE_UNW_GET_ACCESSORS
static struct LibunwindCallbacksInfoType
{
@@ -528,7 +528,7 @@ Exit:
}
return result;
}
-#else // __LINUX__
+#else // HAVE_UNW_GET_ACCESSORS
BOOL PAL_VirtualUnwindOutOfProc(CONTEXT *context,
KNONVOLATILE_CONTEXT_POINTERS *contextPointers,
@@ -539,7 +539,7 @@ BOOL PAL_VirtualUnwindOutOfProc(CONTEXT *context,
return FALSE;
}
-#endif // !__LINUX__
+#endif // !HAVE_UNW_GET_ACCESSORS
#endif // _AMD64_
/*++