2016-11-16 14:24:08 +01:00
|
|
|
/** @file
|
|
|
|
Contains the empty version of the EBC Debugger hooks, to be used when
|
|
|
|
compiling the regular EBC VM module.
|
|
|
|
As debugging is not needed for the standard EBC VM, all calls are left empty.
|
|
|
|
|
|
|
|
The EBC Debugger defines its own version for these calls in EbdHooks.c.
|
|
|
|
|
|
|
|
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
|
|
|
This program and the accompanying materials
|
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
2016-11-16 14:24:10 +01:00
|
|
|
#include "EbcDebuggerHook.h"
|
2016-11-16 14:24:08 +01:00
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in InitializeEbcDriver.
|
|
|
|
|
|
|
|
@param Handle - The EbcDebugProtocol handle.
|
|
|
|
@param EbcDebugProtocol - The EbcDebugProtocol interface.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookInit (
|
|
|
|
IN EFI_HANDLE Handle,
|
|
|
|
IN EFI_DEBUG_SUPPORT_PROTOCOL *EbcDebugProtocol
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in UnloadImage for EBC Interpreter.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookUnload (
|
|
|
|
VOID
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in EbcUnloadImage.
|
|
|
|
Currently do nothing here.
|
|
|
|
|
|
|
|
@param Handle The EbcImage handle.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookEbcUnloadImage (
|
|
|
|
IN EFI_HANDLE Handle
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in ExecuteEbcImageEntryPoint.
|
|
|
|
|
|
|
|
@param VmPtr - pointer to VM context.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookExecuteEbcImageEntryPoint (
|
|
|
|
IN VM_CONTEXT *VmPtr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in ExecuteEbcImageEntryPoint.
|
|
|
|
|
|
|
|
@param VmPtr - pointer to VM context.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookEbcInterpret (
|
|
|
|
IN VM_CONTEXT *VmPtr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
The hook in EbcExecute, before ExecuteFunction.
|
|
|
|
|
|
|
|
@param VmPtr - pointer to VM context.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookExecuteStart (
|
|
|
|
IN VM_CONTEXT *VmPtr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
The hook in EbcExecute, after ExecuteFunction.
|
|
|
|
|
|
|
|
@param VmPtr - pointer to VM context.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookExecuteEnd (
|
|
|
|
IN VM_CONTEXT *VmPtr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in ExecuteCALL, before move IP.
|
|
|
|
|
|
|
|
@param VmPtr - pointer to VM context.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookCALLStart (
|
|
|
|
IN VM_CONTEXT *VmPtr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in ExecuteCALL, after move IP.
|
|
|
|
|
|
|
|
@param VmPtr - pointer to VM context.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookCALLEnd (
|
|
|
|
IN VM_CONTEXT *VmPtr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in ExecuteCALL, before call EbcLLCALLEX.
|
|
|
|
|
|
|
|
@param VmPtr - pointer to VM context.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookCALLEXStart (
|
|
|
|
IN VM_CONTEXT *VmPtr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in ExecuteCALL, after call EbcLLCALLEX.
|
|
|
|
|
|
|
|
@param VmPtr - pointer to VM context.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookCALLEXEnd (
|
|
|
|
IN VM_CONTEXT *VmPtr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in ExecuteRET, before move IP.
|
|
|
|
|
|
|
|
@param VmPtr - pointer to VM context.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookRETStart (
|
|
|
|
IN VM_CONTEXT *VmPtr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in ExecuteRET, after move IP.
|
|
|
|
|
|
|
|
@param VmPtr - pointer to VM context.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookRETEnd (
|
|
|
|
IN VM_CONTEXT *VmPtr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in ExecuteJMP, before move IP.
|
|
|
|
|
|
|
|
@param VmPtr - pointer to VM context.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookJMPStart (
|
|
|
|
IN VM_CONTEXT *VmPtr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in ExecuteJMP, after move IP.
|
|
|
|
|
|
|
|
@param VmPtr - pointer to VM context.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookJMPEnd (
|
|
|
|
IN VM_CONTEXT *VmPtr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in ExecuteJMP8, before move IP.
|
|
|
|
|
|
|
|
@param VmPtr - pointer to VM context.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookJMP8Start (
|
|
|
|
IN VM_CONTEXT *VmPtr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-12-05 04:33:52 +01:00
|
|
|
/**
|
|
|
|
|
|
|
|
The hook in ExecuteJMP8, after move IP..
|
|
|
|
|
|
|
|
@param VmPtr - pointer to VM context.
|
|
|
|
|
|
|
|
**/
|
2016-11-16 14:24:08 +01:00
|
|
|
VOID
|
|
|
|
EbcDebuggerHookJMP8End (
|
|
|
|
IN VM_CONTEXT *VmPtr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|