3 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
13 Check whether current IP is EBC CALL instruction (NOTE: CALLEX is exclusive)
15 @param Address - EBC IP address.
17 @retval TRUE - Current IP is EBC CALL instruction
18 @retval FALSE - Current IP is not EBC CALL instruction
26 if (GET_OPCODE(Address
) != OPCODE_CALL
) {
30 if (GET_OPERANDS (Address
) & OPERAND_M_NATIVE_CALL
) {
39 Check whether current IP is EBC RET instruction.
41 @param Address - EBC IP address.
43 @retval TRUE - Current IP is EBC RET instruction
44 @retval FALSE - Current IP is not EBC RET instruction
52 if (GET_OPCODE(Address
) != OPCODE_RET
) {
56 if (GET_OPERANDS (Address
) != 0) {
65 DebuggerCommand - StepInto.
67 @param CommandArg - The argument for this command
68 @param DebuggerPrivate - EBC Debugger private data structure
69 @param ExceptionType - Exception type.
70 @param SystemContext - EBC system context.
72 @retval EFI_DEBUG_CONTINUE - formal return value
77 IN CHAR16
*CommandArg
,
78 IN EFI_DEBUGGER_PRIVATE_DATA
*DebuggerPrivate
,
79 IN EFI_EXCEPTION_TYPE ExceptionType
,
80 IN OUT EFI_SYSTEM_CONTEXT SystemContext
83 SystemContext
.SystemContextEbc
->Flags
|= VMFLAGS_STEP
;
85 return EFI_DEBUG_BREAK
;
90 DebuggerCommand - StepOver.
92 @param CommandArg - The argument for this command
93 @param DebuggerPrivate - EBC Debugger private data structure
94 @param ExceptionType - Exception type.
95 @param SystemContext - EBC system context.
97 @retval EFI_DEBUG_CONTINUE - formal return value
102 IN CHAR16
*CommandArg
,
103 IN EFI_DEBUGGER_PRIVATE_DATA
*DebuggerPrivate
,
104 IN EFI_EXCEPTION_TYPE ExceptionType
,
105 IN OUT EFI_SYSTEM_CONTEXT SystemContext
108 if (IsEBCCALL((UINTN
)SystemContext
.SystemContextEbc
->Ip
)) {
110 // Check CALL (NOTE: CALLEX is exclusive)
112 DebuggerPrivate
->FeatureFlags
|= EFI_DEBUG_FLAG_EBC_STEPOVER
;
115 // Other instruction including CALLEX
117 SystemContext
.SystemContextEbc
->Flags
|= VMFLAGS_STEP
;
120 return EFI_DEBUG_BREAK
;
125 DebuggerCommand - StepOut.
127 @param CommandArg - The argument for this command
128 @param DebuggerPrivate - EBC Debugger private data structure
129 @param ExceptionType - Exception type.
130 @param SystemContext - EBC system context.
132 @retval EFI_DEBUG_CONTINUE - formal return value
137 IN CHAR16
*CommandArg
,
138 IN EFI_DEBUGGER_PRIVATE_DATA
*DebuggerPrivate
,
139 IN EFI_EXCEPTION_TYPE ExceptionType
,
140 IN OUT EFI_SYSTEM_CONTEXT SystemContext
143 if (IsEBCRET((UINTN
)SystemContext
.SystemContextEbc
->Ip
)) {
147 SystemContext
.SystemContextEbc
->Flags
|= VMFLAGS_STEP
;
152 DebuggerPrivate
->FeatureFlags
|= EFI_DEBUG_FLAG_EBC_STEPOUT
;
155 return EFI_DEBUG_BREAK
;