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 Check whether current IP is EBC CALL instruction (NOTE: CALLEX is exclusive)
21 @param Address - EBC IP address.
23 @retval TRUE - Current IP is EBC CALL instruction
24 @retval FALSE - Current IP is not EBC CALL instruction
32 if (GET_OPCODE(Address
) != OPCODE_CALL
) {
36 if (GET_OPERANDS (Address
) & OPERAND_M_NATIVE_CALL
) {
45 Check whether current IP is EBC RET instruction.
47 @param Address - EBC IP address.
49 @retval TRUE - Current IP is EBC RET instruction
50 @retval FALSE - Current IP is not EBC RET instruction
58 if (GET_OPCODE(Address
) != OPCODE_RET
) {
62 if (GET_OPERANDS (Address
) != 0) {
71 DebuggerCommand - StepInto.
73 @param CommandArg - The argument for this command
74 @param DebuggerPrivate - EBC Debugger private data structure
75 @param ExceptionType - Exception type.
76 @param SystemContext - EBC system context.
78 @retval EFI_DEBUG_CONTINUE - formal return value
83 IN CHAR16
*CommandArg
,
84 IN EFI_DEBUGGER_PRIVATE_DATA
*DebuggerPrivate
,
85 IN EFI_EXCEPTION_TYPE ExceptionType
,
86 IN OUT EFI_SYSTEM_CONTEXT SystemContext
89 SystemContext
.SystemContextEbc
->Flags
|= VMFLAGS_STEP
;
91 return EFI_DEBUG_BREAK
;
96 DebuggerCommand - StepOver.
98 @param CommandArg - The argument for this command
99 @param DebuggerPrivate - EBC Debugger private data structure
100 @param ExceptionType - Exception type.
101 @param SystemContext - EBC system context.
103 @retval EFI_DEBUG_CONTINUE - formal return value
108 IN CHAR16
*CommandArg
,
109 IN EFI_DEBUGGER_PRIVATE_DATA
*DebuggerPrivate
,
110 IN EFI_EXCEPTION_TYPE ExceptionType
,
111 IN OUT EFI_SYSTEM_CONTEXT SystemContext
114 if (IsEBCCALL((UINTN
)SystemContext
.SystemContextEbc
->Ip
)) {
116 // Check CALL (NOTE: CALLEX is exclusive)
118 DebuggerPrivate
->FeatureFlags
|= EFI_DEBUG_FLAG_EBC_STEPOVER
;
121 // Other instruction including CALLEX
123 SystemContext
.SystemContextEbc
->Flags
|= VMFLAGS_STEP
;
126 return EFI_DEBUG_BREAK
;
131 DebuggerCommand - StepOut.
133 @param CommandArg - The argument for this command
134 @param DebuggerPrivate - EBC Debugger private data structure
135 @param ExceptionType - Exception type.
136 @param SystemContext - EBC system context.
138 @retval EFI_DEBUG_CONTINUE - formal return value
143 IN CHAR16
*CommandArg
,
144 IN EFI_DEBUGGER_PRIVATE_DATA
*DebuggerPrivate
,
145 IN EFI_EXCEPTION_TYPE ExceptionType
,
146 IN OUT EFI_SYSTEM_CONTEXT SystemContext
149 if (IsEBCRET((UINTN
)SystemContext
.SystemContextEbc
->Ip
)) {
153 SystemContext
.SystemContextEbc
->Flags
|= VMFLAGS_STEP
;
158 DebuggerPrivate
->FeatureFlags
|= EFI_DEBUG_FLAG_EBC_STEPOUT
;
161 return EFI_DEBUG_BREAK
;