3 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 DebuggerCommand - Scope.
21 @param CommandArg - The argument for this command
22 @param DebuggerPrivate - EBC Debugger private data structure
23 @param ExceptionType - Exception type.
24 @param SystemContext - EBC system context.
26 @retval EFI_DEBUG_CONTINUE - formal return value
31 IN CHAR16
*CommandArg
,
32 IN EFI_DEBUGGER_PRIVATE_DATA
*DebuggerPrivate
,
33 IN EFI_EXCEPTION_TYPE ExceptionType
,
34 IN OUT EFI_SYSTEM_CONTEXT SystemContext
40 if (CommandArg
== NULL
) {
41 EDBPrint (L
"Scope: invalid Address\n");
42 return EFI_DEBUG_CONTINUE
;
48 Status
= Symboltoi (CommandArg
, &Address
);
49 if (EFI_ERROR (Status
)) {
50 if (Status
== EFI_NOT_FOUND
) {
51 Address
= Xtoi(CommandArg
);
54 // Something wrong, let Symboltoi print error info.
56 EDBPrint (L
"Command Argument error!\n");
57 return EFI_DEBUG_CONTINUE
;
60 DebuggerPrivate
->InstructionScope
= Address
;
61 EDBPrint (L
"Scope: 0x%x\n", DebuggerPrivate
->InstructionScope
);
62 EdbShowDisasm (DebuggerPrivate
, SystemContext
);
67 return EFI_DEBUG_CONTINUE
;
72 DebuggerCommand - List.
74 @param CommandArg - The argument for this command
75 @param DebuggerPrivate - EBC Debugger private data structure
76 @param ExceptionType - Exception type.
77 @param SystemContext - EBC system context.
79 @retval EFI_DEBUG_CONTINUE - formal return value
84 IN CHAR16
*CommandArg
,
85 IN EFI_DEBUGGER_PRIVATE_DATA
*DebuggerPrivate
,
86 IN EFI_EXCEPTION_TYPE ExceptionType
,
87 IN OUT EFI_SYSTEM_CONTEXT SystemContext
90 if (CommandArg
== NULL
) {
91 EdbShowDisasm (DebuggerPrivate
, SystemContext
);
94 // Load new list number
96 DebuggerPrivate
->InstructionNumber
= Atoi(CommandArg
);
97 EDBPrint (L
"List Number: %d\n", DebuggerPrivate
->InstructionNumber
);
98 EdbShowDisasm (DebuggerPrivate
, SystemContext
);
104 return EFI_DEBUG_CONTINUE
;