TianoCore EDK2 master
Loading...
Searching...
No Matches
EdbCmdGo.c
Go to the documentation of this file.
1
10#include "Edb.h"
11
25EFI_DEBUG_STATUS
27 IN CHAR16 *CommandArg,
28 IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
29 IN EFI_EXCEPTION_TYPE ExceptionType,
30 IN OUT EFI_SYSTEM_CONTEXT SystemContext
31 )
32{
33 UINTN Address;
34 CHAR16 *CommandStr;
35 EFI_STATUS Status;
36
37 //
38 // Check argument
39 //
40 if (CommandArg != NULL) {
41 if (StriCmp (CommandArg, L"til") == 0) {
42 CommandStr = StrGetNextTokenLine (L" ");
43 if (CommandStr != NULL) {
44 //
45 // Enable GoTil break now
46 // set BreakAddress, and set feature flag.
47 //
48 Status = Symboltoi (CommandStr, &Address);
49 if (EFI_ERROR (Status)) {
50 if (Status == EFI_NOT_FOUND) {
51 Address = Xtoi (CommandStr);
52 } else {
53 //
54 // Something wrong, let Symboltoi print error info.
55 //
56 EDBPrint (L"Command Argument error!\n");
57 return EFI_DEBUG_CONTINUE;
58 }
59 }
60
61 DebuggerPrivate->GoTilContext.BreakAddress = Address;
62 DebuggerPrivate->FeatureFlags |= EFI_DEBUG_FLAG_EBC_GT;
63 } else {
64 EDBPrint (L"Command Argument error!\n");
65 return EFI_DEBUG_CONTINUE;
66 }
67 } else {
68 EDBPrint (L"Command Argument error!\n");
69 return EFI_DEBUG_CONTINUE;
70 }
71 }
72
73 //
74 // Done
75 //
76 return EFI_DEBUG_BREAK;
77}
UINT64 UINTN
EFI_DEBUG_STATUS DebuggerGo(IN CHAR16 *CommandArg, IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN EFI_EXCEPTION_TYPE ExceptionType, IN OUT EFI_SYSTEM_CONTEXT SystemContext)
Definition: EdbCmdGo.c:26
UINTN EFIAPI Xtoi(CHAR16 *Str)
CHAR16 *EFIAPI StrGetNextTokenLine(IN CHAR16 *CharSet)
UINTN EFIAPI EDBPrint(IN CONST CHAR16 *Format,...)
Definition: EdbSupportUI.c:683
INTN EFIAPI StriCmp(IN CHAR16 *String, IN CHAR16 *String2)
EFI_STATUS Symboltoi(IN CHAR16 *Symbol, OUT UINTN *Address)
Definition: EdbSymbol.c:2222
#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
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29