TianoCore EDK2 master
Loading...
Searching...
No Matches
EdbCmdHelp.c
Go to the documentation of this file.
1
9#include "Edb.h"
10
23EFI_DEBUG_STATUS
25 IN CHAR16 *CommandArg,
26 IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
27 IN EFI_EXCEPTION_TYPE ExceptionType,
28 IN OUT EFI_SYSTEM_CONTEXT SystemContext
29 )
30{
31 UINTN Index;
32
33 //
34 // if no argument, print all the command title
35 //
36 if (CommandArg == NULL) {
37 for (Index = 0; DebuggerPrivate->DebuggerCommandSet[Index].CommandName != NULL; Index++) {
38 EDBPrint (DebuggerPrivate->DebuggerCommandSet[Index].ClassName);
39 if (StrCmp (DebuggerPrivate->DebuggerCommandSet[Index].CommandTitle, L"") != 0) {
40 EDBPrint (L" ");
41 EDBPrint (DebuggerPrivate->DebuggerCommandSet[Index].CommandTitle);
42 }
43 }
44
45 return EFI_DEBUG_CONTINUE;
46 }
47
48 //
49 // If there is argument, the argument should be command name.
50 // Find the command and print the detail information.
51 //
52 for (Index = 0; DebuggerPrivate->DebuggerCommandSet[Index].CommandName != NULL; Index++) {
53 if (StriCmp (CommandArg, DebuggerPrivate->DebuggerCommandSet[Index].CommandName) == 0) {
54 EDBPrint (DebuggerPrivate->DebuggerCommandSet[Index].CommandHelp);
55 EDBPrint (DebuggerPrivate->DebuggerCommandSet[Index].CommandSyntax);
56 return EFI_DEBUG_CONTINUE;
57 }
58 }
59
60 //
61 // Command not found.
62 //
63 EDBPrint (L"No help info for this command\n");
64
65 //
66 // Done
67 //
68 return EFI_DEBUG_CONTINUE;
69}
UINT64 UINTN
INTN EFIAPI StrCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString)
Definition: String.c:109
EFI_DEBUG_STATUS DebuggerHelp(IN CHAR16 *CommandArg, IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN EFI_EXCEPTION_TYPE ExceptionType, IN OUT EFI_SYSTEM_CONTEXT SystemContext)
Definition: EdbCmdHelp.c:24
UINTN EFIAPI EDBPrint(IN CONST CHAR16 *Format,...)
Definition: EdbSupportUI.c:683
INTN EFIAPI StriCmp(IN CHAR16 *String, IN CHAR16 *String2)
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
INTN EFI_EXCEPTION_TYPE
Definition: DebugSupport.h:35