diff options
author | SaeHie Park <saehie.park@gmail.com> | 2016-11-23 19:18:43 +0900 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2016-11-23 11:18:43 +0100 |
commit | 2c67c72643b8087924de1f931f47ae95f15dadb5 (patch) | |
tree | a4b9ad46e5e9b2ad08a879870d1e31999f2487d6 | |
parent | 2c6cbd6d9dee4ac4ca5fa4c04c8012262efe0b38 (diff) | |
download | coreclr-2c67c72643b8087924de1f931f47ae95f15dadb5.tar.gz coreclr-2c67c72643b8087924de1f931f47ae95f15dadb5.tar.bz2 coreclr-2c67c72643b8087924de1f931f47ae95f15dadb5.zip |
[x86/linux] Fix redefined DISPATCHER_CONTEXT compile error (#8246)
WIP, fix compile error for x86/Linux
- add directive WIN32 to current DISPATCHER_CONTEXT in clrnt.h
- add DISPATCHER_CONTEXT for x86 in palrt.h
-rw-r--r-- | src/inc/clrnt.h | 9 | ||||
-rw-r--r-- | src/pal/inc/rt/palrt.h | 20 |
2 files changed, 21 insertions, 8 deletions
diff --git a/src/inc/clrnt.h b/src/inc/clrnt.h index c15bd48fa8..a1eefe849e 100644 --- a/src/inc/clrnt.h +++ b/src/inc/clrnt.h @@ -835,18 +835,13 @@ RtlVirtualUnwind_Unsafe( // X86 // -#if defined(_TARGET_X86_) - -#pragma warning(push) -#pragma warning (disable:4035) // disable 4035 (function must return something) -#define PcTeb 0x18 -#pragma warning(pop) +#if defined(_TARGET_X86_) && !defined(FEATURE_PAL) typedef struct _DISPATCHER_CONTEXT { _EXCEPTION_REGISTRATION_RECORD* RegistrationPointer; } DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT; -#endif // _TARGET_X86_ +#endif // _TARGET_X86_ && !FEATURE_PAL #ifdef _TARGET_ARM_ #include "daccess.h" diff --git a/src/pal/inc/rt/palrt.h b/src/pal/inc/rt/palrt.h index 6d758039a9..f4fa78aabf 100644 --- a/src/pal/inc/rt/palrt.h +++ b/src/pal/inc/rt/palrt.h @@ -1516,7 +1516,7 @@ typedef struct _DISPATCHER_CONTEXT { ULONG64 Reserved; } DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT; -#else +#elif defined(_AMD64_) typedef struct _DISPATCHER_CONTEXT { ULONG64 ControlPc; @@ -1530,6 +1530,24 @@ typedef struct _DISPATCHER_CONTEXT { PUNWIND_HISTORY_TABLE HistoryTable; } DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT; +#elif defined(_X86_) + +typedef struct _DISPATCHER_CONTEXT { + DWORD ControlPc; + DWORD ImageBase; + PRUNTIME_FUNCTION FunctionEntry; + DWORD EstablisherFrame; + DWORD TargetIp; + PCONTEXT ContextRecord; + PEXCEPTION_ROUTINE LanguageHandler; + PVOID HandlerData; + PUNWIND_HISTORY_TABLE HistoryTable; +} DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT; + +#else + +#error Unknown architecture for defining DISPATCHER_CONTEXT. + #endif // #endif // !defined(_TARGET_MAC64) |