]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Universal / EbcDxe / EbcDebugger / Edb.c
index 6485060068832970f9bfa0a9aaedee40f13f3f03..611b2de5d81f5512d0449e6e90a15cc9f332497b 100644 (file)
@@ -1,21 +1,9 @@
-/*++\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
@@ -66,27 +54,19 @@ CHAR16 *mExceptionStr[] = {
   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
@@ -117,25 +97,17 @@ Returns:
   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
@@ -173,28 +145,20 @@ Returns:
   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
@@ -277,25 +241,16 @@ Returns:
   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
@@ -332,6 +287,16 @@ Returns:
   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
@@ -339,24 +304,6 @@ InitDebuggerPrivateData (
   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
@@ -404,6 +351,16 @@ Returns:
   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
@@ -411,24 +368,6 @@ DeinitDebuggerPrivateData (
   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
@@ -468,6 +407,16 @@ Returns:
   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
@@ -475,24 +424,6 @@ PrintExceptionReason (
   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
@@ -529,36 +460,30 @@ Returns:
   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