Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 50adfc5

Browse files
chunseokleejanvorli
authored andcommitted
Enable gdbjit while NI file exist (#15501)
Current gdbjit does not work with NI files. This patch allows breakpoint to work with NI files when COMPlus_ZapDisable=1 Signed-off-by: chunseok lee <chunseok.lee@samsung.com>
1 parent fe5d34b commit 50adfc5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/vm/gdbjit.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2576,11 +2576,25 @@ void NotifyGdb::OnMethodPrepared(MethodDesc* methodDescPtr)
25762576
}
25772577
#endif
25782578

2579+
// remove '.ni.dll' or '.ni.exe' suffix from wszModuleFile
2580+
LPWSTR pNIExt = const_cast<LPWSTR>(wcsstr(wszModuleFile, W(".ni.exe"))); // where '.ni.exe' start at
2581+
if (!pNIExt)
2582+
{
2583+
pNIExt = const_cast<LPWSTR>(wcsstr(wszModuleFile, W(".ni.dll"))); // where '.ni.dll' start at
2584+
}
2585+
2586+
if (pNIExt)
2587+
{
2588+
wcscpy(pNIExt, W(".dll"));
2589+
}
2590+
25792591
if (isListedModule(wszModuleFile))
25802592
{
25812593
bool bEmitted = EmitDebugInfo(elfBuilder, methodDescPtr, pCode, codeSize);
25822594
bNotify = bNotify || bEmitted;
25832595
}
2596+
2597+
25842598
#ifdef FEATURE_GDBJIT_SYMTAB
25852599
else
25862600
{

0 commit comments

Comments
 (0)