From 331d95adc593057bfb7642015e81c14a695e90d9 Mon Sep 17 00:00:00 2001 From: Mikhail Kurinnoi Date: Thu, 7 Apr 2022 15:21:54 +0300 Subject: [PATCH] [Tizen] Enable Hot Reload debugger API. Note, we use part debugger API related to EnC in order to work with Hot Reload from debugger. EnC itself not implemented (runtime don't have code for Linux arm32/arm64/x86 that could "jump" from old method version into new method version). At this moment, runtime don't support Hot Reload for Linux/Tizen x86. --- src/coreclr/clrdefinitions.cmake | 3 +++ src/coreclr/debug/di/module.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/coreclr/clrdefinitions.cmake b/src/coreclr/clrdefinitions.cmake index 796032b..7dd2904 100644 --- a/src/coreclr/clrdefinitions.cmake +++ b/src/coreclr/clrdefinitions.cmake @@ -65,6 +65,9 @@ if(CLR_CMAKE_TARGET_ARCH_AMD64 OR (CLR_CMAKE_TARGET_ARCH_I386 AND CLR_CMAKE_TARG add_compile_definitions($<$>>:FEATURE_ENC_SUPPORTED>) endif(CLR_CMAKE_TARGET_WIN32) endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR (CLR_CMAKE_TARGET_ARCH_I386 AND CLR_CMAKE_TARGET_WIN32)) +if(CLR_CMAKE_TARGET_TIZEN_LINUX AND NOT CLR_CMAKE_TARGET_ARCH_I386) + add_compile_definitions($<$>>:FEATURE_TIZEN_HOT_RELOAD_SUPPORTED>) +endif(CLR_CMAKE_TARGET_TIZEN_LINUX) # Features - please keep them alphabetically sorted if(CLR_CMAKE_TARGET_WIN32) diff --git a/src/coreclr/debug/di/module.cpp b/src/coreclr/debug/di/module.cpp index 6ae996c..e72e765 100644 --- a/src/coreclr/debug/di/module.cpp +++ b/src/coreclr/debug/di/module.cpp @@ -2158,7 +2158,7 @@ HRESULT CordbModule::ApplyChanges(ULONG cbMetaData, FAIL_IF_NEUTERED(this); ATT_REQUIRE_STOPPED_MAY_FAIL(GetProcess()); -#ifdef FEATURE_ENC_SUPPORTED +#if defined(FEATURE_ENC_SUPPORTED) || defined(FEATURE_TIZEN_HOT_RELOAD_SUPPORTED) // We enable EnC back in code:CordbModule::SetJITCompilerFlags. // If EnC isn't enabled, then we'll fail in the LS when we try to ApplyChanges. // We'd expect a well-behaved debugger to never actually land here. @@ -2274,7 +2274,7 @@ HRESULT CordbModule::ApplyChangesInternal(ULONG cbMetaData, if (m_vmDomainFile.IsNull()) return E_UNEXPECTED; -#ifdef FEATURE_ENC_SUPPORTED +#if defined(FEATURE_ENC_SUPPORTED) || defined(FEATURE_TIZEN_HOT_RELOAD_SUPPORTED) HRESULT hr; void * pRemoteBuf = NULL; -- 2.7.4