]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/EbcDxe: Add comments for functions
authorDandan Bi <dandan.bi@intel.com>
Mon, 5 Dec 2016 03:33:52 +0000 (11:33 +0800)
committerStar Zeng <star.zeng@intel.com>
Tue, 6 Dec 2016 10:40:19 +0000 (18:40 +0800)
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Pete Batard <pete@akeo.ie>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen.yao@intel.com
MdeModulePkg/Universal/EbcDxe/EbcDebugger/EbcDebuggerConfig.c
MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasmSupport.h
MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbHook.c
MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupport.h
MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c
MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportUI.c
MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.h
MdeModulePkg/Universal/EbcDxe/EbcDebuggerHook.c
MdeModulePkg/Universal/EbcDxe/EbcDebuggerHook.h

index 248b1fc6a91f40d7a7abcd6e94e69c6903ad53e8..2a123bfc530e76d917c765e7d0b702eeca8b676b 100644 (file)
 #include "EdbCommon.h"\r
 #include "EdbSupport.h"\r
 \r
+/**\r
+\r
+  The function that displays the utility usage message.\r
+\r
+**/\r
 VOID\r
 PrintUsage (\r
   VOID\r
@@ -38,6 +43,13 @@ PrintUsage (
   return;\r
 }\r
 \r
+/**\r
+\r
+  The function is to show some information.\r
+\r
+  @param  DebuggerConfiguration    Point to the EFI_DEBUGGER_CONFIGURATION_PROTOCOL.\r
+\r
+**/\r
 VOID\r
 EdbShowInfo (\r
   EFI_DEBUGGER_CONFIGURATION_PROTOCOL *DebuggerConfiguration\r
@@ -47,6 +59,15 @@ EdbShowInfo (
   return ;\r
 }\r
 \r
+/**\r
+\r
+  EdbConfigBreak function.\r
+\r
+  @param  DebuggerConfiguration    Point to the EFI_DEBUGGER_CONFIGURATION_PROTOCOL.\r
+  @param  Command                  Point to the command.\r
+  @param  CommandArg               The argument for this command.\r
+\r
+**/\r
 VOID\r
 EdbConfigBreak (\r
   EFI_DEBUGGER_CONFIGURATION_PROTOCOL *DebuggerConfiguration,\r
index 702673b8dff54261399a79bad03b3cc523bec3f1..801cbc123681f5f91d97a0eede3110a5250506fa 100644 (file)
@@ -33,27 +33,69 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define EDB_INSTRUCTION_CONTENT_MAX_LENGTH  30\r
 #define EDB_INSTRUCTION_CONTENT_MAX_SIZE    (EDB_INSTRUCTION_CONTENT_MAX_LENGTH * sizeof(CHAR16))\r
 \r
+/**\r
+\r
+  Set offset for Instruction name and content.\r
+\r
+  @param  InstructionNameOffset     - Instruction name offset\r
+  @param  InstructionContentOffset  - Instruction content offset\r
+\r
+**/\r
 VOID\r
 EdbSetOffset (\r
   IN UINTN InstructionNameOffset,\r
   IN UINTN InstructionContentOffset\r
   );\r
 \r
+/**\r
+\r
+  Pre instruction string construction.\r
+\r
+  @return Instruction string\r
+\r
+**/\r
 CHAR16 *\r
 EdbPreInstructionString (\r
   VOID\r
   );\r
 \r
+/**\r
+\r
+  Post instruction string construction.\r
+\r
+  @return Instruction string\r
+\r
+**/\r
 CHAR16 *\r
 EdbPostInstructionString (\r
   VOID\r
   );\r
 \r
+/**\r
+\r
+  Print the instruction name.\r
+\r
+  @param  Name - instruction name\r
+\r
+  @return Instruction name offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintInstructionName (\r
   IN CHAR16                 *Name\r
   );\r
 \r
+/**\r
+\r
+  Get Sign, NaturalUnits, and ConstantUnits of the WORD data.\r
+\r
+  @param  Data16        - WORD data\r
+  @param  NaturalUnits  - Natural Units of the WORD\r
+  @param  ConstantUnits - Constant Units of the WORD\r
+\r
+  @return Sign value of WORD\r
+\r
+**/\r
 BOOLEAN\r
 EdbGetNaturalIndex16 (\r
   IN  UINT16  Data16,\r
@@ -61,6 +103,17 @@ EdbGetNaturalIndex16 (
   OUT UINTN   *ConstantUnits\r
   );\r
 \r
+/**\r
+\r
+  Get Sign, NaturalUnits, and ConstantUnits of the DWORD data.\r
+\r
+  @param  Data32        - DWORD data\r
+  @param  NaturalUnits  - Natural Units of the DWORD\r
+  @param  ConstantUnits - Constant Units of the DWORD\r
+\r
+  @return Sign value of DWORD\r
+\r
+**/\r
 BOOLEAN\r
 EdbGetNaturalIndex32 (\r
   IN  UINT32  Data32,\r
@@ -68,6 +121,17 @@ EdbGetNaturalIndex32 (
   OUT UINTN   *ConstantUnits\r
   );\r
 \r
+/**\r
+\r
+  Get Sign, NaturalUnits, and ConstantUnits of the QWORD data.\r
+\r
+  @param  Data64        - QWORD data\r
+  @param  NaturalUnits  - Natural Units of the QWORD\r
+  @param  ConstantUnits - Constant Units of the QWORD\r
+\r
+  @return Sign value of QWORD\r
+\r
+**/\r
 BOOLEAN\r
 EdbGetNaturalIndex64 (\r
   IN  UINT64  Data64,\r
@@ -75,41 +139,115 @@ EdbGetNaturalIndex64 (
   OUT UINT64  *ConstantUnits\r
   );\r
 \r
+/**\r
+\r
+  Print the hexical WORD raw index data to instruction content.\r
+\r
+  @param  Data16 - WORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintRawIndexData16 (\r
   IN UINT16                 Data16\r
   );\r
 \r
+/**\r
+\r
+  Print the hexical DWORD raw index data to instruction content.\r
+\r
+  @param  Data32 - DWORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintRawIndexData32 (\r
   IN UINT32                 Data32\r
   );\r
 \r
+/**\r
+\r
+  Print the hexical QWORD raw index data to instruction content.\r
+\r
+  @param  Data64 - QWORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintRawIndexData64 (\r
   IN UINT64                 Data64\r
   );\r
 \r
+/**\r
+\r
+  Print register 1 in operands.\r
+\r
+  @param  Operands - instruction operands\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintRegister1 (\r
   IN UINT8                  Operands\r
   );\r
 \r
+/**\r
+\r
+  Print register 2 in operands.\r
+\r
+  @param  Operands - instruction operands\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintRegister2 (\r
   IN UINT8                  Operands\r
   );\r
 \r
+/**\r
+\r
+  Print dedicated register 1 in operands.\r
+\r
+  @param Operands - instruction operands\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintDedicatedRegister1 (\r
   IN UINT8                  Operands\r
   );\r
 \r
+/**\r
+\r
+  Print dedicated register 2 in operands.\r
+\r
+  @param  Operands - instruction operands\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintDedicatedRegister2 (\r
   IN UINT8                  Operands\r
   );\r
 \r
+/**\r
+\r
+  Print the hexical UINTN index data to instruction content.\r
+\r
+  @param  Sign          - Signed bit of UINTN data\r
+  @param  NaturalUnits  - natural units of UINTN data\r
+  @param  ConstantUnits - natural units of UINTN data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintIndexData (\r
   IN BOOLEAN                Sign,\r
@@ -117,6 +255,17 @@ EdbPrintIndexData (
   IN UINTN                  ConstantUnits\r
   );\r
 \r
+/**\r
+\r
+  Print the hexical QWORD index data to instruction content.\r
+\r
+  @param  Sign          - Signed bit of QWORD data\r
+  @param  NaturalUnits  - natural units of QWORD data\r
+  @param  ConstantUnits - natural units of QWORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintIndexData64 (\r
   IN BOOLEAN                Sign,\r
@@ -124,108 +273,297 @@ EdbPrintIndexData64 (
   IN UINT64                 ConstantUnits\r
   );\r
 \r
+/**\r
+\r
+  Print the hexical BYTE immediate data to instruction content.\r
+\r
+  @param  Data - BYTE data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintImmData8 (\r
   IN UINT8                  Data\r
   );\r
 \r
+/**\r
+\r
+  Print the hexical WORD immediate data to instruction content.\r
+\r
+  @param  Data - WORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintImmData16 (\r
   IN UINT16                 Data\r
   );\r
 \r
+/**\r
+\r
+  Print the hexical DWORD immediate data to instruction content.\r
+\r
+  @param  Data - DWORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintImmData32 (\r
   IN UINT32                 Data\r
   );\r
 \r
+/**\r
+\r
+  Print the hexical QWORD immediate data to instruction content.\r
+\r
+  @param  Data - QWORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintImmData64 (\r
   IN UINT64                 Data\r
   );\r
 \r
+/**\r
+\r
+  Print the decimal UINTN immediate data to instruction content.\r
+\r
+  @param  Data - UINTN data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintImmDatan (\r
   IN UINTN                  Data\r
   );\r
 \r
+/**\r
+\r
+  Print the decimal QWORD immediate data to instruction content.\r
+\r
+  @param  Data64 - QWORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintImmData64n (\r
   IN UINT64                 Data64\r
   );\r
 \r
+/**\r
+\r
+  Print the hexical BYTE to instruction content.\r
+\r
+  @param  Data8 - BYTE data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintData8 (\r
   IN UINT8                  Data8\r
   );\r
 \r
+/**\r
+\r
+  Print the hexical WORD to instruction content.\r
+\r
+  @param  Data16 - WORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintData16 (\r
   IN UINT16                 Data16\r
   );\r
 \r
+/**\r
+\r
+  Print the hexical DWORD to instruction content.\r
+\r
+  @param  Data32 - DWORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintData32 (\r
   IN UINT32                 Data32\r
   );\r
 \r
+/**\r
+\r
+  Print the hexical QWORD to instruction content.\r
+\r
+  @param  Data64 - QWORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintData64 (\r
   IN UINT64                 Data64\r
   );\r
 \r
+/**\r
+\r
+  Print the decimal unsigned UINTN to instruction content.\r
+\r
+  @param  Data - unsigned UINTN data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintDatan (\r
   IN UINTN                  Data\r
   );\r
 \r
+/**\r
+\r
+  Print the decimal unsigned QWORD to instruction content.\r
+\r
+  @param  Data64 - unsigned QWORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintData64n (\r
   IN UINT64                 Data64\r
   );\r
 \r
+/**\r
+\r
+  Print the decimal signed BYTE to instruction content.\r
+\r
+  @param  Data8 - signed BYTE data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintData8s (\r
   IN UINT8                  Data8\r
   );\r
 \r
+/**\r
+\r
+  Print the decimal signed WORD to instruction content.\r
+\r
+  @param  Data16 - signed WORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintData16s (\r
   IN UINT16                 Data16\r
   );\r
 \r
+/**\r
+\r
+  Print the decimal signed DWORD to instruction content.\r
+\r
+  @param  Data32 - signed DWORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintData32s (\r
   IN UINT32                 Data32\r
   );\r
 \r
+/**\r
+\r
+  Print the decimal signed QWORD to instruction content.\r
+\r
+  @param  Data64 - signed QWORD data\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintData64s (\r
   IN UINT64                 Data64\r
   );\r
 \r
+/**\r
+\r
+  Print the comma to instruction content.\r
+\r
+  @return Instruction content offset\r
+\r
+**/\r
 UINTN\r
 EdbPrintComma (\r
   VOID\r
   );\r
 \r
+/**\r
+\r
+  Find the symbol string according to address, then print it.\r
+\r
+  @param  Address - instruction address\r
+\r
+  @retval 1 - symbol string is found and printed\r
+  @retval 0 - symbol string not found\r
+\r
+**/\r
 UINTN\r
 EdbFindAndPrintSymbol (\r
   IN UINTN                  Address\r
   );\r
 \r
+/**\r
+\r
+  Print the EBC byte code.\r
+\r
+  @param  InstructionAddress - instruction address\r
+  @param  InstructionNumber  - instruction number\r
+\r
+**/\r
 VOID\r
 EdbPrintRaw (\r
   IN EFI_PHYSICAL_ADDRESS   InstructionAddress,\r
   IN UINTN                  InstructionNumber\r
   );\r
 \r
+/**\r
+\r
+  Print the EBC asm code.\r
+\r
+  @param  DebuggerPrivate - EBC Debugger private data structure\r
+  @param  SystemContext   - EBC system context.\r
+\r
+  @retval EFI_SUCCESS - show disasm successfully\r
+\r
+**/\r
 EFI_STATUS\r
 EdbShowDisasm (\r
   IN     EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,\r
   IN     EFI_SYSTEM_CONTEXT        SystemContext\r
   );\r
 \r
+/**\r
+\r
+  Get register value accroding to the system context, and register index.\r
+\r
+  @param  SystemContext   - EBC system context.\r
+  @param  Index           - EBC register index\r
+\r
+  @return register value\r
+\r
+**/\r
 UINT64\r
 GetRegisterValue (\r
   IN     EFI_SYSTEM_CONTEXT        SystemContext,\r
index 322dd258d0ecc946a1feffa67fa99c40ca964e76..7592defec0698b92b2dedb373c6bfcca24a6f6b8 100644 (file)
@@ -278,6 +278,14 @@ EbcDebuggerPushStepEntry (
   }\r
 }\r
 \r
+\r
+/**\r
+  Notify the callback function when an event is triggered.\r
+\r
+  @param  Event                    Indicates the event that invoke this function.\r
+  @param  Context                  Indicates the calling context.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 EbcDebuggerBreakEventFunc (\r
@@ -467,7 +475,6 @@ EbcDebuggerHookUnload (
   @param  Handle           - The EbcImage handle.\r
 \r
 **/\r
-\r
 VOID\r
 EbcDebuggerHookEbcUnloadImage (\r
   IN EFI_HANDLE                  Handle\r
index 8908718edb91a8816534453ec10b6681e62f7457..68becd6d80eb1546e0f8f1d6b5a82b11205443a3 100644 (file)
@@ -25,36 +25,83 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #define EFI_DEBUG_MAX_PRINT_BUFFER   (80 * 4)\r
 \r
+/**\r
+\r
+  Convert hex string to uint.\r
+\r
+  @param  Str  -  The string\r
+\r
+**/\r
 UINTN\r
 EFIAPI\r
 Xtoi (\r
   CHAR16  *Str\r
   );\r
 \r
+/**\r
+\r
+  Convert hex string to uint.\r
+\r
+  @param  Str  -  The string\r
+\r
+**/\r
 UINT64\r
 EFIAPI\r
 LXtoi (\r
   CHAR16  *Str\r
   );\r
 \r
+/**\r
+\r
+  Convert hex string to uint.\r
+\r
+  @param Str  -  The string\r
+\r
+**/\r
 UINTN\r
 EFIAPI\r
 Atoi (\r
   CHAR16  *Str\r
   );\r
 \r
+/**\r
+\r
+  Convert hex string to uint.\r
+\r
+  @param  Str  -  The string\r
+\r
+**/\r
 UINTN\r
 EFIAPI\r
 AsciiXtoi (\r
   CHAR8  *Str\r
   );\r
 \r
+/**\r
+\r
+  Convert hex string to uint.\r
+\r
+  @param Str  -  The string\r
+\r
+**/\r
 UINTN\r
 EFIAPI\r
 AsciiAtoi (\r
   CHAR8  *Str\r
   );\r
 \r
+/**\r
+  Compare the Unicode and Ascii string pointed by String to the string pointed by String2.\r
+\r
+  @param String - Unicode String to process\r
+\r
+  @param String2 - Ascii string to process\r
+\r
+  @return Return a positive integer if String is lexicall greater than String2; Zero if\r
+  the two strings are identical; and a negative interger if String is lexically\r
+  less than String2.\r
+\r
+**/\r
 INTN\r
 EFIAPI\r
 StrCmpUnicodeAndAscii (\r
@@ -62,6 +109,18 @@ StrCmpUnicodeAndAscii (
   IN CHAR8    *String2\r
   );\r
 \r
+/**\r
+\r
+  Compare the Unicode string pointed by String to the string pointed by String2.\r
+\r
+  @param  String - Unicode String to process\r
+  @param  String2 - Unicode string to process\r
+\r
+  @return Return a positive integer if String is lexically greater than String2; Zero if\r
+  the two strings are identical; and a negative integer if String is lexically\r
+  less than String2.\r
+\r
+**/\r
 INTN\r
 EFIAPI\r
 StriCmp (\r
@@ -69,6 +128,18 @@ StriCmp (
   IN CHAR16   *String2\r
   );\r
 \r
+/**\r
+\r
+  Compare the Unicode and Ascii string pointed by String to the string pointed by String2.\r
+\r
+  @param  String - Unicode String to process\r
+  @param  String2 - Ascii string to process\r
+\r
+  @return Return a positive integer if String is lexically greater than String2; Zero if\r
+  the two strings are identical; and a negative integer if String is lexically\r
+  less than String2.\r
+\r
+**/\r
 INTN\r
 EFIAPI\r
 StriCmpUnicodeAndAscii (\r
@@ -76,6 +147,14 @@ StriCmpUnicodeAndAscii (
   IN CHAR8    *String2\r
   );\r
 \r
+/**\r
+\r
+  Verify if the string is end with the sub string.\r
+\r
+  @param  Str - The string where to search the sub string\r
+  @param  SubStr - The substring.\r
+\r
+**/\r
 BOOLEAN\r
 EFIAPI\r
 StrEndWith (\r
@@ -83,12 +162,26 @@ StrEndWith (
   IN CHAR16                       *SubStr\r
   );\r
 \r
+/**\r
+  Duplicate a string.\r
+\r
+  @param  Src  The string to be duplicated.\r
+\r
+**/\r
 CHAR16 *\r
 EFIAPI\r
 StrDuplicate (\r
   IN CHAR16   *Src\r
   );\r
 \r
+/**\r
+\r
+  Find the next token after one or more specified characters.\r
+\r
+  @param  String    Point to the string where to find the substring.\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR16 *\r
 EFIAPI\r
 StrGetNewTokenLine (\r
@@ -96,12 +189,27 @@ StrGetNewTokenLine (
   IN CHAR16                       *CharSet\r
   );\r
 \r
+/**\r
+\r
+  Find the next token after one or more specified characters.\r
+\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR16 *\r
 EFIAPI\r
 StrGetNextTokenLine (\r
   IN CHAR16                       *CharSet\r
   );\r
 \r
+/**\r
+\r
+  Find the next token after one specificed characters.\r
+\r
+  @param  String    Point to the string where to find the substring.\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR16 *\r
 EFIAPI\r
 StrGetNewTokenField (\r
@@ -109,12 +217,27 @@ StrGetNewTokenField (
   IN CHAR16                       *CharSet\r
   );\r
 \r
+/**\r
+\r
+  Find the next token after one specificed characters.\r
+\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR16 *\r
 EFIAPI\r
 StrGetNextTokenField (\r
   IN CHAR16                       *CharSet\r
   );\r
 \r
+/**\r
+\r
+  Patch a character to the end of a string.\r
+\r
+  @param  Buffer   The string to be patched.\r
+  @param  Patch    The patch character.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 PatchForStrTokenAfter (\r
@@ -122,6 +245,13 @@ PatchForStrTokenAfter (
   IN CHAR16    Patch\r
   );\r
 \r
+/**\r
+  Patch a character at the beginning of a string.\r
+\r
+  @param  Buffer   The string to be patched.\r
+  @param  Patch    The patch character.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 PatchForStrTokenBefore (\r
@@ -129,6 +259,14 @@ PatchForStrTokenBefore (
   IN CHAR16    Patch\r
   );\r
 \r
+/**\r
+\r
+  Find the next token after one or more specified characters.\r
+\r
+  @param  String    Point to the string where to find the substring.\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR8 *\r
 EFIAPI\r
 AsciiStrGetNewTokenLine (\r
@@ -136,12 +274,27 @@ AsciiStrGetNewTokenLine (
   IN CHAR8                       *CharSet\r
   );\r
 \r
+/**\r
+\r
+  Find the next token after one or more specified characters.\r
+\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR8 *\r
 EFIAPI\r
 AsciiStrGetNextTokenLine (\r
   IN CHAR8                       *CharSet\r
   );\r
 \r
+/**\r
+\r
+  Find the next token after one specificed characters.\r
+\r
+  @param  String    Point to the string where to find the substring.\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR8 *\r
 EFIAPI\r
 AsciiStrGetNewTokenField (\r
@@ -149,12 +302,27 @@ AsciiStrGetNewTokenField (
   IN CHAR8                       *CharSet\r
   );\r
 \r
+/**\r
+\r
+  Find the next token after one specificed characters.\r
+\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR8 *\r
 EFIAPI\r
 AsciiStrGetNextTokenField (\r
   IN CHAR8                       *CharSet\r
   );\r
 \r
+/**\r
+\r
+  Patch a character to the end of a string.\r
+\r
+  @param  Buffer   The string to be patched.\r
+  @param  Patch    The patch character.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 PatchForAsciiStrTokenAfter (\r
@@ -162,6 +330,13 @@ PatchForAsciiStrTokenAfter (
   IN CHAR8    Patch\r
   );\r
 \r
+/**\r
+  Patch a character at the beginning of a string.\r
+\r
+  @param  Buffer   The string to be patched.\r
+  @param  Patch    The patch character.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 PatchForAsciiStrTokenBefore (\r
@@ -170,7 +345,14 @@ PatchForAsciiStrTokenBefore (
   );\r
 \r
 /**\r
-Shell Library.\r
+\r
+  Shell Library.\r
+  Get user input.\r
+\r
+  @param  Prompt    The prompt string.\r
+  @param  InStr     Point to the input string.\r
+  @param  StrLen    The max length of string user can input.\r
+\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -180,12 +362,25 @@ Input (
   IN UINTN     StrLen\r
   );\r
 \r
+/**\r
+\r
+  SetPageBreak.\r
+\r
+**/\r
 BOOLEAN\r
 EFIAPI\r
 SetPageBreak (\r
   VOID\r
   );\r
 \r
+/**\r
+  Print a Unicode string to the output device.\r
+\r
+  @param  Format    A Null-terminated Unicode format string.\r
+  @param  ...       The variable argument list that contains pointers to Null-\r
+                    terminated Unicode strings to be printed\r
+\r
+**/\r
 UINTN\r
 EFIAPI\r
 EDBPrint (\r
@@ -193,6 +388,17 @@ EDBPrint (
   ...\r
   );\r
 \r
+/**\r
+  Print a Unicode string to the output buffer.\r
+\r
+  @param  Buffer          A pointer to the output buffer for the produced Null-terminated\r
+                          Unicode string.\r
+  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
+  @param  Format          A Null-terminated Unicode format string.\r
+  @param  ...             The variable argument list that contains pointers to Null-\r
+                          terminated Unicode strings to be printed\r
+\r
+**/\r
 UINTN\r
 EFIAPI\r
 EDBSPrint (\r
@@ -202,6 +408,18 @@ EDBSPrint (
   ...\r
   );\r
 \r
+/**\r
+  Print a Unicode string to the output buffer with specified offset..\r
+\r
+  @param  Buffer          A pointer to the output buffer for the produced Null-terminated\r
+                          Unicode string.\r
+  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
+  @param  Offset          The offset of the buffer.\r
+  @param  Format          A Null-terminated Unicode format string.\r
+  @param  ...             The variable argument list that contains pointers to Null-\r
+                          terminated Unicode strings to be printed\r
+\r
+**/\r
 UINTN\r
 EFIAPI\r
 EDBSPrintWithOffset (\r
@@ -212,6 +430,25 @@ EDBSPrintWithOffset (
   ...\r
   );\r
 \r
+/**\r
+\r
+  Read a file.\r
+  If ScanFs is FLASE, it will use DebuggerPrivate->Vol as default Fs.\r
+  If ScanFs is TRUE, it will scan all FS and check the file.\r
+  If there is only one file match the name, it will be read.\r
+  If there is more than one file match the name, it will return Error.\r
+\r
+  @param  DebuggerPrivate - EBC Debugger private data structure\r
+  @param  FileName        - The file to be read.\r
+  @param  BufferSize      - The file buffer size\r
+  @param  Buffer          - The file buffer\r
+  @param  ScanFs          - Need Scan all FS\r
+\r
+  @retval EFI_SUCCESS    - read file successfully\r
+  @retval EFI_NOT_FOUND  - file not found\r
+  @retval EFI_NO_MAPPING - there is duplicated files found\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 ReadFileToBuffer (\r
@@ -222,6 +459,18 @@ ReadFileToBuffer (
   IN  BOOLEAN                     ScanFs\r
   );\r
 \r
+/**\r
+\r
+  Get file name under this dir with index\r
+\r
+  @param  DebuggerPrivate - EBC Debugger private data structure\r
+  @param  DirName         - The dir to be read.\r
+  @param  FileName        - The file name pattern under this dir\r
+  @param  Index           - The file index under this dir\r
+\r
+  @return File Name which match the pattern and index.\r
+\r
+**/\r
 CHAR16 *\r
 EFIAPI\r
 GetFileNameUnderDir (\r
index bb0626fae7e43535868d05730907172988a61c95..0a49d2fd57fa7ad5e3b0069dc60d4f0ba39e8329 100644 (file)
@@ -85,7 +85,6 @@ Xtoi (
   @param  Str  -  The string\r
 \r
 **/\r
-\r
 UINT64\r
 EFIAPI\r
 LXtoi (\r
@@ -308,6 +307,13 @@ AsciiAtoi (
   return RetVal;\r
 }\r
 \r
+/**\r
+\r
+  Convert the character to upper case.\r
+\r
+  @param  Chr    the character to be converted.\r
+\r
+**/\r
 STATIC\r
 CHAR16\r
 UnicodeToUpper (\r
@@ -317,6 +323,13 @@ UnicodeToUpper (
   return (Chr >= L'a' && Chr <= L'z') ? Chr - (L'a' - L'A') : Chr;\r
 }\r
 \r
+/**\r
+\r
+  Convert the character to upper case.\r
+\r
+  @param  Chr    the character to be converted.\r
+\r
+**/\r
 STATIC\r
 CHAR8\r
 AsciiToUpper (\r
@@ -520,7 +533,6 @@ StrSpn (
   @param  CharSet   Point to the string to be found.\r
 \r
 **/\r
-\r
 CHAR16 *\r
 EFIAPI\r
 StrBrk (\r
@@ -589,7 +601,6 @@ StrTokenLine (
   @param  CharSet   Point to the string to be found.\r
 \r
 **/\r
-\r
 CHAR16 *\r
 EFIAPI\r
 StrTokenField (\r
@@ -621,6 +632,14 @@ StrTokenField (
   return Begin;\r
 }\r
 \r
+/**\r
+\r
+  Find the next token after one or more specified characters.\r
+\r
+  @param  String    Point to the string where to find the substring.\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR16 *\r
 EFIAPI\r
 StrGetNewTokenLine (\r
@@ -631,6 +650,13 @@ StrGetNewTokenLine (
   return StrTokenLine (String, CharSet);\r
 }\r
 \r
+/**\r
+\r
+  Find the next token after one or more specified characters.\r
+\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR16 *\r
 EFIAPI\r
 StrGetNextTokenLine (\r
@@ -640,6 +666,14 @@ StrGetNextTokenLine (
   return StrTokenLine (NULL, CharSet);\r
 }\r
 \r
+/**\r
+\r
+  Find the next token after one specificed characters.\r
+\r
+  @param  String    Point to the string where to find the substring.\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR16 *\r
 EFIAPI\r
 StrGetNewTokenField (\r
@@ -650,6 +684,13 @@ StrGetNewTokenField (
   return StrTokenField (String, CharSet);\r
 }\r
 \r
+/**\r
+\r
+  Find the next token after one specificed characters.\r
+\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR16 *\r
 EFIAPI\r
 StrGetNextTokenField (\r
@@ -659,6 +700,14 @@ StrGetNextTokenField (
   return StrTokenField (NULL, CharSet);\r
 }\r
 \r
+/**\r
+\r
+  Patch a character to the end of a string.\r
+\r
+  @param  Buffer   The string to be patched.\r
+  @param  Patch    The patch character.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 PatchForStrTokenAfter (\r
@@ -689,6 +738,13 @@ PatchForStrTokenAfter (
   return ;\r
 }\r
 \r
+/**\r
+  Patch a character at the beginning of a string.\r
+\r
+  @param  Buffer   The string to be patched.\r
+  @param  Patch    The patch character.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 PatchForStrTokenBefore (\r
@@ -831,7 +887,6 @@ AsciiStrTokenLine (
   @param  CharSet   Point to the string to be found.\r
 \r
 **/\r
-\r
 CHAR8 *\r
 EFIAPI\r
 AsciiStrTokenField (\r
@@ -863,6 +918,14 @@ AsciiStrTokenField (
   return Begin;\r
 }\r
 \r
+/**\r
+\r
+  Find the next token after one or more specified characters.\r
+\r
+  @param  String    Point to the string where to find the substring.\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR8 *\r
 EFIAPI\r
 AsciiStrGetNewTokenLine (\r
@@ -873,6 +936,13 @@ AsciiStrGetNewTokenLine (
   return AsciiStrTokenLine (String, CharSet);\r
 }\r
 \r
+/**\r
+\r
+  Find the next token after one or more specified characters.\r
+\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR8 *\r
 EFIAPI\r
 AsciiStrGetNextTokenLine (\r
@@ -882,6 +952,14 @@ AsciiStrGetNextTokenLine (
   return AsciiStrTokenLine (NULL, CharSet);\r
 }\r
 \r
+/**\r
+\r
+  Find the next token after one specificed characters.\r
+\r
+  @param  String    Point to the string where to find the substring.\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR8 *\r
 EFIAPI\r
 AsciiStrGetNewTokenField (\r
@@ -892,6 +970,13 @@ AsciiStrGetNewTokenField (
   return AsciiStrTokenField (String, CharSet);\r
 }\r
 \r
+/**\r
+\r
+  Find the next token after one specificed characters.\r
+\r
+  @param  CharSet   Point to the string to be found.\r
+\r
+**/\r
 CHAR8 *\r
 EFIAPI\r
 AsciiStrGetNextTokenField (\r
@@ -901,6 +986,14 @@ AsciiStrGetNextTokenField (
   return AsciiStrTokenField (NULL, CharSet);\r
 }\r
 \r
+/**\r
+\r
+  Patch a character to the end of a string.\r
+\r
+  @param  Buffer   The string to be patched.\r
+  @param  Patch    The patch character.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 PatchForAsciiStrTokenAfter (\r
@@ -931,6 +1024,13 @@ PatchForAsciiStrTokenAfter (
   return ;\r
 }\r
 \r
+/**\r
+  Patch a character at the beginning of a string.\r
+\r
+  @param  Buffer   The string to be patched.\r
+  @param  Patch    The patch character.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 PatchForAsciiStrTokenBefore (\r
index 21d0dc983802487d2794762381309ed60066c47f..14f8627eb57067d64bfe3512381611222d4a6f6a 100644 (file)
@@ -14,6 +14,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "Edb.h"\r
 \r
+/**\r
+  Set the current coordinates of the cursor position.\r
+\r
+  @param  ConOut        Point to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.\r
+  @param  Column        The position to set the cursor to.\r
+  @param  Row           The position to set the cursor to.\r
+  @param  LineLength    Length of a line.\r
+  @param  TotalRow      Total row of a screen.\r
+  @param  Str           Point to the string.\r
+  @param  StrPos        The position of the string.\r
+  @param  Len           The length of the string.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 SetCursorPosition (\r
@@ -166,6 +179,15 @@ ConMoveCursorForward (
 CHAR16 mBackupSpace[EFI_DEBUG_INPUS_BUFFER_SIZE];\r
 CHAR16 mInputBufferHistory[EFI_DEBUG_INPUS_BUFFER_SIZE];\r
 \r
+/**\r
+\r
+  Get user input.\r
+\r
+  @param  Prompt       The prompt string.\r
+  @param  InStr        Point to the input string.\r
+  @param  StrLength    The max length of string user can input.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 Input (\r
@@ -514,6 +536,19 @@ Input (
   return ;\r
 }\r
 \r
+/**\r
+  Set the current coordinates of the cursor position.\r
+\r
+  @param  ConOut        Point to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.\r
+  @param  Column        The position to set the cursor to.\r
+  @param  Row           The position to set the cursor to.\r
+  @param  LineLength    Length of a line.\r
+  @param  TotalRow      Total row of a screen.\r
+  @param  Str           Point to the string.\r
+  @param  StrPos        The position of the string.\r
+  @param  Len           The length of the string.\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 SetCursorPosition (\r
@@ -551,6 +586,11 @@ SetCursorPosition (
   ConOut->SetCursorPosition (ConOut, 0, 0);\r
 }\r
 \r
+/**\r
+\r
+  SetPageBreak.\r
+\r
+**/\r
 BOOLEAN\r
 EFIAPI\r
 SetPageBreak (\r
@@ -620,6 +660,14 @@ SetPageBreak (
   return OmitPrint;\r
 }\r
 \r
+/**\r
+  Print a Unicode string to the output device.\r
+\r
+  @param  Format    A Null-terminated Unicode format string.\r
+  @param  ...       The variable argument list that contains pointers to Null-\r
+                    terminated Unicode strings to be printed\r
+\r
+**/\r
 UINTN\r
 EFIAPI\r
 EDBPrint (\r
@@ -645,6 +693,17 @@ EDBPrint (
   return Return;\r
 }\r
 \r
+/**\r
+  Print a Unicode string to the output buffer.\r
+\r
+  @param  Buffer          A pointer to the output buffer for the produced Null-terminated\r
+                          Unicode string.\r
+  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
+  @param  Format          A Null-terminated Unicode format string.\r
+  @param  ...             The variable argument list that contains pointers to Null-\r
+                          terminated Unicode strings to be printed\r
+\r
+**/\r
 UINTN\r
 EFIAPI\r
 EDBSPrint (\r
@@ -666,6 +725,18 @@ EDBSPrint (
   return Return;\r
 }\r
 \r
+/**\r
+  Print a Unicode string to the output buffer with specified offset..\r
+\r
+  @param  Buffer          A pointer to the output buffer for the produced Null-terminated\r
+                          Unicode string.\r
+  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
+  @param  Offset          The offset of the buffer.\r
+  @param  Format          A Null-terminated Unicode format string.\r
+  @param  ...             The variable argument list that contains pointers to Null-\r
+                          terminated Unicode strings to be printed\r
+\r
+**/\r
 UINTN\r
 EFIAPI\r
 EDBSPrintWithOffset (\r
index c4c28582e7c3e4b9c250b4c8a37e5e3081dcf700..2e8c5e2f4ff8ff5c533da448992fe57ffb0f9ced 100644 (file)
@@ -39,6 +39,18 @@ typedef enum {
   EdbEbcImageRvaSearchTypeMax,\r
 } EDB_EBC_IMAGE_RVA_SEARCH_TYPE;\r
 \r
+/**\r
+\r
+  Find symbol by address.\r
+\r
+  @param  Address         - Symbol address\r
+  @param  Type            - Search type\r
+  @param  RetObject       - Symbol object\r
+  @param  RetEntry        - Symbol entry\r
+\r
+  @return Nearest symbol address\r
+\r
+**/\r
 UINTN\r
 EbdFindSymbolAddress (\r
   IN UINTN                       Address,\r
@@ -47,6 +59,18 @@ EbdFindSymbolAddress (
   OUT EFI_DEBUGGER_SYMBOL_ENTRY  **Entry\r
   );\r
 \r
+/**\r
+\r
+  Load symbol file by name.\r
+\r
+  @param  DebuggerPrivate - EBC Debugger private data structure\r
+  @param  FileName        - Symbol file name\r
+  @param  BufferSize      - Symbol file buffer size\r
+  @param  Buffer          - Symbol file buffer\r
+\r
+  @retval EFI_SUCCESS - load symbol successfully\r
+\r
+**/\r
 EFI_STATUS\r
 EdbLoadSymbol (\r
   IN EFI_DEBUGGER_PRIVATE_DATA   *DebuggerPrivate,\r
@@ -55,12 +79,34 @@ EdbLoadSymbol (
   IN VOID                        *Buffer\r
   );\r
 \r
+/**\r
+\r
+  Unload symbol file by name.\r
+\r
+  @param  DebuggerPrivate - EBC Debugger private data structure\r
+  @param  FileName        - Symbol file name\r
+\r
+  @retval EFI_SUCCESS - unload symbol successfully\r
+\r
+**/\r
 EFI_STATUS\r
 EdbUnloadSymbol (\r
   IN EFI_DEBUGGER_PRIVATE_DATA   *DebuggerPrivate,\r
   IN CHAR16                      *FileName\r
   );\r
 \r
+/**\r
+\r
+  Patch symbol RVA.\r
+\r
+  @param  DebuggerPrivate - EBC Debugger private data structure\r
+  @param  FileName        - Symbol file name\r
+  @param  SearchType      - Search type for Object\r
+\r
+  @retval EFI_SUCCESS   - Patch symbol RVA successfully\r
+  @retval EFI_NOT_FOUND - Symbol RVA base not found\r
+\r
+**/\r
 EFI_STATUS\r
 EdbPatchSymbolRVA (\r
   IN EFI_DEBUGGER_PRIVATE_DATA     *DebuggerPrivate,\r
@@ -68,6 +114,19 @@ EdbPatchSymbolRVA (
   IN EDB_EBC_IMAGE_RVA_SEARCH_TYPE SearchType\r
   );\r
 \r
+/**\r
+\r
+  Load code.\r
+\r
+  @param  DebuggerPrivate - EBC Debugger private data structure\r
+  @param  MapFileName     - Symbol file name\r
+  @param  FileName        - Code file name\r
+  @param  BufferSize      - Code file buffer size\r
+  @param  Buffer          - Code file buffer\r
+\r
+  @retval EFI_SUCCESS - Code loaded successfully\r
+\r
+**/\r
 EFI_STATUS\r
 EdbLoadCode (\r
   IN EFI_DEBUGGER_PRIVATE_DATA   *DebuggerPrivate,\r
@@ -77,6 +136,18 @@ EdbLoadCode (
   IN VOID                        *Buffer\r
   );\r
 \r
+/**\r
+\r
+  Unload code.\r
+\r
+  @param  DebuggerPrivate - EBC Debugger private data structure\r
+  @param  MapFileName     - Symbol file name\r
+  @param  FileName        - Code file name\r
+  @param  Buffer          - Code file buffer\r
+\r
+  @retval EFI_SUCCESS - Code unloaded successfully\r
+\r
+**/\r
 EFI_STATUS\r
 EdbUnloadCode (\r
   IN EFI_DEBUGGER_PRIVATE_DATA   *DebuggerPrivate,\r
@@ -85,6 +156,19 @@ EdbUnloadCode (
   OUT VOID                       **Buffer\r
   );\r
 \r
+/**\r
+\r
+  Add code buffer.\r
+\r
+  @param  DebuggerPrivate - EBC Debugger private data structure\r
+  @param  MapFileName     - Symbol file name\r
+  @param  CodeFileName    - Code file name\r
+  @param  SourceBufferSize- Code buffer size\r
+  @param  SourceBuffer    - Code buffer\r
+\r
+  @retval EFI_SUCCESS - CodeBuffer added successfully\r
+\r
+**/\r
 EFI_STATUS\r
 EdbAddCodeBuffer (\r
   IN     EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,\r
@@ -94,6 +178,18 @@ EdbAddCodeBuffer (
   IN     VOID                      *SourceBuffer\r
   );\r
 \r
+/**\r
+\r
+  Delete code buffer.\r
+\r
+  @param  DebuggerPrivate - EBC Debugger private data structure\r
+  @param  MapFileName     - Symbol file name\r
+  @param  CodeFileName    - Code file name\r
+  @param  SourceBuffer    - Code buffer\r
+\r
+  @retval EFI_SUCCESS - CodeBuffer deleted successfully\r
+\r
+**/\r
 EFI_STATUS\r
 EdbDeleteCodeBuffer (\r
   IN     EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,\r
@@ -102,17 +198,49 @@ EdbDeleteCodeBuffer (
   IN     VOID                      *SourceBuffer\r
   );\r
 \r
+/**\r
+\r
+  Find the symbol string according to address.\r
+\r
+  @param  Address         - Symbol address\r
+\r
+  @return Symbol string\r
+\r
+**/\r
 CHAR8 *\r
 FindSymbolStr (\r
   IN UINTN Address\r
   );\r
 \r
+/**\r
+\r
+  Print source.\r
+\r
+  @param  Address         - Instruction address\r
+  @param  IsPrint         - Whether need to print\r
+\r
+  @retval 1 - find the source\r
+  @retval 0 - not find the source\r
+\r
+**/\r
 UINTN\r
 EdbPrintSource (\r
   IN UINTN     Address,\r
   IN BOOLEAN   IsPrint\r
   );\r
 \r
+/**\r
+\r
+  Convert a symbol to an address.\r
+\r
+  @param  Symbol          - Symbol name\r
+  @param  Address         - Symbol address\r
+\r
+  @retval EFI_SUCCESS    - symbol found and address returned.\r
+  @retval EFI_NOT_FOUND  - symbol not found\r
+  @retval EFI_NO_MAPPING - duplicated symbol not found\r
+\r
+**/\r
 EFI_STATUS\r
 Symboltoi (\r
   IN CHAR16   *Symbol,\r
index 1594cecf1650831cacf219c1514a73e3dd84b229..c5a19342f6749375fe92522c6131f228480e89f7 100644 (file)
 \r
 #include "EbcDebuggerHook.h"\r
 \r
+/**\r
+\r
+  The hook in InitializeEbcDriver.\r
+\r
+  @param Handle           - The EbcDebugProtocol handle.\r
+  @param EbcDebugProtocol - The EbcDebugProtocol interface.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookInit (\r
   IN EFI_HANDLE                  Handle,\r
@@ -27,6 +35,11 @@ EbcDebuggerHookInit (
   return;\r
 }\r
 \r
+/**\r
+\r
+The hook in UnloadImage for EBC Interpreter.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookUnload (\r
   VOID\r
@@ -35,6 +48,14 @@ EbcDebuggerHookUnload (
   return;\r
 }\r
 \r
+/**\r
+\r
+  The hook in EbcUnloadImage.\r
+  Currently do nothing here.\r
+\r
+  @param  Handle          The EbcImage handle.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookEbcUnloadImage (\r
   IN EFI_HANDLE                  Handle\r
@@ -43,6 +64,13 @@ EbcDebuggerHookEbcUnloadImage (
   return;\r
 }\r
 \r
+/**\r
+\r
+  The hook in ExecuteEbcImageEntryPoint.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookExecuteEbcImageEntryPoint (\r
   IN VM_CONTEXT *VmPtr\r
@@ -51,6 +79,13 @@ EbcDebuggerHookExecuteEbcImageEntryPoint (
   return;\r
 }\r
 \r
+/**\r
+\r
+  The hook in ExecuteEbcImageEntryPoint.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookEbcInterpret (\r
   IN VM_CONTEXT *VmPtr\r
@@ -59,6 +94,12 @@ EbcDebuggerHookEbcInterpret (
   return;\r
 }\r
 \r
+/**\r
+  The hook in EbcExecute, before ExecuteFunction.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookExecuteStart (\r
   IN VM_CONTEXT *VmPtr\r
@@ -67,6 +108,12 @@ EbcDebuggerHookExecuteStart (
   return;\r
 }\r
 \r
+/**\r
+  The hook in EbcExecute, after ExecuteFunction.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookExecuteEnd (\r
   IN VM_CONTEXT *VmPtr\r
@@ -75,6 +122,13 @@ EbcDebuggerHookExecuteEnd (
   return;\r
 }\r
 \r
+/**\r
+\r
+  The hook in ExecuteCALL, before move IP.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookCALLStart (\r
   IN VM_CONTEXT *VmPtr\r
@@ -83,6 +137,13 @@ EbcDebuggerHookCALLStart (
   return;\r
 }\r
 \r
+/**\r
+\r
+  The hook in ExecuteCALL, after move IP.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookCALLEnd (\r
   IN VM_CONTEXT *VmPtr\r
@@ -91,6 +152,13 @@ EbcDebuggerHookCALLEnd (
   return;\r
 }\r
 \r
+/**\r
+\r
+  The hook in ExecuteCALL, before call EbcLLCALLEX.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookCALLEXStart (\r
   IN VM_CONTEXT *VmPtr\r
@@ -99,6 +167,13 @@ EbcDebuggerHookCALLEXStart (
   return;\r
 }\r
 \r
+/**\r
+\r
+  The hook in ExecuteCALL, after call EbcLLCALLEX.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookCALLEXEnd (\r
   IN VM_CONTEXT *VmPtr\r
@@ -107,6 +182,13 @@ EbcDebuggerHookCALLEXEnd (
   return;\r
 }\r
 \r
+/**\r
+\r
+  The hook in ExecuteRET, before move IP.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookRETStart (\r
   IN VM_CONTEXT *VmPtr\r
@@ -115,6 +197,13 @@ EbcDebuggerHookRETStart (
   return;\r
 }\r
 \r
+/**\r
+\r
+  The hook in ExecuteRET, after move IP.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookRETEnd (\r
   IN VM_CONTEXT *VmPtr\r
@@ -123,6 +212,13 @@ EbcDebuggerHookRETEnd (
   return;\r
 }\r
 \r
+/**\r
+\r
+  The hook in ExecuteJMP, before move IP.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookJMPStart (\r
   IN VM_CONTEXT *VmPtr\r
@@ -131,6 +227,13 @@ EbcDebuggerHookJMPStart (
   return;\r
 }\r
 \r
+/**\r
+\r
+  The hook in ExecuteJMP, after move IP.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookJMPEnd (\r
   IN VM_CONTEXT *VmPtr\r
@@ -139,6 +242,13 @@ EbcDebuggerHookJMPEnd (
   return;\r
 }\r
 \r
+/**\r
+\r
+  The hook in ExecuteJMP8, before move IP.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookJMP8Start (\r
   IN VM_CONTEXT *VmPtr\r
@@ -147,6 +257,13 @@ EbcDebuggerHookJMP8Start (
   return;\r
 }\r
 \r
+/**\r
+\r
+  The hook in ExecuteJMP8, after move IP..\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookJMP8End (\r
   IN VM_CONTEXT *VmPtr\r
index ad93fd787d5605f10d57a76ba2d8d3bc66da9b25..cf81b4ad44ac9b7270f3f2833560d87f349f08bd 100644 (file)
@@ -38,96 +38,207 @@ EbcDebugSignalException (
   IN VM_CONTEXT                           *VmPtr\r
   );\r
 \r
-//\r
-// Hooks in EbcInt.c\r
-//\r
+/**\r
+\r
+  The hook in InitializeEbcDriver.\r
+\r
+  @param Handle           - The EbcDebugProtocol handle.\r
+  @param EbcDebugProtocol - The EbcDebugProtocol interface.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookInit (\r
   IN EFI_HANDLE                  Handle,\r
   IN EFI_DEBUG_SUPPORT_PROTOCOL  *EbcDebugProtocol\r
   );\r
 \r
+/**\r
+\r
+The hook in UnloadImage for EBC Interpreter.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookUnload (\r
   VOID\r
   );\r
 \r
+/**\r
+\r
+  The hook in EbcUnloadImage.\r
+  Currently do nothing here.\r
+\r
+  @param  Handle          The EbcImage handle.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookEbcUnloadImage (\r
   IN EFI_HANDLE                  Handle\r
   );\r
 \r
-//\r
-// Hooks in EbcSupport.c\r
-//\r
+\r
+/**\r
+\r
+  Hooks in EbcSupport.c\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookExecuteEbcImageEntryPoint (\r
   IN VM_CONTEXT *VmPtr\r
   );\r
 \r
+/**\r
+\r
+  The hook in ExecuteEbcImageEntryPoint.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookEbcInterpret (\r
   IN VM_CONTEXT *VmPtr\r
   );\r
 \r
-//\r
-// Hooks in EbcExecute.c\r
-//\r
+\r
+/**\r
+  The hook in EbcExecute, before ExecuteFunction.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookExecuteStart (\r
   IN VM_CONTEXT *VmPtr\r
   );\r
 \r
+/**\r
+  The hook in EbcExecute, after ExecuteFunction.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookExecuteEnd (\r
   IN VM_CONTEXT *VmPtr\r
   );\r
 \r
+/**\r
+  The hook in ExecuteCALL, before move IP.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookCALLStart (\r
   IN VM_CONTEXT *VmPtr\r
   );\r
 \r
+/**\r
+\r
+  The hook in ExecuteCALL, after move IP.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookCALLEnd (\r
   IN VM_CONTEXT *VmPtr\r
   );\r
 \r
+/**\r
+\r
+  The hook in ExecuteCALL, before call EbcLLCALLEX.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookCALLEXStart (\r
   IN VM_CONTEXT *VmPtr\r
   );\r
 \r
+/**\r
+\r
+  The hook in ExecuteCALL, after call EbcLLCALLEX.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookCALLEXEnd (\r
   IN VM_CONTEXT *VmPtr\r
   );\r
 \r
+/**\r
+\r
+  The hook in ExecuteRET, before move IP.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookRETStart (\r
   IN VM_CONTEXT *VmPtr\r
   );\r
 \r
+/**\r
+\r
+  The hook in ExecuteRET, after move IP.\r
+  It will record trace information.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookRETEnd (\r
   IN VM_CONTEXT *VmPtr\r
   );\r
 \r
+\r
+/**\r
+\r
+  The hook in ExecuteJMP, before move IP.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookJMPStart (\r
   IN VM_CONTEXT *VmPtr\r
   );\r
 \r
+/**\r
+\r
+  The hook in ExecuteJMP, after move IP.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookJMPEnd (\r
   IN VM_CONTEXT *VmPtr\r
   );\r
 \r
+/**\r
+\r
+  The hook in ExecuteJMP8, before move IP.\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookJMP8Start (\r
   IN VM_CONTEXT *VmPtr\r
   );\r
 \r
+/**\r
+\r
+  The hook in ExecuteJMP8, after move IP..\r
+\r
+  @param  VmPtr - pointer to VM context.\r
+\r
+**/\r
 VOID\r
 EbcDebuggerHookJMP8End (\r
   IN VM_CONTEXT *VmPtr\r