3 Copyright (c) 2007 - 2016, 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 CopyMem (&mDebuggerPrivate
.CallStackEntry
[Index
],
138 &mDebuggerPrivate
.CallStackEntry
[Index
+ 1],
139 sizeof (mDebuggerPrivate
.CallStackEntry
[Index
])
142 mDebuggerPrivate
.CallStackEntry
[EFI_DEBUGGER_CALLSTACK_MAX
- 1].DestAddress
= DestEntry
;
143 mDebuggerPrivate
.CallStackEntryCount
= EFI_DEBUGGER_CALLSTACK_MAX
;
151 It will throw the newest Callstack entry.
155 EbcDebuggerPopCallstack (
159 if ((mDebuggerPrivate
.CallStackEntryCount
> 0) &&
160 (mDebuggerPrivate
.CallStackEntryCount
<= EFI_DEBUGGER_CALLSTACK_MAX
)) {
162 // Throw the newest one
164 mDebuggerPrivate
.CallStackEntryCount
--;
165 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].SourceAddress
= 0;
166 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].DestAddress
= 0;
167 } else if (mDebuggerPrivate
.CallStackEntryCount
== 0) {
169 // NOT assert here because it is reasonable, because when we start to build
170 // callstack, we do not know how many function already called.
181 It will record source address for trace entry.
183 @param SourceEntry - Source address
184 @param Type - Branch type
188 EbcDebuggerPushTraceSourceEntry (
189 IN UINT64 SourceEntry
,
190 IN EFI_DEBUGGER_BRANCH_TYPE Type
193 if (mDebuggerPrivate
.TraceEntryCount
> EFI_DEBUGGER_TRACE_MAX
) {
195 mDebuggerPrivate
.TraceEntryCount
= EFI_DEBUGGER_TRACE_MAX
;
198 // Record the new trace entry
200 mDebuggerPrivate
.TraceEntry
[mDebuggerPrivate
.TraceEntryCount
].SourceAddress
= SourceEntry
;
201 mDebuggerPrivate
.TraceEntry
[mDebuggerPrivate
.TraceEntryCount
].Type
= Type
;
204 // Do not change TraceEntryCount
212 It will record destination address for trace entry.
214 @param DestEntry - Destination address
215 @param Type - Branch type
219 EbcDebuggerPushTraceDestEntry (
221 IN EFI_DEBUGGER_BRANCH_TYPE Type
226 if (mDebuggerPrivate
.TraceEntryCount
< EFI_DEBUGGER_TRACE_MAX
) {
228 // If there is empty entry for trace, add it
230 ASSERT (mDebuggerPrivate
.TraceEntry
[mDebuggerPrivate
.TraceEntryCount
].Type
== Type
);
231 mDebuggerPrivate
.TraceEntry
[mDebuggerPrivate
.TraceEntryCount
].DestAddress
= DestEntry
;
232 mDebuggerPrivate
.TraceEntryCount
++;
235 // If there is no empty entry for trace, throw the oldest one
237 ASSERT (mDebuggerPrivate
.TraceEntry
[EFI_DEBUGGER_TRACE_MAX
].Type
== Type
);
238 for (Index
= 0; Index
< EFI_DEBUGGER_TRACE_MAX
; Index
++) {
239 mDebuggerPrivate
.TraceEntry
[Index
] = mDebuggerPrivate
.TraceEntry
[Index
+ 1];
241 mDebuggerPrivate
.TraceEntry
[EFI_DEBUGGER_CALLSTACK_MAX
- 1].DestAddress
= DestEntry
;
242 mDebuggerPrivate
.TraceEntryCount
= EFI_DEBUGGER_TRACE_MAX
;
250 It will record address for StepEntry, if STEPOVER or STEPOUT is enabled.
252 @param Entry - Break Address
253 @param FramePtr - Break Frame pointer
254 @param Flag - for STEPOVER or STEPOUT
258 EbcDebuggerPushStepEntry (
267 if ((Flag
== EFI_DEBUG_FLAG_EBC_STEPOVER
) &&
268 ((mDebuggerPrivate
.FeatureFlags
& EFI_DEBUG_FLAG_EBC_STEPOVER
) == EFI_DEBUG_FLAG_EBC_STEPOVER
)) {
269 mDebuggerPrivate
.StepContext
.BreakAddress
= Entry
;
270 mDebuggerPrivate
.StepContext
.FramePointer
= FramePtr
;
271 mDebuggerPrivate
.FeatureFlags
&= ~EFI_DEBUG_FLAG_EBC_B_STEPOVER
;
276 if ((Flag
== EFI_DEBUG_FLAG_EBC_STEPOUT
) &&
277 ((mDebuggerPrivate
.FeatureFlags
& EFI_DEBUG_FLAG_EBC_STEPOUT
) == EFI_DEBUG_FLAG_EBC_STEPOUT
)) {
278 mDebuggerPrivate
.StepContext
.BreakAddress
= Entry
;
279 mDebuggerPrivate
.StepContext
.FramePointer
= FramePtr
;
280 mDebuggerPrivate
.FeatureFlags
&= ~EFI_DEBUG_FLAG_EBC_B_STEPOUT
;
286 Notify the callback function when an event is triggered.
288 @param Event Indicates the event that invoke this function.
289 @param Context Indicates the calling context.
294 EbcDebuggerBreakEventFunc (
301 if ((mDebuggerPrivate
.FeatureFlags
& EFI_DEBUG_FLAG_EBC_BOK
) != EFI_DEBUG_FLAG_EBC_BOK
) {
305 Status
= gBS
->CheckEvent (gST
->ConIn
->WaitForKey
);
306 if (Status
== EFI_SUCCESS
) {
307 mDebuggerPrivate
.StatusFlags
= EFI_DEBUG_FLAG_EBC_BOK
;
313 The hook in InitializeEbcDriver.
314 It will init the EbcDebuggerPrivate data structure.
316 @param Handle - The EbcDebugProtocol handle.
317 @param EbcDebugProtocol - The EbcDebugProtocol interface.
321 EbcDebuggerHookInit (
322 IN EFI_HANDLE Handle
,
323 IN EFI_DEBUG_SUPPORT_PROTOCOL
*EbcDebugProtocol
328 EFI_DEBUGGER_SYMBOL_OBJECT
*Object
;
329 EFI_DEBUGGER_SYMBOL_ENTRY
*Entry
;
333 // Register all exception handler
335 for (Index
= EXCEPT_EBC_UNDEFINED
; Index
<= EXCEPT_EBC_STEP
; Index
++) {
336 EbcDebugProtocol
->RegisterExceptionCallback (
342 EbcDebugProtocol
->RegisterExceptionCallback (
353 Object
= AllocateZeroPool (sizeof(EFI_DEBUGGER_SYMBOL_OBJECT
) * EFI_DEBUGGER_SYMBOL_OBJECT_MAX
);
354 ASSERT (Object
!= NULL
);
355 mDebuggerPrivate
.DebuggerSymbolContext
.Object
= Object
;
356 mDebuggerPrivate
.DebuggerSymbolContext
.ObjectCount
= 0;
357 mDebuggerPrivate
.DebuggerSymbolContext
.MaxObjectCount
= EFI_DEBUGGER_SYMBOL_OBJECT_MAX
;
358 for (Index
= 0; Index
< EFI_DEBUGGER_SYMBOL_OBJECT_MAX
; Index
++) {
359 Entry
= AllocateZeroPool (sizeof(EFI_DEBUGGER_SYMBOL_ENTRY
) * EFI_DEBUGGER_SYMBOL_ENTRY_MAX
);
360 ASSERT (Entry
!= NULL
);
361 Object
[Index
].Entry
= Entry
;
362 Object
[Index
].MaxEntryCount
= EFI_DEBUGGER_SYMBOL_ENTRY_MAX
;
363 Object
[Index
].SourceBuffer
= AllocateZeroPool (sizeof(VOID
*) * (EFI_DEBUGGER_SYMBOL_ENTRY_MAX
+ 1));
364 ASSERT (Object
[Index
].SourceBuffer
!= NULL
);
368 // locate PciRootBridgeIo
370 Status
= gBS
->LocateProtocol (
371 &gEfiPciRootBridgeIoProtocolGuid
,
373 (VOID
**) &mDebuggerPrivate
.PciRootBridgeIo
377 // locate DebugImageInfoTable
379 Status
= EfiGetSystemConfigurationTable (
380 &gEfiDebugImageInfoTableGuid
,
381 (VOID
**) &mDebuggerPrivate
.DebugImageInfoTableHeader
385 // Register Debugger Configuration Protocol, for config in shell
387 Status
= gBS
->InstallProtocolInterface (
389 &gEfiDebuggerConfigurationProtocolGuid
,
390 EFI_NATIVE_INTERFACE
,
391 &mDebuggerPrivate
.DebuggerConfiguration
396 // Create break event
398 Status
= gBS
->CreateEvent (
399 EVT_TIMER
| EVT_NOTIFY_SIGNAL
,
401 EbcDebuggerBreakEventFunc
,
403 &mDebuggerPrivate
.BreakEvent
405 if (!EFI_ERROR (Status
)) {
406 Status
= gBS
->SetTimer (
407 mDebuggerPrivate
.BreakEvent
,
409 EFI_DEBUG_BREAK_TIMER_INTERVAL
418 The hook in UnloadImage for EBC Interpreter.
419 It clean up the environment.
423 EbcDebuggerHookUnload (
429 EFI_DEBUGGER_SYMBOL_OBJECT
*Object
;
432 // Close the break event
434 if (mDebuggerPrivate
.BreakEvent
!= NULL
) {
435 gBS
->CloseEvent (mDebuggerPrivate
.BreakEvent
);
439 // Clean up the symbol
441 Object
= mDebuggerPrivate
.DebuggerSymbolContext
.Object
;
442 for (Index
= 0; Index
< EFI_DEBUGGER_SYMBOL_OBJECT_MAX
; Index
++) {
446 gBS
->FreePool (Object
[Index
].Entry
);
447 Object
[Index
].Entry
= NULL
;
448 Object
[Index
].EntryCount
= 0;
450 // Clean up source buffer
452 for (SubIndex
= 0; Object
[Index
].SourceBuffer
[SubIndex
] != NULL
; SubIndex
++) {
453 gBS
->FreePool (Object
[Index
].SourceBuffer
[SubIndex
]);
454 Object
[Index
].SourceBuffer
[SubIndex
] = NULL
;
456 gBS
->FreePool (Object
[Index
].SourceBuffer
);
457 Object
[Index
].SourceBuffer
= NULL
;
463 gBS
->FreePool (Object
);
464 mDebuggerPrivate
.DebuggerSymbolContext
.Object
= NULL
;
465 mDebuggerPrivate
.DebuggerSymbolContext
.ObjectCount
= 0;
475 The hook in EbcUnloadImage.
476 Currently do nothing here.
478 @param Handle - The EbcImage handle.
482 EbcDebuggerHookEbcUnloadImage (
491 The hook in ExecuteEbcImageEntryPoint.
492 It will record the call-stack entry. (-1 means EbcImageEntryPoint call)
493 and trigger Exception if BOE enabled.
496 @param VmPtr - pointer to VM context.
500 EbcDebuggerHookExecuteEbcImageEntryPoint (
504 EbcDebuggerPushCallstackSource ((UINT64
)(UINTN
)-1, EfiDebuggerBranchTypeEbcCall
);
505 EbcDebuggerPushCallstackParameter ((UINT64
)(UINTN
)VmPtr
->Gpr
[0], EfiDebuggerBranchTypeEbcCall
);
506 EbcDebuggerPushCallstackDest ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
507 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOE
);
513 The hook in ExecuteEbcImageEntryPoint.
514 It will record the call-stack entry. (-2 means EbcInterpret call)
515 and trigger Exception if BOT enabled.
517 @param VmPtr - pointer to VM context.
521 EbcDebuggerHookEbcInterpret (
525 EbcDebuggerPushCallstackSource ((UINT64
)(UINTN
)-2, EfiDebuggerBranchTypeEbcCall
);
526 EbcDebuggerPushCallstackParameter ((UINT64
)(UINTN
)VmPtr
->Gpr
[0], EfiDebuggerBranchTypeEbcCall
);
527 EbcDebuggerPushCallstackDest ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
528 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOT
);
534 The hook in EbcExecute, before ExecuteFunction.
535 It will trigger Exception if GoTil, StepOver, or StepOut hit.
537 @param VmPtr - pointer to VM context.
541 EbcDebuggerHookExecuteStart (
548 // Check Ip for GoTil
550 if (mDebuggerPrivate
.GoTilContext
.BreakAddress
== (UINT64
)(UINTN
)VmPtr
->Ip
) {
551 mDebuggerPrivate
.StatusFlags
= EFI_DEBUG_FLAG_EBC_GT
;
552 mDebuggerPrivate
.GoTilContext
.BreakAddress
= 0;
553 EbcDebugSignalException (
554 EXCEPT_EBC_BREAKPOINT
,
558 mDebuggerPrivate
.StatusFlags
&= ~EFI_DEBUG_FLAG_EBC_B_GT
;
562 // Check ReturnAddress for StepOver
564 if ((mDebuggerPrivate
.StepContext
.BreakAddress
== (UINT64
)(UINTN
)VmPtr
->Ip
) &&
565 (mDebuggerPrivate
.StepContext
.FramePointer
== (UINT64
)(UINTN
)VmPtr
->FramePtr
)) {
566 mDebuggerPrivate
.StatusFlags
= EFI_DEBUG_FLAG_EBC_STEPOVER
;
567 mDebuggerPrivate
.StepContext
.BreakAddress
= 0;
568 mDebuggerPrivate
.StepContext
.FramePointer
= 0;
569 EbcDebugSignalException (
570 EXCEPT_EBC_BREAKPOINT
,
574 mDebuggerPrivate
.StatusFlags
&= ~EFI_DEBUG_FLAG_EBC_B_STEPOVER
;
577 // Check FramePtr for StepOut
579 if (mDebuggerPrivate
.StepContext
.BreakAddress
== (UINT64
)(UINTN
)VmPtr
->FramePtr
) {
580 mDebuggerPrivate
.StatusFlags
= EFI_DEBUG_FLAG_EBC_STEPOUT
;
581 mDebuggerPrivate
.StepContext
.BreakAddress
= 0;
582 mDebuggerPrivate
.StepContext
.FramePointer
= 0;
583 EbcDebugSignalException (
584 EXCEPT_EBC_BREAKPOINT
,
588 mDebuggerPrivate
.StatusFlags
&= ~EFI_DEBUG_FLAG_EBC_B_STEPOUT
;
591 // Check Flags for BreakOnKey
593 if (mDebuggerPrivate
.StatusFlags
== EFI_DEBUG_FLAG_EBC_BOK
) {
595 // Only break when the current TPL <= TPL_APPLICATION
597 CurrentTpl
= gBS
->RaiseTPL (TPL_HIGH_LEVEL
);
598 gBS
->RestoreTPL (CurrentTpl
);
599 if (CurrentTpl
<= TPL_APPLICATION
) {
600 EbcDebugSignalException (
601 EXCEPT_EBC_BREAKPOINT
,
605 mDebuggerPrivate
.StatusFlags
&= ~EFI_DEBUG_FLAG_EBC_B_BOK
;
613 The hook in EbcExecute, after ExecuteFunction.
614 It will record StepOut Entry if need.
616 @param VmPtr - pointer to VM context.
620 EbcDebuggerHookExecuteEnd (
627 // Use FramePtr as checkpoint for StepOut
629 CopyMem (&Address
, (VOID
*)((UINTN
)VmPtr
->FramePtr
), sizeof(Address
));
630 EbcDebuggerPushStepEntry (Address
, (UINT64
)(UINTN
)VmPtr
->FramePtr
, EFI_DEBUG_FLAG_EBC_STEPOUT
);
637 The hook in ExecuteCALL, before move IP.
638 It will trigger Exception if BOC enabled,
639 and record Callstack, and trace information.
641 @param VmPtr - pointer to VM context.
645 EbcDebuggerHookCALLStart (
649 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOC
);
650 EbcDebuggerPushCallstackSource ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
651 EbcDebuggerPushCallstackParameter ((UINT64
)(UINTN
)VmPtr
->Gpr
[0], EfiDebuggerBranchTypeEbcCall
);
652 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
658 The hook in ExecuteCALL, after move IP.
659 It will record Callstack, trace information
660 and record StepOver/StepOut Entry if need.
662 @param VmPtr - pointer to VM context.
666 EbcDebuggerHookCALLEnd (
673 EbcDebuggerPushCallstackDest ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
674 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
679 CopyMem (&FramePtr
, (VOID
*)((UINTN
)VmPtr
->FramePtr
), sizeof(FramePtr
));
682 // Use ReturnAddress as checkpoint for StepOver
684 CopyMem (&Address
, (VOID
*)(UINTN
)VmPtr
->Gpr
[0], sizeof(Address
));
685 EbcDebuggerPushStepEntry (Address
, FramePtr
, EFI_DEBUG_FLAG_EBC_STEPOVER
);
688 // Use FramePtr as checkpoint for StepOut
691 CopyMem (&Address
, (VOID
*)(FramePtr
), sizeof(UINTN
));
692 EbcDebuggerPushStepEntry (Address
, FramePtr
, EFI_DEBUG_FLAG_EBC_STEPOUT
);
699 The hook in ExecuteCALL, before call EbcLLCALLEX.
700 It will trigger Exception if BOCX enabled,
701 and record Callstack information.
703 @param VmPtr - pointer to VM context.
707 EbcDebuggerHookCALLEXStart (
711 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOCX
);
712 // EbcDebuggerPushCallstackSource ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcCallEx);
713 // EbcDebuggerPushCallstackParameter ((UINT64)(UINTN)VmPtr->R[0], EfiDebuggerBranchTypeEbcCallEx);
714 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCallEx
);
720 The hook in ExecuteCALL, after call EbcLLCALLEX.
721 It will record trace information.
723 @param VmPtr - pointer to VM context.
727 EbcDebuggerHookCALLEXEnd (
731 // EbcDebuggerPushCallstackDest ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcCallEx);
732 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCallEx
);
738 The hook in ExecuteRET, before move IP.
739 It will trigger Exception if BOR enabled,
740 and record Callstack, and trace information.
742 @param VmPtr - pointer to VM context.
746 EbcDebuggerHookRETStart (
750 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOR
);
751 EbcDebuggerPopCallstack ();
752 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcRet
);
758 The hook in ExecuteRET, after move IP.
759 It will record trace information.
761 @param VmPtr - pointer to VM context.
765 EbcDebuggerHookRETEnd (
769 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcRet
);
775 The hook in ExecuteJMP, before move IP.
776 It will record trace information.
778 @param VmPtr - pointer to VM context.
782 EbcDebuggerHookJMPStart (
786 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcJmp
);
792 The hook in ExecuteJMP, after move IP.
793 It will record trace information.
795 @param VmPtr - pointer to VM context.
799 EbcDebuggerHookJMPEnd (
803 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcJmp
);
809 The hook in ExecuteJMP8, before move IP.
810 It will record trace information.
812 @param VmPtr - pointer to VM context.
816 EbcDebuggerHookJMP8Start (
820 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcJmp8
);
826 The hook in ExecuteJMP8, after move IP.
827 It will record trace information.
829 @param VmPtr - pointer to VM context.
833 EbcDebuggerHookJMP8End (
837 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcJmp8
);