Move required _Unwind_* definitions to src/vm/exceptionhandling.cpp; Remove src/pal...
authorIlia <ki.stfu@gmail.com>
Mon, 28 Oct 2019 23:20:47 +0000 (02:20 +0300)
committerJan Kotas <jkotas@microsoft.com>
Mon, 28 Oct 2019 23:20:46 +0000 (16:20 -0700)
Fixes dotnet/coreclr#27503

Commit migrated from https://github.com/dotnet/coreclr/commit/2773be53ea7e8e1b9297b167c697ccd22f4cfb42

src/coreclr/src/pal/inc/pal.h
src/coreclr/src/pal/inc/pal_unwind.h [deleted file]
src/coreclr/src/vm/exceptionhandling.cpp

index bbbc5a6bdcf26c0d2c2a73b75586c523be7bf4ea..01eb3f7489a795fcbb88b05e704ef478e339d8ff 100644 (file)
@@ -4594,8 +4594,6 @@ PAL_GetJitCpuCapabilityFlags(CORJIT_FLAGS *flags);
 
 #ifdef __cplusplus
 
-#include "pal_unwind.h"
-
 PALIMPORT
 VOID
 PALAPI
diff --git a/src/coreclr/src/pal/inc/pal_unwind.h b/src/coreclr/src/pal/inc/pal_unwind.h
deleted file mode 100644 (file)
index 93ba644..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-//
-// Definition of the Unwind API functions.
-// Taken from the ABI documentation.
-//
-
-
-
-#ifndef __PAL_UNWIND_H__
-#define __PAL_UNWIND_H__
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif // __cplusplus
-
-    //
-    // Exception Handling ABI Level I: Base ABI
-    //
-
-    typedef enum
-    {
-        _URC_NO_REASON = 0,
-        _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
-        _URC_FATAL_PHASE2_ERROR = 2,
-        _URC_FATAL_PHASE1_ERROR = 3,
-        _URC_NORMAL_STOP = 4,
-        _URC_END_OF_STACK = 5,
-        _URC_HANDLER_FOUND = 6,
-        _URC_INSTALL_CONTEXT = 7,
-        _URC_CONTINUE_UNWIND = 8,
-    } _Unwind_Reason_Code;
-
-    typedef enum
-    {
-        _UA_SEARCH_PHASE = 1,
-        _UA_CLEANUP_PHASE = 2,
-        _UA_HANDLER_FRAME = 4,
-        _UA_FORCE_UNWIND = 8,
-    } _Unwind_Action;
-    #define _UA_PHASE_MASK (_UA_SEARCH_PHASE|_UA_CLEANUP_PHASE)
-
-    struct _Unwind_Context;
-
-    void *_Unwind_GetIP(struct _Unwind_Context *context);
-    void _Unwind_SetIP(struct _Unwind_Context *context, void *new_value);
-    void *_Unwind_GetCFA(struct _Unwind_Context *context);
-    void *_Unwind_GetGR(struct _Unwind_Context *context, int index);
-    void _Unwind_SetGR(struct _Unwind_Context *context, int index, void *new_value);
-
-    struct _Unwind_Exception;
-
-    typedef void (*_Unwind_Exception_Cleanup_Fn)(
-        _Unwind_Reason_Code urc,
-        struct _Unwind_Exception *exception_object);
-
-    struct _Unwind_Exception
-    {
-        ULONG64 exception_class;
-        _Unwind_Exception_Cleanup_Fn exception_cleanup;
-        UINT_PTR private_1;
-        UINT_PTR private_2;
-    } __attribute__((aligned));
-
-    void _Unwind_DeleteException(struct _Unwind_Exception *exception_object);
-
-    typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)(struct _Unwind_Context *context, void *pvParam);
-    _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn pfnTrace, void *pvParam);
-
-    _Unwind_Reason_Code _Unwind_RaiseException(struct _Unwind_Exception *exception_object);
-    __attribute__((noreturn)) void _Unwind_Resume(struct _Unwind_Exception *exception_object);
-
-    //
-    // Exception Handling ABI Level II: C++ ABI
-    //
-
-    void *__cxa_begin_catch(void *exceptionObject);
-    void __cxa_end_catch();
-
-#ifdef __cplusplus
-};
-#endif // __cplusplus
-
-#endif // __PAL_UNWIND_H__
index cd95a791897cc43cd2389f06fb309b9f6b2c33de..204fbf8b901a5525ad25320a0bd988fc982796ca 100644 (file)
@@ -5839,6 +5839,16 @@ void CleanUpForSecondPass(Thread* pThread, bool fIsSO, LPVOID MemoryStackFpForFr
 
 #ifdef FEATURE_PAL
 
+typedef enum
+{
+    _URC_FATAL_PHASE1_ERROR = 3,
+} _Unwind_Reason_Code;
+typedef enum
+{
+} _Unwind_Action;
+struct _Unwind_Context;
+struct _Unwind_Exception;
+
 // This is a personality routine for TheUMEntryPrestub and UMThunkStub Unix asm stubs.
 // An exception propagating through these stubs is an unhandled exception.
 // This function dumps managed stack trace and terminates the current process.