Skip to content

Commit 1b054dc

Browse files
committed
Conditional breakpoint support for Lua 5.4
1 parent f0d1ef3 commit 1b054dc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

LuaDkmDebuggerComponent/RemoteComponent.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,6 @@ void IDkmLanguageConditionEvaluator.EvaluateCondition(DkmEvaluationBreakpointCon
639639
DebugHelpers.SkipStructPointer(process, ref temp); // top
640640
DebugHelpers.SkipStructPointer(process, ref temp); // l_G
641641
callInfoAddress = DebugHelpers.ReadStructPointer(process, ref temp).GetValueOrDefault(0);
642-
643642
}
644643
else if (processData.luaVersion == 503)
645644
{
@@ -649,6 +648,15 @@ void IDkmLanguageConditionEvaluator.EvaluateCondition(DkmEvaluationBreakpointCon
649648
DebugHelpers.SkipStructPointer(process, ref temp); // l_G
650649
callInfoAddress = DebugHelpers.ReadStructPointer(process, ref temp).GetValueOrDefault(0);
651650
}
651+
else if (processData.luaVersion == 504)
652+
{
653+
DebugHelpers.SkipStructByte(process, ref temp); // status
654+
DebugHelpers.SkipStructByte(process, ref temp); // allowhook
655+
DebugHelpers.SkipStructShort(process, ref temp); // nci
656+
DebugHelpers.SkipStructPointer(process, ref temp); // top
657+
DebugHelpers.SkipStructPointer(process, ref temp); // l_G
658+
callInfoAddress = DebugHelpers.ReadStructPointer(process, ref temp).GetValueOrDefault(0);
659+
}
652660

653661
if (callInfoAddress == 0)
654662
{

0 commit comments

Comments
 (0)