-/*++\r
+/** @file\r
\r
-Copyright (c) 2007 - 2016, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
+Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-Module Name:\r
-\r
- Ebc.c\r
-\r
-Abstract:\r
-\r
---*/\r
+**/\r
\r
#include <Uefi.h>\r
#include "Edb.h"\r
L"EXCEPT_EBC_SINGLE_STEP",\r
};\r
\r
+/**\r
+\r
+ Clear all the breakpoint.\r
+\r
+ @param DebuggerPrivate EBC Debugger private data structure\r
+ @param NeedRemove Whether need to remove all the breakpoint\r
+\r
+**/\r
VOID\r
EdbClearAllBreakpoint (\r
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,\r
IN BOOLEAN NeedRemove\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Clear all the breakpoint\r
-\r
-Arguments:\r
-\r
- DebuggerPrivate - EBC Debugger private data structure\r
- NeedRemove - Whether need to remove all the breakpoint\r
-\r
-Returns:\r
-\r
- None\r
-\r
---*/\r
{\r
UINTN Index;\r
\r
return ;\r
}\r
\r
+/**\r
+\r
+ Set all the breakpoint.\r
+\r
+ @param DebuggerPrivate EBC Debugger private data structure\r
+\r
+**/\r
VOID\r
EdbSetAllBreakpoint (\r
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Set all the breakpoint\r
-\r
-Arguments:\r
-\r
- DebuggerPrivate - EBC Debugger private data structure\r
-\r
-Returns:\r
-\r
- None\r
-\r
---*/\r
{\r
UINTN Index;\r
UINT16 Data16;\r
return ;\r
}\r
\r
-VOID\r
-EdbCheckBreakpoint (\r
- IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,\r
- IN EFI_SYSTEM_CONTEXT SystemContext\r
- )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
\r
Check all the breakpoint, if match, then set status flag, and record current breakpoint.\r
Then clear all breakpoint to let user see a clean memory\r
\r
-Arguments:\r
-\r
- DebuggerPrivate - EBC Debugger private data structure\r
- SystemContext - EBC system context.\r
+ @param DebuggerPrivate EBC Debugger private data structure\r
+ @param SystemContext EBC system context.\r
\r
-Returns:\r
-\r
- None\r
-\r
---*/\r
+**/\r
+VOID\r
+EdbCheckBreakpoint (\r
+ IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,\r
+ IN EFI_SYSTEM_CONTEXT SystemContext\r
+ )\r
{\r
UINT64 Address;\r
UINTN Index;\r
return ;\r
}\r
\r
+/**\r
+ clear all the symbol.\r
+\r
+ @param DebuggerPrivate EBC Debugger private data structure\r
+\r
+**/\r
VOID\r
EdbClearSymbol (\r
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- clear all the symbol\r
-\r
-Arguments:\r
-\r
- DebuggerPrivate - EBC Debugger private data structure\r
-\r
-Returns:\r
-\r
- None\r
-\r
---*/\r
{\r
EFI_DEBUGGER_SYMBOL_CONTEXT *DebuggerSymbolContext;\r
EFI_DEBUGGER_SYMBOL_OBJECT *Object;\r
return ;\r
}\r
\r
+/**\r
+\r
+ Initialize Debugger private data structure\r
+\r
+ @param DebuggerPrivate EBC Debugger private data structure\r
+ @param ExceptionType Exception type.\r
+ @param SystemContext EBC system context.\r
+ @param Initialized Whether the DebuggerPrivate data is initialized.\r
+\r
+**/\r
EFI_STATUS\r
InitDebuggerPrivateData (\r
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,\r
IN EFI_SYSTEM_CONTEXT SystemContext,\r
IN BOOLEAN Initialized\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Initialize Debugger private data structure\r
-\r
-Arguments:\r
-\r
- DebuggerPrivate - EBC Debugger private data structure\r
- InterruptType - Interrupt type.\r
- SystemContext - EBC system context.\r
- Initialized - Whether the DebuggerPrivate data is initialized.\r
-\r
-Returns:\r
-\r
- None\r
-\r
---*/\r
{\r
//\r
// clear STEP flag in any condition.\r
return EFI_SUCCESS;\r
}\r
\r
+/**\r
+\r
+ De-initialize Debugger private data structure.\r
+\r
+ @param DebuggerPrivate EBC Debugger private data structure\r
+ @param ExceptionType Exception type.\r
+ @param SystemContext EBC system context.\r
+ @param Initialized Whether the DebuggerPrivate data is initialized.\r
+\r
+**/\r
EFI_STATUS\r
DeinitDebuggerPrivateData (\r
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,\r
IN EFI_SYSTEM_CONTEXT SystemContext,\r
IN BOOLEAN Initialized\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- De-initialize Debugger private data structure\r
-\r
-Arguments:\r
-\r
- DebuggerPrivate - EBC Debugger private data structure\r
- InterruptType - Interrupt type.\r
- SystemContext - EBC system context.\r
- Initialized - Whether the DebuggerPrivate data is initialized.\r
-\r
-Returns:\r
-\r
- None\r
-\r
---*/\r
{\r
if (!Initialized) {\r
//\r
return EFI_SUCCESS;\r
}\r
\r
+/**\r
+\r
+ Print the reason of current break to EbcDebugger.\r
+\r
+ @param DebuggerPrivate EBC Debugger private data structure\r
+ @param ExceptionType Exception type.\r
+ @param SystemContext EBC system context.\r
+ @param Initialized Whether the DebuggerPrivate data is initialized.\r
+\r
+**/\r
VOID\r
PrintExceptionReason (\r
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,\r
IN EFI_SYSTEM_CONTEXT SystemContext,\r
IN BOOLEAN Initialized\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Print the reason of current break to EbcDebugger.\r
-\r
-Arguments:\r
-\r
- DebuggerPrivate - EBC Debugger private data structure\r
- InterruptType - Interrupt type.\r
- SystemContext - EBC system context.\r
- Initialized - Whether the DebuggerPrivate data is initialized.\r
-\r
-Returns:\r
-\r
- None\r
-\r
---*/\r
{\r
//\r
// Print break status\r
return ;\r
}\r
\r
-VOID\r
-EFIAPI\r
-EdbExceptionHandler (\r
- IN EFI_EXCEPTION_TYPE ExceptionType,\r
- IN OUT EFI_SYSTEM_CONTEXT SystemContext\r
- )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
\r
The default Exception Callback for the VM interpreter.\r
In this function, we report status code, and print debug information\r
about EBC_CONTEXT, then dead loop.\r
\r
-Arguments:\r
-\r
- InterruptType - Interrupt type.\r
- SystemContext - EBC system context.\r
+ @param ExceptionType Exception type.\r
+ @param SystemContext EBC system context.\r
\r
-Returns:\r
-\r
- None\r
-\r
---*/\r
+**/\r
+VOID\r
+EFIAPI\r
+EdbExceptionHandler (\r
+ IN EFI_EXCEPTION_TYPE ExceptionType,\r
+ IN OUT EFI_SYSTEM_CONTEXT SystemContext\r
+ )\r
{\r
CHAR16 InputBuffer[EFI_DEBUG_INPUS_BUFFER_SIZE];\r
CHAR16 *CommandArg;\r
EFI_DEBUGGER_COMMAND DebuggerCommand;\r
EFI_DEBUG_STATUS DebugStatus;\r
- STATIC BOOLEAN mInitialized = FALSE;\r
+ STATIC BOOLEAN mInitialized;\r
+\r
+ mInitialized = FALSE;\r
\r
DEBUG ((DEBUG_ERROR, "Hello EBC Debugger!\n"));\r
\r