DBG: add expression functions for exception information
This commit is contained in:
parent
1e075142a5
commit
0a77a1cb00
|
@ -133,6 +133,14 @@ void ExpressionFunctions::Init()
|
|||
RegisterEasy("arg.get,arg", argget);
|
||||
RegisterEasy("arg.set", argset);
|
||||
|
||||
//Exceptions
|
||||
RegisterEasy("ex.firstchance", exfirstchance);
|
||||
RegisterEasy("ex.addr", exaddr);
|
||||
RegisterEasy("ex.code", excode);
|
||||
RegisterEasy("ex.flags", exflags);
|
||||
RegisterEasy("ex.infocount", exinfocount);
|
||||
RegisterEasy("ex.info", exinfo);
|
||||
|
||||
//Undocumented
|
||||
RegisterEasy("bpgoto", bpgoto);
|
||||
}
|
||||
|
|
|
@ -429,4 +429,36 @@ namespace Exprfunc
|
|||
SetContextDataEx(hActiveThread, UE_CIP, cip);
|
||||
return cip;
|
||||
}
|
||||
|
||||
duint exfirstchance()
|
||||
{
|
||||
return getLastExceptionInfo().dwFirstChance;
|
||||
}
|
||||
|
||||
duint exaddr()
|
||||
{
|
||||
return (duint)getLastExceptionInfo().ExceptionRecord.ExceptionAddress;
|
||||
}
|
||||
|
||||
duint excode()
|
||||
{
|
||||
return getLastExceptionInfo().ExceptionRecord.ExceptionCode;
|
||||
}
|
||||
|
||||
duint exflags()
|
||||
{
|
||||
return getLastExceptionInfo().ExceptionRecord.ExceptionFlags;
|
||||
}
|
||||
|
||||
duint exinfocount()
|
||||
{
|
||||
return getLastExceptionInfo().ExceptionRecord.NumberParameters;
|
||||
}
|
||||
|
||||
duint exinfo(duint index)
|
||||
{
|
||||
if(index >= 16)
|
||||
return 0;
|
||||
return getLastExceptionInfo().ExceptionRecord.ExceptionInformation[index];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,4 +72,11 @@ namespace Exprfunc
|
|||
duint argset(duint index, duint value);
|
||||
|
||||
duint bpgoto(duint cip);
|
||||
|
||||
duint exfirstchance();
|
||||
duint exaddr();
|
||||
duint excode();
|
||||
duint exflags();
|
||||
duint exinfocount();
|
||||
duint exinfo(duint index);
|
||||
}
|
Loading…
Reference in New Issue