]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdHelp.c
MdeModulePkg/EbcDxe: Add comments for functions
[mirror_edk2.git] / MdeModulePkg / Universal / EbcDxe / EbcDebugger / EdbCmdHelp.c
CommitLineData
e8a5ac7c 1/** @file\r
748edcd5 2\r
e8a5ac7c
DB
3Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials\r
748edcd5
PB
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
748edcd5 12\r
e8a5ac7c 13**/\r
748edcd5 14\r
e8a5ac7c 15#include "Edb.h"\r
748edcd5 16\r
e8a5ac7c 17/**\r
748edcd5 18\r
e8a5ac7c 19 DebuggerCommand - Help.\r
748edcd5 20\r
e8a5ac7c
DB
21 @param CommandArg - The argument for this command\r
22 @param DebuggerPrivate - EBC Debugger private data structure\r
23 @param ExceptionType - Interrupt type.\r
24 @param SystemContext - EBC system context.\r
25\r
26 @retval EFI_DEBUG_CONTINUE - formal return value\r
748edcd5 27\r
e8a5ac7c 28**/\r
748edcd5
PB
29EFI_DEBUG_STATUS\r
30DebuggerHelp (\r
31 IN CHAR16 *CommandArg,\r
32 IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,\r
33 IN EFI_EXCEPTION_TYPE ExceptionType,\r
34 IN OUT EFI_SYSTEM_CONTEXT SystemContext\r
35 )\r
748edcd5
PB
36{\r
37 UINTN Index;\r
38\r
39 //\r
40 // if no argument, print all the command title\r
41 //\r
42 if (CommandArg == NULL) {\r
43 for (Index = 0; DebuggerPrivate->DebuggerCommandSet[Index].CommandName != NULL; Index++) {\r
44 EDBPrint (DebuggerPrivate->DebuggerCommandSet[Index].ClassName);\r
45 if (StrCmp (DebuggerPrivate->DebuggerCommandSet[Index].CommandTitle, L"") != 0) {\r
46 EDBPrint (L" ");\r
47 EDBPrint (DebuggerPrivate->DebuggerCommandSet[Index].CommandTitle);\r
48 }\r
49 }\r
50 return EFI_DEBUG_CONTINUE;\r
51 }\r
52\r
53 //\r
54 // If there is argument, the argument should be command name.\r
55 // Find the command and print the detail information.\r
56 //\r
57 for (Index = 0; DebuggerPrivate->DebuggerCommandSet[Index].CommandName != NULL; Index++) {\r
58 if (StriCmp (CommandArg, DebuggerPrivate->DebuggerCommandSet[Index].CommandName) == 0) {\r
59 EDBPrint (DebuggerPrivate->DebuggerCommandSet[Index].CommandHelp);\r
60 EDBPrint (DebuggerPrivate->DebuggerCommandSet[Index].CommandSyntax);\r
61 return EFI_DEBUG_CONTINUE;\r
62 }\r
63 }\r
64\r
65 //\r
66 // Command not found.\r
67 //\r
68 EDBPrint (L"No help info for this command\n");\r
69\r
70 //\r
71 // Done\r
72 //\r
73 return EFI_DEBUG_CONTINUE;\r
74}\r