]>
Commit | Line | Data |
---|---|---|
e8a5ac7c | 1 | /** @file\r |
748edcd5 | 2 | \r |
e8a5ac7c | 3 | Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r |
9d510e61 | 4 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
748edcd5 | 5 | \r |
748edcd5 | 6 | \r |
e8a5ac7c | 7 | **/\r |
748edcd5 | 8 | \r |
e8a5ac7c | 9 | #include "Edb.h"\r |
748edcd5 | 10 | \r |
e8a5ac7c | 11 | /**\r |
748edcd5 | 12 | \r |
e8a5ac7c | 13 | DebuggerCommand - Help.\r |
748edcd5 | 14 | \r |
e8a5ac7c DB |
15 | @param CommandArg - The argument for this command\r |
16 | @param DebuggerPrivate - EBC Debugger private data structure\r | |
17 | @param ExceptionType - Interrupt type.\r | |
18 | @param SystemContext - EBC system context.\r | |
19 | \r | |
20 | @retval EFI_DEBUG_CONTINUE - formal return value\r | |
748edcd5 | 21 | \r |
e8a5ac7c | 22 | **/\r |
748edcd5 PB |
23 | EFI_DEBUG_STATUS\r |
24 | DebuggerHelp (\r | |
1436aea4 MK |
25 | IN CHAR16 *CommandArg,\r |
26 | IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,\r | |
27 | IN EFI_EXCEPTION_TYPE ExceptionType,\r | |
28 | IN OUT EFI_SYSTEM_CONTEXT SystemContext\r | |
748edcd5 | 29 | )\r |
748edcd5 | 30 | {\r |
1436aea4 | 31 | UINTN Index;\r |
748edcd5 PB |
32 | \r |
33 | //\r | |
34 | // if no argument, print all the command title\r | |
35 | //\r | |
36 | if (CommandArg == NULL) {\r | |
37 | for (Index = 0; DebuggerPrivate->DebuggerCommandSet[Index].CommandName != NULL; Index++) {\r | |
38 | EDBPrint (DebuggerPrivate->DebuggerCommandSet[Index].ClassName);\r | |
39 | if (StrCmp (DebuggerPrivate->DebuggerCommandSet[Index].CommandTitle, L"") != 0) {\r | |
40 | EDBPrint (L" ");\r | |
41 | EDBPrint (DebuggerPrivate->DebuggerCommandSet[Index].CommandTitle);\r | |
42 | }\r | |
43 | }\r | |
1436aea4 | 44 | \r |
748edcd5 PB |
45 | return EFI_DEBUG_CONTINUE;\r |
46 | }\r | |
47 | \r | |
48 | //\r | |
49 | // If there is argument, the argument should be command name.\r | |
50 | // Find the command and print the detail information.\r | |
51 | //\r | |
52 | for (Index = 0; DebuggerPrivate->DebuggerCommandSet[Index].CommandName != NULL; Index++) {\r | |
53 | if (StriCmp (CommandArg, DebuggerPrivate->DebuggerCommandSet[Index].CommandName) == 0) {\r | |
54 | EDBPrint (DebuggerPrivate->DebuggerCommandSet[Index].CommandHelp);\r | |
55 | EDBPrint (DebuggerPrivate->DebuggerCommandSet[Index].CommandSyntax);\r | |
56 | return EFI_DEBUG_CONTINUE;\r | |
57 | }\r | |
58 | }\r | |
59 | \r | |
60 | //\r | |
61 | // Command not found.\r | |
62 | //\r | |
63 | EDBPrint (L"No help info for this command\n");\r | |
64 | \r | |
65 | //\r | |
66 | // Done\r | |
67 | //\r | |
68 | return EFI_DEBUG_CONTINUE;\r | |
69 | }\r |