diff options
author | Jonghyun Park <parjong@gmail.com> | 2017-01-23 19:46:37 +0900 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2017-01-23 11:46:37 +0100 |
commit | 347243f80d62d5aaa5359ef8c8d5331b6d8e4a63 (patch) | |
tree | 82fa5ea05a77885661cc070d4d84026bbb4d9536 /src/inc | |
parent | 62ac5f04456e517b76bcfc3d386859a506eed6d1 (diff) | |
download | coreclr-347243f80d62d5aaa5359ef8c8d5331b6d8e4a63.tar.gz coreclr-347243f80d62d5aaa5359ef8c8d5331b6d8e4a63.tar.bz2 coreclr-347243f80d62d5aaa5359ef8c8d5331b6d8e4a63.zip |
[x86/Linux] Enable FEATURE_EH_FUNCLETS (#8889)
* [x86/Linux] (Partially) Enable FEATURE_EH_FUNCLETS
* Update CLR ABI Document
* Add TODO (for Funclet Prolog/Epilog Gen)
Diffstat (limited to 'src/inc')
-rw-r--r-- | src/inc/clrnt.h | 22 | ||||
-rw-r--r-- | src/inc/win64unwind.h | 9 |
2 files changed, 20 insertions, 11 deletions
diff --git a/src/inc/clrnt.h b/src/inc/clrnt.h index 9a4601ebaf..08a93a4961 100644 --- a/src/inc/clrnt.h +++ b/src/inc/clrnt.h @@ -855,25 +855,25 @@ typedef struct _DISPATCHER_CONTEXT { #define RUNTIME_FUNCTION__SetBeginAddress(prf,addr) ((prf)->BeginAddress = (addr)) #ifdef WIN64EXCEPTIONS -EXTERN_C ULONG +#include "win64unwind.h" + +FORCEINLINE +DWORD RtlpGetFunctionEndAddress ( __in PT_RUNTIME_FUNCTION FunctionEntry, - __in ULONG ImageBase - ); + __in TADDR ImageBase + ) +{ + PUNWIND_INFO pUnwindInfo = (PUNWIND_INFO)(ImageBase + FunctionEntry->UnwindData); + + return FunctionEntry->BeginAddress + pUnwindInfo->FunctionLength; +} #define RUNTIME_FUNCTION__EndAddress(prf, ImageBase) RtlpGetFunctionEndAddress(prf, ImageBase) #define RUNTIME_FUNCTION__GetUnwindInfoAddress(prf) (prf)->UnwindData #define RUNTIME_FUNCTION__SetUnwindInfoAddress(prf, addr) do { (prf)->UnwindData = (addr); } while(0) -#define UNW_FLAG_NHANDLER 0x0 /* any handler */ -#define UNW_FLAG_EHANDLER 0x1 /* filter handler */ -#define UNW_FLAG_UHANDLER 0x2 /* unwind handler */ - -typedef struct _UNWIND_INFO { - // dummy -} UNWIND_INFO, *PUNWIND_INFO; - EXTERN_C NTSYSAPI PEXCEPTION_ROUTINE diff --git a/src/inc/win64unwind.h b/src/inc/win64unwind.h index 196052aca9..e4cea023b2 100644 --- a/src/inc/win64unwind.h +++ b/src/inc/win64unwind.h @@ -89,6 +89,14 @@ typedef union _UNWIND_CODE { #define UNW_FLAG_UHANDLER 0x2 #define UNW_FLAG_CHAININFO 0x4 +#ifdef _TARGET_X86_ + +typedef struct _UNWIND_INFO { + ULONG FunctionLength; +} UNWIND_INFO, *PUNWIND_INFO; + +#else // _TARGET_X86_ + typedef struct _UNWIND_INFO { UCHAR Version : 3; UCHAR Flags : 5; @@ -114,4 +122,5 @@ typedef struct _UNWIND_INFO { } UNWIND_INFO, *PUNWIND_INFO; +#endif // _TARGET_X86_ #endif // _WIN64UNWIND_H_ |