File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,14 @@ void ExpressionFunctions::Init()
133
133
RegisterEasy (" arg.get,arg" , argget);
134
134
RegisterEasy (" arg.set" , argset);
135
135
136
+ // Exceptions
137
+ RegisterEasy (" ex.firstchance" , exfirstchance);
138
+ RegisterEasy (" ex.addr" , exaddr);
139
+ RegisterEasy (" ex.code" , excode);
140
+ RegisterEasy (" ex.flags" , exflags);
141
+ RegisterEasy (" ex.infocount" , exinfocount);
142
+ RegisterEasy (" ex.info" , exinfo);
143
+
136
144
// Undocumented
137
145
RegisterEasy (" bpgoto" , bpgoto);
138
146
}
Original file line number Diff line number Diff line change @@ -429,4 +429,36 @@ namespace Exprfunc
429
429
SetContextDataEx (hActiveThread, UE_CIP, cip);
430
430
return cip;
431
431
}
432
+
433
+ duint exfirstchance ()
434
+ {
435
+ return getLastExceptionInfo ().dwFirstChance ;
436
+ }
437
+
438
+ duint exaddr ()
439
+ {
440
+ return (duint)getLastExceptionInfo ().ExceptionRecord .ExceptionAddress ;
441
+ }
442
+
443
+ duint excode ()
444
+ {
445
+ return getLastExceptionInfo ().ExceptionRecord .ExceptionCode ;
446
+ }
447
+
448
+ duint exflags ()
449
+ {
450
+ return getLastExceptionInfo ().ExceptionRecord .ExceptionFlags ;
451
+ }
452
+
453
+ duint exinfocount ()
454
+ {
455
+ return getLastExceptionInfo ().ExceptionRecord .NumberParameters ;
456
+ }
457
+
458
+ duint exinfo (duint index)
459
+ {
460
+ if (index >= 16 )
461
+ return 0 ;
462
+ return getLastExceptionInfo ().ExceptionRecord .ExceptionInformation [index];
463
+ }
432
464
}
Original file line number Diff line number Diff line change @@ -72,4 +72,11 @@ namespace Exprfunc
72
72
duint argset (duint index, duint value);
73
73
74
74
duint bpgoto (duint cip);
75
+
76
+ duint exfirstchance ();
77
+ duint exaddr ();
78
+ duint excode ();
79
+ duint exflags ();
80
+ duint exinfocount ();
81
+ duint exinfo (duint index);
75
82
}
You can’t perform that action at this time.
0 commit comments