diff options
-rw-r--r-- | src/debug/ee/debugger.cpp | 4 | ||||
-rw-r--r-- | src/debug/ee/debugger.h | 8 | ||||
-rw-r--r-- | src/inc/switches.h | 3 | ||||
-rw-r--r-- | src/vm/disassembler.h | 11 | ||||
-rw-r--r-- | src/vm/gccover.cpp | 4 |
5 files changed, 17 insertions, 13 deletions
diff --git a/src/debug/ee/debugger.cpp b/src/debug/ee/debugger.cpp index 5066e96020..0ea8706db9 100644 --- a/src/debug/ee/debugger.cpp +++ b/src/debug/ee/debugger.cpp @@ -1047,11 +1047,11 @@ MemoryRange Debugger::s_hijackFunction[kMaxHijackFunctions] = RedirectedHandledJITCaseForUserSuspend_StubEnd), GetMemoryRangeForFunction(RedirectedHandledJITCaseForYieldTask_Stub, RedirectedHandledJITCaseForYieldTask_StubEnd) -#ifdef HAVE_GCCOVER +#if defined(HAVE_GCCOVER) && defined(_TARGET_AMD64_) , GetMemoryRangeForFunction(RedirectedHandledJITCaseForGCStress_Stub, RedirectedHandledJITCaseForGCStress_StubEnd) -#endif // HAVE_GCCOVER +#endif // HAVE_GCCOVER && _TARGET_AMD64_ }; #endif // FEATURE_HIJACK && !PLATFORM_UNIX diff --git a/src/debug/ee/debugger.h b/src/debug/ee/debugger.h index 13cc5be14b..56d21c4962 100644 --- a/src/debug/ee/debugger.h +++ b/src/debug/ee/debugger.h @@ -2884,9 +2884,9 @@ private: kRedirectedForDbgThreadControl, kRedirectedForUserSuspend, kRedirectedForYieldTask, -#ifdef HAVE_GCCOVER +#if defined(HAVE_GCCOVER) && defined(_TARGET_AMD64_) kRedirectedForGCStress, -#endif // HAVE_GCCOVER +#endif // HAVE_GCCOVER && _TARGET_AMD64_ kMaxHijackFunctions, }; @@ -2975,10 +2975,10 @@ void RedirectedHandledJITCaseForUserSuspend_StubEnd(); void RedirectedHandledJITCaseForYieldTask_Stub(); void RedirectedHandledJITCaseForYieldTask_StubEnd(); -#ifdef HAVE_GCCOVER +#if defined(HAVE_GCCOVER) && defined(_TARGET_AMD64_) void RedirectedHandledJITCaseForGCStress_Stub(); void RedirectedHandledJITCaseForGCStress_StubEnd(); -#endif // HAVE_GCCOVER +#endif // HAVE_GCCOVER && _TARGET_AMD64_ }; diff --git a/src/inc/switches.h b/src/inc/switches.h index ddf3c5b6ac..be7daafedb 100644 --- a/src/inc/switches.h +++ b/src/inc/switches.h @@ -140,8 +140,7 @@ #error "Platform must support either safe thread suspension or GC polling" #endif -// GCCoverage has a dependency on msvcdisXXX.dll, which is not available for CoreSystem. Hence, it is disabled for CoreSystem builds. -#if defined(STRESS_HEAP) && defined(_DEBUG) && defined(FEATURE_HIJACK) && (!defined(FEATURE_CORECLR) || (defined(WIN32) || defined(__LINUX__)) && defined(_TARGET_AMD64_)) +#if defined(STRESS_HEAP) && defined(_DEBUG) && defined(FEATURE_HIJACK) #define HAVE_GCCOVER #endif diff --git a/src/vm/disassembler.h b/src/vm/disassembler.h index 68ac15c93d..1abda0f828 100644 --- a/src/vm/disassembler.h +++ b/src/vm/disassembler.h @@ -11,9 +11,14 @@ #define USE_COREDISTOOLS_DISASSEMBLER 0 #define USE_MSVC_DISASSEMBLER 0 #ifdef HAVE_GCCOVER - #ifdef FEATURE_CORECLR - #undef USE_COREDISTOOLS_DISASSEMBLER - #define USE_COREDISTOOLS_DISASSEMBLER 1 + #if defined(FEATURE_CORECLR) + // COREDISTOOLS disassembler only supports amd64, so if this is + // CoreCLR but not amd64, we will fall out of this check and not + // set USE_DISASSEMBLER. + #if defined(_TARGET_AMD64_) + #undef USE_COREDISTOOLS_DISASSEMBLER + #define USE_COREDISTOOLS_DISASSEMBLER 1 + #endif #elif defined(_TARGET_AMD64_) || defined(_TARGET_X86_) #undef USE_MSVC_DISASSEMBLER #define USE_MSVC_DISASSEMBLER 1 diff --git a/src/vm/gccover.cpp b/src/vm/gccover.cpp index fd5a6154b4..c38e64533a 100644 --- a/src/vm/gccover.cpp +++ b/src/vm/gccover.cpp @@ -378,7 +378,7 @@ void GCCoverageInfo::SprinkleBreakpoints( size_t regionOffsetAdj, BOOL fZapped) { -#if defined(_TARGET_X86_) || defined(_TARGET_AMD64_) +#if (defined(_TARGET_X86_) || defined(_TARGET_AMD64_)) && USE_DISASSEMBLER BYTE * codeStart = (BYTE *)pCode; @@ -695,7 +695,7 @@ void replaceSafePointInstructionWithGcStressInstr(UINT32 safePointOffset, LPVOID { //Target is calculated wrt the saved instruction pointer //Find the real target wrt the real instruction pointer - int delta = target - savedInstrPtr; + int delta = static_cast<int>(target - savedInstrPtr); target = delta + instrPtr; MethodDesc* targetMD = getTargetMethodDesc((PCODE)target); |