2 PE/Coff Extra Action library instances, it will report image debug info.
4 Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _PE_COFF_EXTRA_ACTION_LIB_H_
16 #define _PE_COFF_EXTRA_ACTION_LIB_H_
19 #include <Library/PeCoffExtraActionLib.h>
20 #include <Library/DebugLib.h>
21 #include <Library/BaseLib.h>
22 #include <Library/IoLib.h>
23 #include <Library/PcdLib.h>
24 #include <Library/BaseMemoryLib.h>
26 #include <ImageDebugSupport.h>
28 #define DEBUG_LOAD_IMAGE_METHOD_IO_HW_BREAKPOINT 1
29 #define DEBUG_LOAD_IMAGE_METHOD_SOFT_INT3 2
31 extern UINTN AsmInterruptHandle
;
34 Read IDT entry to check if IDT entries are setup by Debug Agent.
36 @param[in] IdtDescriptor Pointer to IDT Descriptor.
38 @retval TRUE IDT entries were setup by Debug Agent.
39 @retval FALSE IDT entries were not setuo by Debug Agent.
43 CheckDebugAgentHandler (
44 IN IA32_DESCRIPTOR
*IdtDescriptor
48 Save IDT entry for INT1 and update it.
50 @param[in] IdtDescriptor Pointer to IDT Descriptor.
51 @param[out] SavedIdtEntry Original IDT entry returned.
55 SaveAndUpdateIdtEntry1 (
56 IN IA32_DESCRIPTOR
*IdtDescriptor
,
57 OUT IA32_IDT_GATE_DESCRIPTOR
*SavedIdtEntry
61 Restore IDT entry for INT1.
63 @param[in] IdtDescriptor Pointer to IDT Descriptor.
64 @param[in] RestoredIdtEntry IDT entry to be restored.
69 IN IA32_DESCRIPTOR
*IdtDescriptor
,
70 IN IA32_IDT_GATE_DESCRIPTOR
*RestoredIdtEntry