]>
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 |
748edcd5 | 7 | \r |
e8a5ac7c | 8 | **/\r |
748edcd5 | 9 | \r |
e8a5ac7c | 10 | #include "Edb.h"\r |
748edcd5 | 11 | \r |
e8a5ac7c | 12 | /**\r |
748edcd5 | 13 | \r |
e8a5ac7c DB |
14 | DebuggerCommand - Go.\r |
15 | \r | |
16 | @param CommandArg - The argument for this command\r | |
17 | @param DebuggerPrivate - EBC Debugger private data structure\r | |
18 | @param ExceptionType - Interrupt type.\r | |
19 | @param SystemContext - EBC system context.\r | |
748edcd5 | 20 | \r |
e8a5ac7c DB |
21 | @retval EFI_DEBUG_BREAK - formal return value\r |
22 | @retval EFI_DEBUG_CONTINUE - something wrong\r | |
23 | \r | |
24 | **/\r | |
748edcd5 PB |
25 | EFI_DEBUG_STATUS\r |
26 | DebuggerGo (\r | |
1436aea4 MK |
27 | IN CHAR16 *CommandArg,\r |
28 | IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,\r | |
29 | IN EFI_EXCEPTION_TYPE ExceptionType,\r | |
30 | IN OUT EFI_SYSTEM_CONTEXT SystemContext\r | |
748edcd5 | 31 | )\r |
748edcd5 | 32 | {\r |
1436aea4 MK |
33 | UINTN Address;\r |
34 | CHAR16 *CommandStr;\r | |
35 | EFI_STATUS Status;\r | |
748edcd5 PB |
36 | \r |
37 | //\r | |
38 | // Check argument\r | |
39 | //\r | |
40 | if (CommandArg != NULL) {\r | |
41 | if (StriCmp (CommandArg, L"til") == 0) {\r | |
42 | CommandStr = StrGetNextTokenLine (L" ");\r | |
43 | if (CommandStr != NULL) {\r | |
44 | //\r | |
45 | // Enable GoTil break now\r | |
46 | // set BreakAddress, and set feature flag.\r | |
47 | //\r | |
48 | Status = Symboltoi (CommandStr, &Address);\r | |
49 | if (EFI_ERROR (Status)) {\r | |
50 | if (Status == EFI_NOT_FOUND) {\r | |
1436aea4 | 51 | Address = Xtoi (CommandStr);\r |
748edcd5 PB |
52 | } else {\r |
53 | //\r | |
54 | // Something wrong, let Symboltoi print error info.\r | |
55 | //\r | |
56 | EDBPrint (L"Command Argument error!\n");\r | |
57 | return EFI_DEBUG_CONTINUE;\r | |
58 | }\r | |
59 | }\r | |
1436aea4 | 60 | \r |
748edcd5 | 61 | DebuggerPrivate->GoTilContext.BreakAddress = Address;\r |
1436aea4 | 62 | DebuggerPrivate->FeatureFlags |= EFI_DEBUG_FLAG_EBC_GT;\r |
748edcd5 PB |
63 | } else {\r |
64 | EDBPrint (L"Command Argument error!\n");\r | |
65 | return EFI_DEBUG_CONTINUE;\r | |
66 | }\r | |
67 | } else {\r | |
68 | EDBPrint (L"Command Argument error!\n");\r | |
69 | return EFI_DEBUG_CONTINUE;\r | |
70 | }\r | |
71 | }\r | |
72 | \r | |
73 | //\r | |
74 | // Done\r | |
75 | //\r | |
76 | return EFI_DEBUG_BREAK;\r | |
77 | }\r |