]>
Commit | Line | Data |
---|---|---|
e8a5ac7c | 1 | /** @file\r |
748edcd5 | 2 | \r |
e8a5ac7c DB |
3 | Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r |
4 | This program and the accompanying materials\r | |
748edcd5 PB |
5 | are licensed and made available under the terms and conditions of the BSD License\r |
6 | which accompanies this distribution. The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.php\r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | WITHOUT 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 |
29 | EFI_DEBUG_STATUS\r |
30 | DebuggerHelp (\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 |