TianoCore EDK2 master
Loading...
Searching...
No Matches
EbcDebuggerHook.h File Reference
#include <Uefi.h>
#include <Protocol/DebugSupport.h>
#include <Protocol/EbcVmTest.h>

Go to the source code of this file.

Functions

EFI_STATUS EbcDebugSignalException (IN EFI_EXCEPTION_TYPE ExceptionType, IN EXCEPTION_FLAGS ExceptionFlags, IN VM_CONTEXT *VmPtr)
 
VOID EbcDebuggerHookInit (IN EFI_HANDLE Handle, IN EFI_DEBUG_SUPPORT_PROTOCOL *EbcDebugProtocol)
 
VOID EbcDebuggerHookUnload (VOID)
 
VOID EbcDebuggerHookEbcUnloadImage (IN EFI_HANDLE Handle)
 
VOID EbcDebuggerHookExecuteEbcImageEntryPoint (IN VM_CONTEXT *VmPtr)
 
VOID EbcDebuggerHookEbcInterpret (IN VM_CONTEXT *VmPtr)
 
VOID EbcDebuggerHookExecuteStart (IN VM_CONTEXT *VmPtr)
 
VOID EbcDebuggerHookExecuteEnd (IN VM_CONTEXT *VmPtr)
 
VOID EbcDebuggerHookCALLStart (IN VM_CONTEXT *VmPtr)
 
VOID EbcDebuggerHookCALLEnd (IN VM_CONTEXT *VmPtr)
 
VOID EbcDebuggerHookCALLEXStart (IN VM_CONTEXT *VmPtr)
 
VOID EbcDebuggerHookCALLEXEnd (IN VM_CONTEXT *VmPtr)
 
VOID EbcDebuggerHookRETStart (IN VM_CONTEXT *VmPtr)
 
VOID EbcDebuggerHookRETEnd (IN VM_CONTEXT *VmPtr)
 
VOID EbcDebuggerHookJMPStart (IN VM_CONTEXT *VmPtr)
 
VOID EbcDebuggerHookJMPEnd (IN VM_CONTEXT *VmPtr)
 
VOID EbcDebuggerHookJMP8Start (IN VM_CONTEXT *VmPtr)
 
VOID EbcDebuggerHookJMP8End (IN VM_CONTEXT *VmPtr)
 

Detailed Description

Prototypes for the EBC Debugger hooks.

Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file EbcDebuggerHook.h.

Function Documentation

◆ EbcDebuggerHookCALLEnd()

VOID EbcDebuggerHookCALLEnd ( IN VM_CONTEXT VmPtr)

The hook in ExecuteCALL, after move IP.

Parameters
VmPtr- pointer to VM context.

The hook in ExecuteCALL, after move IP. It will record Callstack, trace information and record StepOver/StepOut Entry if need.

Parameters
VmPtr- pointer to VM context.

Definition at line 679 of file EdbHook.c.

◆ EbcDebuggerHookCALLEXEnd()

VOID EbcDebuggerHookCALLEXEnd ( IN VM_CONTEXT VmPtr)

The hook in ExecuteCALL, after call EbcLLCALLEX.

Parameters
VmPtr- pointer to VM context.

The hook in ExecuteCALL, after call EbcLLCALLEX. It will record trace information.

Parameters
VmPtr- pointer to VM context.

Definition at line 740 of file EdbHook.c.

◆ EbcDebuggerHookCALLEXStart()

VOID EbcDebuggerHookCALLEXStart ( IN VM_CONTEXT VmPtr)

The hook in ExecuteCALL, before call EbcLLCALLEX.

Parameters
VmPtr- pointer to VM context.

The hook in ExecuteCALL, before call EbcLLCALLEX. It will trigger Exception if BOCX enabled, and record Callstack information.

Parameters
VmPtr- pointer to VM context.

Definition at line 720 of file EdbHook.c.

◆ EbcDebuggerHookCALLStart()

VOID EbcDebuggerHookCALLStart ( IN VM_CONTEXT VmPtr)

The hook in ExecuteCALL, before move IP.

Parameters
VmPtr- pointer to VM context.

The hook in ExecuteCALL, before move IP. It will trigger Exception if BOC enabled, and record Callstack, and trace information.

Parameters
VmPtr- pointer to VM context.

Definition at line 658 of file EdbHook.c.

◆ EbcDebuggerHookEbcInterpret()

VOID EbcDebuggerHookEbcInterpret ( IN VM_CONTEXT VmPtr)

The hook in ExecuteEbcImageEntryPoint.

Parameters
VmPtr- pointer to VM context.

The hook in ExecuteEbcImageEntryPoint. It will record the call-stack entry. (-2 means EbcInterpret call) and trigger Exception if BOT enabled.

Parameters
VmPtr- pointer to VM context.

Definition at line 529 of file EdbHook.c.

◆ EbcDebuggerHookEbcUnloadImage()

VOID EbcDebuggerHookEbcUnloadImage ( IN EFI_HANDLE  Handle)

The hook in EbcUnloadImage. Currently do nothing here.

Parameters
HandleThe EbcImage handle.

The hook in EbcUnloadImage. Currently do nothing here.

Parameters
Handle- The EbcImage handle.

Definition at line 490 of file EdbHook.c.

◆ EbcDebuggerHookExecuteEbcImageEntryPoint()

VOID EbcDebuggerHookExecuteEbcImageEntryPoint ( IN VM_CONTEXT VmPtr)

Hooks in EbcSupport.c

Parameters
VmPtr- pointer to VM context.

The hook in ExecuteEbcImageEntryPoint. It will record the call-stack entry. (-1 means EbcImageEntryPoint call) and trigger Exception if BOE enabled.

Parameters
VmPtr- pointer to VM context.

The hook in ExecuteEbcImageEntryPoint.

Parameters
VmPtr- pointer to VM context.

Definition at line 508 of file EdbHook.c.

◆ EbcDebuggerHookExecuteEnd()

VOID EbcDebuggerHookExecuteEnd ( IN VM_CONTEXT VmPtr)

The hook in EbcExecute, after ExecuteFunction.

Parameters
VmPtr- pointer to VM context.

The hook in EbcExecute, after ExecuteFunction. It will record StepOut Entry if need.

Parameters
VmPtr- pointer to VM context.

Definition at line 633 of file EdbHook.c.

◆ EbcDebuggerHookExecuteStart()

VOID EbcDebuggerHookExecuteStart ( IN VM_CONTEXT VmPtr)

The hook in EbcExecute, before ExecuteFunction.

Parameters
VmPtr- pointer to VM context.

The hook in EbcExecute, before ExecuteFunction. It will trigger Exception if GoTil, StepOver, or StepOut hit.

Parameters
VmPtr- pointer to VM context.

Definition at line 549 of file EdbHook.c.

◆ EbcDebuggerHookInit()

VOID EbcDebuggerHookInit ( IN EFI_HANDLE  Handle,
IN EFI_DEBUG_SUPPORT_PROTOCOL EbcDebugProtocol 
)

The hook in InitializeEbcDriver.

Parameters
Handle- The EbcDebugProtocol handle.
EbcDebugProtocol- The EbcDebugProtocol interface.

The hook in InitializeEbcDriver. It will init the EbcDebuggerPrivate data structure.

Parameters
Handle- The EbcDebugProtocol handle.
EbcDebugProtocol- The EbcDebugProtocol interface.

Definition at line 329 of file EdbHook.c.

◆ EbcDebuggerHookJMP8End()

VOID EbcDebuggerHookJMP8End ( IN VM_CONTEXT VmPtr)

The hook in ExecuteJMP8, after move IP..

Parameters
VmPtr- pointer to VM context.

The hook in ExecuteJMP8, after move IP. It will record trace information.

Parameters
VmPtr- pointer to VM context.

Definition at line 846 of file EdbHook.c.

◆ EbcDebuggerHookJMP8Start()

VOID EbcDebuggerHookJMP8Start ( IN VM_CONTEXT VmPtr)

The hook in ExecuteJMP8, before move IP.

Parameters
VmPtr- pointer to VM context.

The hook in ExecuteJMP8, before move IP. It will record trace information.

Parameters
VmPtr- pointer to VM context.

Definition at line 829 of file EdbHook.c.

◆ EbcDebuggerHookJMPEnd()

VOID EbcDebuggerHookJMPEnd ( IN VM_CONTEXT VmPtr)

The hook in ExecuteJMP, after move IP.

Parameters
VmPtr- pointer to VM context.

The hook in ExecuteJMP, after move IP. It will record trace information.

Parameters
VmPtr- pointer to VM context.

Definition at line 812 of file EdbHook.c.

◆ EbcDebuggerHookJMPStart()

VOID EbcDebuggerHookJMPStart ( IN VM_CONTEXT VmPtr)

The hook in ExecuteJMP, before move IP.

Parameters
VmPtr- pointer to VM context.

The hook in ExecuteJMP, before move IP. It will record trace information.

Parameters
VmPtr- pointer to VM context.

Definition at line 795 of file EdbHook.c.

◆ EbcDebuggerHookRETEnd()

VOID EbcDebuggerHookRETEnd ( IN VM_CONTEXT VmPtr)

The hook in ExecuteRET, after move IP. It will record trace information.

Parameters
VmPtr- pointer to VM context.

The hook in ExecuteRET, after move IP.

Parameters
VmPtr- pointer to VM context.

Definition at line 778 of file EdbHook.c.

◆ EbcDebuggerHookRETStart()

VOID EbcDebuggerHookRETStart ( IN VM_CONTEXT VmPtr)

The hook in ExecuteRET, before move IP.

Parameters
VmPtr- pointer to VM context.

The hook in ExecuteRET, before move IP. It will trigger Exception if BOR enabled, and record Callstack, and trace information.

Parameters
VmPtr- pointer to VM context.

Definition at line 759 of file EdbHook.c.

◆ EbcDebuggerHookUnload()

VOID EbcDebuggerHookUnload ( VOID  )

The hook in UnloadImage for EBC Interpreter.

The hook in UnloadImage for EBC Interpreter. It clean up the environment.

Definition at line 430 of file EdbHook.c.

◆ EbcDebugSignalException()

EFI_STATUS EbcDebugSignalException ( IN EFI_EXCEPTION_TYPE  ExceptionType,
IN EXCEPTION_FLAGS  ExceptionFlags,
IN VM_CONTEXT VmPtr 
)

The VM interpreter calls this function when an exception is detected.

Parameters
ExceptionTypeSpecifies the processor exception detected.
ExceptionFlagsSpecifies the exception context.
VmPtrPointer to a VM context for passing info to the EFI debugger.
Return values
EFI_SUCCESSThis function completed successfully.

Definition at line 860 of file EbcInt.c.