mirror of
https://github.com/HyperDbg/HyperDbg.git
synced 2026-07-24 00:14:44 +00:00
interpret local hwdbg scripts
This commit is contained in:
parent
595a78f776
commit
fe97da65b7
11 changed files with 400 additions and 7 deletions
|
|
@ -22,6 +22,8 @@ extern UINT64 * g_ScriptGlobalVariables;
|
|||
extern UINT64 * g_ScriptStackBuffer;
|
||||
extern UINT64 g_CurrentExprEvalResult;
|
||||
extern BOOLEAN g_CurrentExprEvalResultHasError;
|
||||
extern UINT64 * g_HwdbgPinsStatus;
|
||||
extern BOOLEAN g_HwdbgInstanceInfoIsValid;
|
||||
|
||||
//
|
||||
// Temporary structures used only for testing
|
||||
|
|
@ -711,6 +713,32 @@ ScriptEngineWrapperTestParser(const string & Expr)
|
|||
free(AllocationsForCastings.Buff6);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief test parser for hwdbg
|
||||
* @param Expr
|
||||
*
|
||||
* @return VOID
|
||||
*/
|
||||
VOID
|
||||
ScriptEngineWrapperTestParserForHwdbg(const string & Expr)
|
||||
{
|
||||
if (!g_HwdbgPinsStatus)
|
||||
{
|
||||
g_HwdbgPinsStatus = (UINT64 *)malloc(MAX_HWDBG_TESTING_PIN_COUNT * sizeof(UINT64));
|
||||
|
||||
if (g_HwdbgPinsStatus == NULL)
|
||||
{
|
||||
ShowMessages("err, could not allocate memory for hwdbg pins status");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
RtlZeroMemory(g_HwdbgPinsStatus, MAX_HWDBG_TESTING_PIN_COUNT * sizeof(UINT64));
|
||||
}
|
||||
|
||||
ScriptEngineEvalWrapper((PGUEST_REGS)g_HwdbgPinsStatus, Expr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief In the local debugging (VMI mode) environment, this function computes the expressions
|
||||
* @details for example, if the user u ExAllocatePoolWithTag+0x10 this will evaluate the expr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue