Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Commit 0d054ad

Browse files
christianscheuerjkotas
authored andcommitted
OSX unwind workaround (#2166)
OSX unwind workaround
1 parent 8526267 commit 0d054ad

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Native/Runtime/unix/UnixContext.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,12 @@ static void GetContextPointer(unw_cursor_t *cursor, unw_context_t *unwContext, i
396396
// Update REGDISPLAY from the unw_cursor_t and unw_context_t
397397
void UnwindCursorToRegDisplay(unw_cursor_t *cursor, unw_context_t *unwContext, REGDISPLAY *regDisplay)
398398
{
399-
#define GET_CONTEXT_POINTER(unwReg, rdReg) GetContextPointer(cursor, unwContext, unwReg, &regDisplay->p##rdReg);
400-
GET_CONTEXT_POINTERS
401-
#undef GET_CONTEXT_POINTER
399+
//TODO: Workaround for unwind on OSX: See https://github.com/dotnet/corert/pull/2166
400+
#if !defined(__APPLE__)
401+
#define GET_CONTEXT_POINTER(unwReg, rdReg) GetContextPointer(cursor, unwContext, unwReg, &regDisplay->p##rdReg);
402+
GET_CONTEXT_POINTERS
403+
#undef GET_CONTEXT_POINTER
404+
#endif
402405

403406
unw_get_reg(cursor, UNW_REG_IP, (unw_word_t *) &regDisplay->IP);
404407
unw_get_reg(cursor, UNW_REG_SP, (unw_word_t *) &regDisplay->SP);

0 commit comments

Comments
 (0)