@@ -36,7 +36,7 @@ public DkmStackWalkFrame PmipStackFrame()
36
36
var eval = EvaluateExpression ( call , r =>
37
37
{
38
38
isNull = r . Address . InstructionAddress . CPUInstructionPart . InstructionPointer == 0 ;
39
- result = r . Value ;
39
+ result = r . Value ? . Split ( '"' ) [ 1 ] ;
40
40
} ) ;
41
41
42
42
if ( ! eval || isNull )
@@ -53,24 +53,37 @@ public DkmStackWalkFrame PmipStackFrame()
53
53
_frame . Annotations ) ;
54
54
}
55
55
56
+ private DkmNativeInstructionAddress FindInstructionAddress ( string functionName )
57
+ {
58
+ foreach ( var module in this . _frame . RuntimeInstance . GetModuleInstances ( ) )
59
+ {
60
+ var address = ( module as DkmNativeModuleInstance ) ? . FindExportName ( functionName ,
61
+ IgnoreDataExports : true ) ;
62
+ if ( address != null )
63
+ return address ;
64
+ }
65
+ return null ;
66
+ }
67
+
56
68
private bool TryGetPmipFunction ( out PmipFunctionDataItem pmipFunction )
57
69
{
58
70
pmipFunction = _stackContext . GetDataItem < PmipFunctionDataItem > ( ) ;
59
71
if ( pmipFunction != null )
60
72
return true ;
61
73
62
- foreach ( var module in this . _frame . RuntimeInstance . GetModuleInstances ( ) )
63
- {
64
- var address = ( module as DkmNativeModuleInstance ) ? . FindExportName ( "mono_pmip" , IgnoreDataExports : true ) ;
65
- if ( address == null )
66
- continue ;
67
- var item = new PmipFunctionDataItem { PmipFunction = "0x" + address . CPUInstructionPart . InstructionPointer . ToString ( "X" ) } ;
68
- pmipFunction = item ;
69
- _stackContext . SetDataItem ( DkmDataCreationDisposition . CreateAlways , item ) ;
70
- return true ;
71
- }
74
+ var pmipOrig = FindInstructionAddress ( "mono_pmip" ) ;
75
+ var pmipPretty = FindInstructionAddress ( "mono_pmip_pretty" ) ;
76
+
77
+ var pmipFnToUse = pmipPretty ?? pmipOrig ;
78
+
79
+ if ( pmipFnToUse == null )
80
+ return false ;
81
+
82
+ var item = new PmipFunctionDataItem { PmipFunction = "0x" + pmipFnToUse . CPUInstructionPart . InstructionPointer . ToString ( "X" ) } ;
83
+ pmipFunction = item ;
84
+ _stackContext . SetDataItem ( DkmDataCreationDisposition . CreateAlways , item ) ;
72
85
73
- return false ;
86
+ return true ;
74
87
}
75
88
76
89
private static DkmLanguageExpression CppExpression ( string expression )
0 commit comments