From 7702a18197fa51dfbb19c352a0371d95d6030156 Mon Sep 17 00:00:00 2001 From: chunseok lee Date: Thu, 14 Dec 2017 10:04:03 +0900 Subject: [PATCH] Enable gdbjit while NI file exist Signed-off-by: chunseok lee --- src/vm/gdbjit.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/vm/gdbjit.cpp b/src/vm/gdbjit.cpp index 50f1bb2..5bf0524 100644 --- a/src/vm/gdbjit.cpp +++ b/src/vm/gdbjit.cpp @@ -2477,6 +2477,18 @@ void NotifyGdb::OnMethodCompiled(MethodDesc* methodDescPtr) } #endif + // remove '.ni.dll' or '.ni.exe' suffix from wszModuleFile + LPWSTR pNIExt = const_cast(wcsstr(wszModuleFile, W(".ni.exe"))); // where '.ni.exe' start at + if (!pNIExt) + { + pNIExt = const_cast(wcsstr(wszModuleFile, W(".ni.dll"))); // where '.ni.dll' start at + } + + if (pNIExt) + { + wcscpy(pNIExt, W(".dll")); + } + if (isListedModule(wszModuleFile)) { bool bEmitted = EmitDebugInfo(elfBuilder, methodDescPtr, pCode, codeSize, szModuleFile); -- 2.7.4