TianoCore EDK2 master
Loading...
Searching...
No Matches
Edb.c File Reference
#include <Uefi.h>
#include "Edb.h"

Go to the source code of this file.

Functions

VOID EdbClearAllBreakpoint (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN BOOLEAN NeedRemove)
 
VOID EdbSetAllBreakpoint (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate)
 
VOID EdbCheckBreakpoint (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN EFI_SYSTEM_CONTEXT SystemContext)
 
VOID EdbClearSymbol (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate)
 
EFI_STATUS InitDebuggerPrivateData (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext, IN BOOLEAN Initialized)
 
EFI_STATUS DeinitDebuggerPrivateData (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext, IN BOOLEAN Initialized)
 
VOID PrintExceptionReason (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext, IN BOOLEAN Initialized)
 
VOID EFIAPI EdbExceptionHandler (IN EFI_EXCEPTION_TYPE ExceptionType, IN OUT EFI_SYSTEM_CONTEXT SystemContext)
 

Variables

EFI_DEBUGGER_PRIVATE_DATA mDebuggerPrivate
 
CHAR16 * mExceptionStr []
 

Detailed Description

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

Definition in file Edb.c.

Function Documentation

◆ DeinitDebuggerPrivateData()

EFI_STATUS DeinitDebuggerPrivateData ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate,
IN EFI_EXCEPTION_TYPE  ExceptionType,
IN EFI_SYSTEM_CONTEXT  SystemContext,
IN BOOLEAN  Initialized 
)

De-initialize Debugger private data structure.

Parameters
DebuggerPrivateEBC Debugger private data structure
ExceptionTypeException type.
SystemContextEBC system context.
InitializedWhether the DebuggerPrivate data is initialized.

Definition at line 379 of file Edb.c.

◆ EdbCheckBreakpoint()

VOID EdbCheckBreakpoint ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate,
IN EFI_SYSTEM_CONTEXT  SystemContext 
)

Check all the breakpoint, if match, then set status flag, and record current breakpoint. Then clear all breakpoint to let user see a clean memory

Parameters
DebuggerPrivateEBC Debugger private data structure
SystemContextEBC system context.

Definition at line 164 of file Edb.c.

◆ EdbClearAllBreakpoint()

VOID EdbClearAllBreakpoint ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate,
IN BOOLEAN  NeedRemove 
)

Clear all the breakpoint.

Parameters
DebuggerPrivateEBC Debugger private data structure
NeedRemoveWhether need to remove all the breakpoint

Definition at line 72 of file Edb.c.

◆ EdbClearSymbol()

VOID EdbClearSymbol ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate)

clear all the symbol.

Parameters
DebuggerPrivateEBC Debugger private data structure

Definition at line 263 of file Edb.c.

◆ EdbExceptionHandler()

VOID EFIAPI EdbExceptionHandler ( IN EFI_EXCEPTION_TYPE  ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT  SystemContext 
)

The default Exception Callback for the VM interpreter. In this function, we report status code, and print debug information about EBC_CONTEXT, then dead loop.

Parameters
ExceptionTypeException type.
SystemContextEBC system context.

Definition at line 489 of file Edb.c.

◆ EdbSetAllBreakpoint()

VOID EdbSetAllBreakpoint ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate)

Set all the breakpoint.

Parameters
DebuggerPrivateEBC Debugger private data structure

Definition at line 114 of file Edb.c.

◆ InitDebuggerPrivateData()

EFI_STATUS InitDebuggerPrivateData ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate,
IN EFI_EXCEPTION_TYPE  ExceptionType,
IN EFI_SYSTEM_CONTEXT  SystemContext,
IN BOOLEAN  Initialized 
)

Initialize Debugger private data structure

Parameters
DebuggerPrivateEBC Debugger private data structure
ExceptionTypeException type.
SystemContextEBC system context.
InitializedWhether the DebuggerPrivate data is initialized.

Definition at line 315 of file Edb.c.

◆ PrintExceptionReason()

VOID PrintExceptionReason ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate,
IN EFI_EXCEPTION_TYPE  ExceptionType,
IN EFI_SYSTEM_CONTEXT  SystemContext,
IN BOOLEAN  Initialized 
)

Print the reason of current break to EbcDebugger.

Parameters
DebuggerPrivateEBC Debugger private data structure
ExceptionTypeException type.
SystemContextEBC system context.
InitializedWhether the DebuggerPrivate data is initialized.

Definition at line 435 of file Edb.c.

Variable Documentation

◆ mDebuggerPrivate

EFI_DEBUGGER_PRIVATE_DATA mDebuggerPrivate

Definition at line 11 of file Edb.c.

◆ mExceptionStr

CHAR16* mExceptionStr[]
Initial value:
= {
L"EXCEPT_EBC_UNDEFINED",
L"EXCEPT_EBC_DIVIDE_ERROR",
L"EXCEPT_EBC_DEBUG",
L"EXCEPT_EBC_BREAKPOINT",
L"EXCEPT_EBC_OVERFLOW",
L"EXCEPT_EBC_INVALID_OPCODE",
L"EXCEPT_EBC_STACK_FAULT",
L"EXCEPT_EBC_ALIGNMENT_CHECK",
L"EXCEPT_EBC_INSTRUCTION_ENCODING",
L"EXCEPT_EBC_BAD_BREAK",
L"EXCEPT_EBC_SINGLE_STEP",
}

Definition at line 49 of file Edb.c.