From 01d07431ab6c60ec4e7f2a87255520d84a6ff8a2 Mon Sep 17 00:00:00 2001 From: Mikhail Kurinnoi Date: Wed, 6 Apr 2022 12:48:15 +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). --- 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..c3d89f5 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) + 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