Skip to content

Commit 97cce92

Browse files
authored
Merge pull request #1 from fsfod/fix/luadll
Allow debuging Lua built as a DLL
2 parents 9432b14 + afbcf0f commit 97cce92

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

LuaDkmDebuggerComponent/LocalComponent.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1964,7 +1964,10 @@ void IDkmModuleInstanceLoadNotification.OnModuleInstanceLoad(DkmModuleInstance m
19641964

19651965
var processData = DebugHelpers.GetOrCreateDataItem<LuaLocalProcessData>(process);
19661966

1967-
if (nativeModuleInstance.FullName != null && nativeModuleInstance.FullName.EndsWith(".exe") && processData.moduleWithLoadedLua == null)
1967+
var moduleName = nativeModuleInstance.FullName;
1968+
1969+
if (moduleName != null && (moduleName.EndsWith(".exe") || Path.GetFileName(moduleName).IndexOf("lua", StringComparison.InvariantCultureIgnoreCase) != -1) &&
1970+
processData.moduleWithLoadedLua == null)
19681971
{
19691972
// Request the RemoteComponent to create the runtime and a module
19701973
DkmCustomMessage.Create(process.Connection, process, MessageToRemote.guid, MessageToRemote.createRuntime, null, null).SendLower();

0 commit comments

Comments
 (0)