Skip to content

Commit 93b8abe

Browse files
committed
Implement IDkmSymbolDocumentCollectionQuery with a dummy function to fix C++ breakpoint placement issue
Implement trivail IDkmSymbolCompilerIdQuery as well.
1 parent 48c028f commit 93b8abe

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

LuaDkmDebugger/source.extension.vsixmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="LuaDkmDebugger.e3e2ef04-27c9-46a6-ad45-79bd29067eb6" Version="0.2.4" Language="en-US" Publisher="WheretIB" />
4+
<Identity Id="LuaDkmDebugger.e3e2ef04-27c9-46a6-ad45-79bd29067eb6" Version="0.2.5" Language="en-US" Publisher="WheretIB" />
55
<DisplayName>C++ debugger extensions for Lua</DisplayName>
66
<Description xml:space="preserve">This Visual Studio extension enables limited support for inspection of Lua (Version 5.3) state in C++ applications during debug.</Description>
77
<License>license.txt</License>

LuaDkmDebuggerComponent/LocalComponent.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ internal class LuaEvaluationDataItem : DkmDataItem
5151
public LuaValueDataBase luaValueData;
5252
}
5353

54-
public class LocalComponent : IDkmCallStackFilter, IDkmSymbolQuery, IDkmLanguageExpressionEvaluator
54+
public class LocalComponent : IDkmCallStackFilter, IDkmSymbolQuery, IDkmSymbolCompilerIdQuery, IDkmSymbolDocumentCollectionQuery, IDkmLanguageExpressionEvaluator
5555
{
5656
internal string ExecuteExpression(string expression, DkmStackContext stackContext, DkmStackWalkFrame input, bool allowZero, out ulong address)
5757
{
@@ -1076,5 +1076,16 @@ void IDkmLanguageExpressionEvaluator.SetValueAsString(DkmEvaluationResult result
10761076
{
10771077
errorText = "Missing evaluation data";
10781078
}
1079+
1080+
DkmCompilerId IDkmSymbolCompilerIdQuery.GetCompilerId(DkmInstructionSymbol instruction, DkmInspectionSession inspectionSession)
1081+
{
1082+
return new DkmCompilerId(Guids.luaCompilerGuid, Guids.luaLanguageGuid);
1083+
}
1084+
1085+
DkmResolvedDocument[] IDkmSymbolDocumentCollectionQuery.FindDocuments(DkmModule module, DkmSourceFileId sourceFileId)
1086+
{
1087+
// TODO: can we find a mapping from source line to loaded Lua scripts?
1088+
return module.FindDocuments(sourceFileId);
1089+
}
10791090
}
10801091
}

LuaDkmDebuggerComponent/LocalComponent.vsdconfigxml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
<SymbolProviderId RequiredValue="guidLuaSymbolProvider"/>
1818
</Filter>
1919
<Interface Name="IDkmSymbolQuery"/>
20+
<Interface Name="IDkmSymbolCompilerIdQuery"/>
21+
<Interface Name="IDkmSymbolDocumentCollectionQuery"/>
2022
</InterfaceGroup>
2123

2224
<InterfaceGroup>

0 commit comments

Comments
 (0)