Skip to content

Commit d9fa180

Browse files
author
Michael DeRoy
committed
fix crash, issue where pmip is not run on some frames
1 parent 3f54106 commit d9fa180

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

PmipCallStackFilter.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33

44
namespace PmipMyCallStack
55
{
6-
public class PmipCallStackFilter : IDkmCallStackFilter
7-
{
6+
public class PmipCallStackFilter : IDkmCallStackFilter
7+
{
8+
89
public DkmStackWalkFrame[] FilterNextFrame(DkmStackContext stackContext, DkmStackWalkFrame input)
910
{
1011
if (input == null) // after last frame
@@ -13,7 +14,7 @@ public DkmStackWalkFrame[] FilterNextFrame(DkmStackContext stackContext, DkmStac
1314
if (input.InstructionAddress == null) // error case
1415
return new[] { input };
1516

16-
if (input.InstructionAddress.ModuleInstance != null) // code in existing module
17+
if (input.InstructionAddress.ModuleInstance != null && input.InstructionAddress.ModuleInstance.Module != null) // code in existing module
1718
return new[] { input };
1819

1920
var runner = new PmipRunner(stackContext, input);

PmipRunner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public DkmStackWalkFrame PmipStackFrame()
3636
var eval = EvaluateExpression(call, r =>
3737
{
3838
isNull = r.Address.InstructionAddress.CPUInstructionPart.InstructionPointer == 0;
39-
result = isNull ? "<ERROR>" : r.Value?.Split('"')[1];
39+
result = r.Value ?? "<ERROR>";
4040
});
4141

4242
if (!eval || isNull)

0 commit comments

Comments
 (0)