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 the Hook flag, and trigger exception if match.
21 @param VmPtr - EbcDebuggerCheckHookFlag
22 @param Flag - Feature flag
26 EbcDebuggerCheckHookFlag (
31 if ((mDebuggerPrivate
.FeatureFlags
& Flag
) == Flag
) {
32 mDebuggerPrivate
.StatusFlags
= Flag
;
33 EbcDebugSignalException (
34 EXCEPT_EBC_BREAKPOINT
,
44 It will record soruce address for Callstack entry.
46 @param SourceEntry - Source address
47 @param Type - Branch type
51 EbcDebuggerPushCallstackSource (
52 IN UINT64 SourceEntry
,
53 IN EFI_DEBUGGER_BRANCH_TYPE Type
56 if (mDebuggerPrivate
.CallStackEntryCount
> EFI_DEBUGGER_CALLSTACK_MAX
) {
58 mDebuggerPrivate
.CallStackEntryCount
= EFI_DEBUGGER_CALLSTACK_MAX
;
61 // Record the new callstack entry
63 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].SourceAddress
= SourceEntry
;
64 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].Type
= Type
;
67 // Do not change CallStackEntryCount
75 It will record parameter for Callstack entry.
77 @param ParameterAddress - The address for the parameter
78 @param Type - Branch type
82 EbcDebuggerPushCallstackParameter (
83 IN UINT64 ParameterAddress
,
84 IN EFI_DEBUGGER_BRANCH_TYPE Type
87 if (mDebuggerPrivate
.CallStackEntryCount
> EFI_DEBUGGER_CALLSTACK_MAX
) {
89 mDebuggerPrivate
.CallStackEntryCount
= EFI_DEBUGGER_CALLSTACK_MAX
;
92 // Record the new callstack parameter
94 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].ParameterAddr
= (UINTN
)ParameterAddress
;
96 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].Parameter
,
97 (VOID
*)(UINTN
)ParameterAddress
,
98 sizeof(mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].Parameter
)
102 // Do not change CallStackEntryCount
110 It will record source address for callstack entry.
112 @param DestEntry - Source address
113 @param Type - Branch type
117 EbcDebuggerPushCallstackDest (
119 IN EFI_DEBUGGER_BRANCH_TYPE Type
124 if (mDebuggerPrivate
.CallStackEntryCount
< EFI_DEBUGGER_CALLSTACK_MAX
) {
126 // If there is empty entry for callstack, add it
128 ASSERT (mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].Type
== Type
);
129 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].DestAddress
= DestEntry
;
130 mDebuggerPrivate
.CallStackEntryCount
++;
133 // If there is no empty entry for callstack, throw the oldest one
135 ASSERT (mDebuggerPrivate
.CallStackEntry
[EFI_DEBUGGER_TRACE_MAX
].Type
== Type
);
136 for (Index
= 0; Index
< EFI_DEBUGGER_CALLSTACK_MAX
; Index
++) {
137 mDebuggerPrivate
.CallStackEntry
[Index
] = mDebuggerPrivate
.CallStackEntry
[Index
+ 1];
139 mDebuggerPrivate
.CallStackEntry
[EFI_DEBUGGER_CALLSTACK_MAX
- 1].DestAddress
= DestEntry
;
140 mDebuggerPrivate
.CallStackEntryCount
= EFI_DEBUGGER_CALLSTACK_MAX
;
148 It will throw the newest Callstack entry.
152 EbcDebuggerPopCallstack (
156 if ((mDebuggerPrivate
.CallStackEntryCount
> 0) &&
157 (mDebuggerPrivate
.CallStackEntryCount
<= EFI_DEBUGGER_CALLSTACK_MAX
)) {
159 // Throw the newest one
161 mDebuggerPrivate
.CallStackEntryCount
--;
162 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].SourceAddress
= 0;
163 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].DestAddress
= 0;
164 } else if (mDebuggerPrivate
.CallStackEntryCount
== 0) {
166 // NOT assert here because it is reasonable, because when we start to build
167 // callstack, we do not know how many function already called.
178 It will record source address for trace entry.
180 @param SourceEntry - Source address
181 @param Type - Branch type
185 EbcDebuggerPushTraceSourceEntry (
186 IN UINT64 SourceEntry
,
187 IN EFI_DEBUGGER_BRANCH_TYPE Type
190 if (mDebuggerPrivate
.TraceEntryCount
> EFI_DEBUGGER_TRACE_MAX
) {
192 mDebuggerPrivate
.TraceEntryCount
= EFI_DEBUGGER_TRACE_MAX
;
195 // Record the new trace entry
197 mDebuggerPrivate
.TraceEntry
[mDebuggerPrivate
.TraceEntryCount
].SourceAddress
= SourceEntry
;
198 mDebuggerPrivate
.TraceEntry
[mDebuggerPrivate
.TraceEntryCount
].Type
= Type
;
201 // Do not change TraceEntryCount
209 It will record destination address for trace entry.
211 @param DestEntry - Destination address
212 @param Type - Branch type
216 EbcDebuggerPushTraceDestEntry (
218 IN EFI_DEBUGGER_BRANCH_TYPE Type
223 if (mDebuggerPrivate
.TraceEntryCount
< EFI_DEBUGGER_TRACE_MAX
) {
225 // If there is empty entry for trace, add it
227 ASSERT (mDebuggerPrivate
.TraceEntry
[mDebuggerPrivate
.TraceEntryCount
].Type
== Type
);
228 mDebuggerPrivate
.TraceEntry
[mDebuggerPrivate
.TraceEntryCount
].DestAddress
= DestEntry
;
229 mDebuggerPrivate
.TraceEntryCount
++;
232 // If there is no empty entry for trace, throw the oldest one
234 ASSERT (mDebuggerPrivate
.TraceEntry
[EFI_DEBUGGER_TRACE_MAX
].Type
== Type
);
235 for (Index
= 0; Index
< EFI_DEBUGGER_TRACE_MAX
; Index
++) {
236 mDebuggerPrivate
.TraceEntry
[Index
] = mDebuggerPrivate
.TraceEntry
[Index
+ 1];
238 mDebuggerPrivate
.TraceEntry
[EFI_DEBUGGER_CALLSTACK_MAX
- 1].DestAddress
= DestEntry
;
239 mDebuggerPrivate
.TraceEntryCount
= EFI_DEBUGGER_TRACE_MAX
;
247 It will record address for StepEntry, if STEPOVER or STEPOUT is enabled.
249 @param Entry - Break Address
250 @param FramePtr - Break Frame pointer
251 @param Flag - for STEPOVER or STEPOUT
255 EbcDebuggerPushStepEntry (
264 if ((Flag
== EFI_DEBUG_FLAG_EBC_STEPOVER
) &&
265 ((mDebuggerPrivate
.FeatureFlags
& EFI_DEBUG_FLAG_EBC_STEPOVER
) == EFI_DEBUG_FLAG_EBC_STEPOVER
)) {
266 mDebuggerPrivate
.StepContext
.BreakAddress
= Entry
;
267 mDebuggerPrivate
.StepContext
.FramePointer
= FramePtr
;
268 mDebuggerPrivate
.FeatureFlags
&= ~EFI_DEBUG_FLAG_EBC_B_STEPOVER
;
273 if ((Flag
== EFI_DEBUG_FLAG_EBC_STEPOUT
) &&
274 ((mDebuggerPrivate
.FeatureFlags
& EFI_DEBUG_FLAG_EBC_STEPOUT
) == EFI_DEBUG_FLAG_EBC_STEPOUT
)) {
275 mDebuggerPrivate
.StepContext
.BreakAddress
= Entry
;
276 mDebuggerPrivate
.StepContext
.FramePointer
= FramePtr
;
277 mDebuggerPrivate
.FeatureFlags
&= ~EFI_DEBUG_FLAG_EBC_B_STEPOUT
;
283 Notify the callback function when an event is triggered.
285 @param Event Indicates the event that invoke this function.
286 @param Context Indicates the calling context.
291 EbcDebuggerBreakEventFunc (
298 if ((mDebuggerPrivate
.FeatureFlags
& EFI_DEBUG_FLAG_EBC_BOK
) != EFI_DEBUG_FLAG_EBC_BOK
) {
302 Status
= gBS
->CheckEvent (gST
->ConIn
->WaitForKey
);
303 if (Status
== EFI_SUCCESS
) {
304 mDebuggerPrivate
.StatusFlags
= EFI_DEBUG_FLAG_EBC_BOK
;
310 The hook in InitializeEbcDriver.
311 It will init the EbcDebuggerPrivate data structure.
313 @param Handle - The EbcDebugProtocol handle.
314 @param EbcDebugProtocol - The EbcDebugProtocol interface.
318 EbcDebuggerHookInit (
319 IN EFI_HANDLE Handle
,
320 IN EFI_DEBUG_SUPPORT_PROTOCOL
*EbcDebugProtocol
325 EFI_DEBUGGER_SYMBOL_OBJECT
*Object
;
326 EFI_DEBUGGER_SYMBOL_ENTRY
*Entry
;
330 // Register all exception handler
332 for (Index
= EXCEPT_EBC_UNDEFINED
; Index
<= EXCEPT_EBC_STEP
; Index
++) {
333 EbcDebugProtocol
->RegisterExceptionCallback (
339 EbcDebugProtocol
->RegisterExceptionCallback (
350 Object
= AllocateZeroPool (sizeof(EFI_DEBUGGER_SYMBOL_OBJECT
) * EFI_DEBUGGER_SYMBOL_OBJECT_MAX
);
351 ASSERT (Object
!= NULL
);
352 mDebuggerPrivate
.DebuggerSymbolContext
.Object
= Object
;
353 mDebuggerPrivate
.DebuggerSymbolContext
.ObjectCount
= 0;
354 mDebuggerPrivate
.DebuggerSymbolContext
.MaxObjectCount
= EFI_DEBUGGER_SYMBOL_OBJECT_MAX
;
355 for (Index
= 0; Index
< EFI_DEBUGGER_SYMBOL_OBJECT_MAX
; Index
++) {
356 Entry
= AllocateZeroPool (sizeof(EFI_DEBUGGER_SYMBOL_ENTRY
) * EFI_DEBUGGER_SYMBOL_ENTRY_MAX
);
357 ASSERT (Entry
!= NULL
);
358 Object
[Index
].Entry
= Entry
;
359 Object
[Index
].MaxEntryCount
= EFI_DEBUGGER_SYMBOL_ENTRY_MAX
;
360 Object
[Index
].SourceBuffer
= AllocateZeroPool (sizeof(VOID
*) * (EFI_DEBUGGER_SYMBOL_ENTRY_MAX
+ 1));
361 ASSERT (Object
[Index
].SourceBuffer
!= NULL
);
365 // locate PciRootBridgeIo
367 Status
= gBS
->LocateProtocol (
368 &gEfiPciRootBridgeIoProtocolGuid
,
370 (VOID
**) &mDebuggerPrivate
.PciRootBridgeIo
374 // locate DebugImageInfoTable
376 Status
= EfiGetSystemConfigurationTable (
377 &gEfiDebugImageInfoTableGuid
,
378 (VOID
**) &mDebuggerPrivate
.DebugImageInfoTableHeader
382 // Register Debugger Configuration Protocol, for config in shell
384 Status
= gBS
->InstallProtocolInterface (
386 &gEfiDebuggerConfigurationProtocolGuid
,
387 EFI_NATIVE_INTERFACE
,
388 &mDebuggerPrivate
.DebuggerConfiguration
393 // Create break event
395 Status
= gBS
->CreateEvent (
396 EVT_TIMER
| EVT_NOTIFY_SIGNAL
,
398 EbcDebuggerBreakEventFunc
,
400 &mDebuggerPrivate
.BreakEvent
402 if (!EFI_ERROR (Status
)) {
403 Status
= gBS
->SetTimer (
404 mDebuggerPrivate
.BreakEvent
,
406 EFI_DEBUG_BREAK_TIMER_INTERVAL
415 The hook in UnloadImage for EBC Interpreter.
416 It clean up the environment.
420 EbcDebuggerHookUnload (
426 EFI_DEBUGGER_SYMBOL_OBJECT
*Object
;
429 // Close the break event
431 if (mDebuggerPrivate
.BreakEvent
!= NULL
) {
432 gBS
->CloseEvent (mDebuggerPrivate
.BreakEvent
);
436 // Clean up the symbol
438 Object
= mDebuggerPrivate
.DebuggerSymbolContext
.Object
;
439 for (Index
= 0; Index
< EFI_DEBUGGER_SYMBOL_OBJECT_MAX
; Index
++) {
443 gBS
->FreePool (Object
[Index
].Entry
);
444 Object
[Index
].Entry
= NULL
;
445 Object
[Index
].EntryCount
= 0;
447 // Clean up source buffer
449 for (SubIndex
= 0; Object
[Index
].SourceBuffer
[SubIndex
] != NULL
; SubIndex
++) {
450 gBS
->FreePool (Object
[Index
].SourceBuffer
[SubIndex
]);
451 Object
[Index
].SourceBuffer
[SubIndex
] = NULL
;
453 gBS
->FreePool (Object
[Index
].SourceBuffer
);
454 Object
[Index
].SourceBuffer
= NULL
;
460 gBS
->FreePool (Object
);
461 mDebuggerPrivate
.DebuggerSymbolContext
.Object
= NULL
;
462 mDebuggerPrivate
.DebuggerSymbolContext
.ObjectCount
= 0;
472 The hook in EbcUnloadImage.
473 Currently do nothing here.
475 @param Handle - The EbcImage handle.
479 EbcDebuggerHookEbcUnloadImage (
488 The hook in ExecuteEbcImageEntryPoint.
489 It will record the call-stack entry. (-1 means EbcImageEntryPoint call)
490 and trigger Exception if BOE enabled.
493 @param VmPtr - pointer to VM context.
497 EbcDebuggerHookExecuteEbcImageEntryPoint (
501 EbcDebuggerPushCallstackSource ((UINT64
)(UINTN
)-1, EfiDebuggerBranchTypeEbcCall
);
502 EbcDebuggerPushCallstackParameter ((UINT64
)(UINTN
)VmPtr
->Gpr
[0], EfiDebuggerBranchTypeEbcCall
);
503 EbcDebuggerPushCallstackDest ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
504 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOE
);
510 The hook in ExecuteEbcImageEntryPoint.
511 It will record the call-stack entry. (-2 means EbcInterpret call)
512 and trigger Exception if BOT enabled.
514 @param VmPtr - pointer to VM context.
518 EbcDebuggerHookEbcInterpret (
522 EbcDebuggerPushCallstackSource ((UINT64
)(UINTN
)-2, EfiDebuggerBranchTypeEbcCall
);
523 EbcDebuggerPushCallstackParameter ((UINT64
)(UINTN
)VmPtr
->Gpr
[0], EfiDebuggerBranchTypeEbcCall
);
524 EbcDebuggerPushCallstackDest ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
525 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOT
);
531 The hook in EbcExecute, before ExecuteFunction.
532 It will trigger Exception if GoTil, StepOver, or StepOut hit.
534 @param VmPtr - pointer to VM context.
538 EbcDebuggerHookExecuteStart (
545 // Check Ip for GoTil
547 if (mDebuggerPrivate
.GoTilContext
.BreakAddress
== (UINT64
)(UINTN
)VmPtr
->Ip
) {
548 mDebuggerPrivate
.StatusFlags
= EFI_DEBUG_FLAG_EBC_GT
;
549 mDebuggerPrivate
.GoTilContext
.BreakAddress
= 0;
550 EbcDebugSignalException (
551 EXCEPT_EBC_BREAKPOINT
,
555 mDebuggerPrivate
.StatusFlags
&= ~EFI_DEBUG_FLAG_EBC_B_GT
;
559 // Check ReturnAddress for StepOver
561 if ((mDebuggerPrivate
.StepContext
.BreakAddress
== (UINT64
)(UINTN
)VmPtr
->Ip
) &&
562 (mDebuggerPrivate
.StepContext
.FramePointer
== (UINT64
)(UINTN
)VmPtr
->FramePtr
)) {
563 mDebuggerPrivate
.StatusFlags
= EFI_DEBUG_FLAG_EBC_STEPOVER
;
564 mDebuggerPrivate
.StepContext
.BreakAddress
= 0;
565 mDebuggerPrivate
.StepContext
.FramePointer
= 0;
566 EbcDebugSignalException (
567 EXCEPT_EBC_BREAKPOINT
,
571 mDebuggerPrivate
.StatusFlags
&= ~EFI_DEBUG_FLAG_EBC_B_STEPOVER
;
574 // Check FramePtr for StepOut
576 if (mDebuggerPrivate
.StepContext
.BreakAddress
== (UINT64
)(UINTN
)VmPtr
->FramePtr
) {
577 mDebuggerPrivate
.StatusFlags
= EFI_DEBUG_FLAG_EBC_STEPOUT
;
578 mDebuggerPrivate
.StepContext
.BreakAddress
= 0;
579 mDebuggerPrivate
.StepContext
.FramePointer
= 0;
580 EbcDebugSignalException (
581 EXCEPT_EBC_BREAKPOINT
,
585 mDebuggerPrivate
.StatusFlags
&= ~EFI_DEBUG_FLAG_EBC_B_STEPOUT
;
588 // Check Flags for BreakOnKey
590 if (mDebuggerPrivate
.StatusFlags
== EFI_DEBUG_FLAG_EBC_BOK
) {
592 // Only break when the current TPL <= TPL_APPLICATION
594 CurrentTpl
= gBS
->RaiseTPL (TPL_HIGH_LEVEL
);
595 gBS
->RestoreTPL (CurrentTpl
);
596 if (CurrentTpl
<= TPL_APPLICATION
) {
597 EbcDebugSignalException (
598 EXCEPT_EBC_BREAKPOINT
,
602 mDebuggerPrivate
.StatusFlags
&= ~EFI_DEBUG_FLAG_EBC_B_BOK
;
610 The hook in EbcExecute, after ExecuteFunction.
611 It will record StepOut Entry if need.
613 @param VmPtr - pointer to VM context.
617 EbcDebuggerHookExecuteEnd (
624 // Use FramePtr as checkpoint for StepOut
626 CopyMem (&Address
, (VOID
*)((UINTN
)VmPtr
->FramePtr
), sizeof(Address
));
627 EbcDebuggerPushStepEntry (Address
, (UINT64
)(UINTN
)VmPtr
->FramePtr
, EFI_DEBUG_FLAG_EBC_STEPOUT
);
634 The hook in ExecuteCALL, before move IP.
635 It will trigger Exception if BOC enabled,
636 and record Callstack, and trace information.
638 @param VmPtr - pointer to VM context.
642 EbcDebuggerHookCALLStart (
646 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOC
);
647 EbcDebuggerPushCallstackSource ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
648 EbcDebuggerPushCallstackParameter ((UINT64
)(UINTN
)VmPtr
->Gpr
[0], EfiDebuggerBranchTypeEbcCall
);
649 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
655 The hook in ExecuteCALL, after move IP.
656 It will record Callstack, trace information
657 and record StepOver/StepOut Entry if need.
659 @param VmPtr - pointer to VM context.
663 EbcDebuggerHookCALLEnd (
670 EbcDebuggerPushCallstackDest ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
671 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
676 CopyMem (&FramePtr
, (VOID
*)((UINTN
)VmPtr
->FramePtr
), sizeof(FramePtr
));
679 // Use ReturnAddress as checkpoint for StepOver
681 CopyMem (&Address
, (VOID
*)(UINTN
)VmPtr
->Gpr
[0], sizeof(Address
));
682 EbcDebuggerPushStepEntry (Address
, FramePtr
, EFI_DEBUG_FLAG_EBC_STEPOVER
);
685 // Use FramePtr as checkpoint for StepOut
688 CopyMem (&Address
, (VOID
*)(FramePtr
), sizeof(UINTN
));
689 EbcDebuggerPushStepEntry (Address
, FramePtr
, EFI_DEBUG_FLAG_EBC_STEPOUT
);
696 The hook in ExecuteCALL, before call EbcLLCALLEX.
697 It will trigger Exception if BOCX enabled,
698 and record Callstack information.
700 @param VmPtr - pointer to VM context.
704 EbcDebuggerHookCALLEXStart (
708 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOCX
);
709 // EbcDebuggerPushCallstackSource ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcCallEx);
710 // EbcDebuggerPushCallstackParameter ((UINT64)(UINTN)VmPtr->R[0], EfiDebuggerBranchTypeEbcCallEx);
711 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCallEx
);
717 The hook in ExecuteCALL, after call EbcLLCALLEX.
718 It will record trace information.
720 @param VmPtr - pointer to VM context.
724 EbcDebuggerHookCALLEXEnd (
728 // EbcDebuggerPushCallstackDest ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcCallEx);
729 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCallEx
);
735 The hook in ExecuteRET, before move IP.
736 It will trigger Exception if BOR enabled,
737 and record Callstack, and trace information.
739 @param VmPtr - pointer to VM context.
743 EbcDebuggerHookRETStart (
747 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOR
);
748 EbcDebuggerPopCallstack ();
749 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcRet
);
755 The hook in ExecuteRET, after move IP.
756 It will record trace information.
758 @param VmPtr - pointer to VM context.
762 EbcDebuggerHookRETEnd (
766 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcRet
);
772 The hook in ExecuteJMP, before move IP.
773 It will record trace information.
775 @param VmPtr - pointer to VM context.
779 EbcDebuggerHookJMPStart (
783 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcJmp
);
789 The hook in ExecuteJMP, after move IP.
790 It will record trace information.
792 @param VmPtr - pointer to VM context.
796 EbcDebuggerHookJMPEnd (
800 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcJmp
);
806 The hook in ExecuteJMP8, before move IP.
807 It will record trace information.
809 @param VmPtr - pointer to VM context.
813 EbcDebuggerHookJMP8Start (
817 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcJmp8
);
823 The hook in ExecuteJMP8, after move IP.
824 It will record trace information.
826 @param VmPtr - pointer to VM context.
830 EbcDebuggerHookJMP8End (
834 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcJmp8
);