X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=SourceLevelDebugPkg%2FLibrary%2FPeCoffExtraActionLibDebug%2FPeCoffExtraActionLib.c;h=9bf76bfb2219fa294ac0f50522c4c330d89a15d6;hp=c28d7930a30afd3aa662133222f17e8327c946a4;hb=8cc26df4a60ec3a3b7f9d58ccefc12a1a5b6e199;hpb=e41aad152135f27ae1da142454af85a6597719ee diff --git a/SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLib.c b/SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLib.c index c28d7930a3..9bf76bfb22 100644 --- a/SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLib.c +++ b/SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLib.c @@ -80,18 +80,21 @@ PeCoffLoaderExtraActionCommon ( IdtEntryHooked = FALSE; LoadImageMethod = PcdGet8 (PcdDebugLoadImageMethod); AsmReadIdtr (&IdtDescriptor); - if (!CheckDebugAgentHandler (&IdtDescriptor)) { - if (LoadImageMethod == DEBUG_LOAD_IMAGE_METHOD_SOFT_INT3) { + if (LoadImageMethod == DEBUG_LOAD_IMAGE_METHOD_SOFT_INT3) { + if (!CheckDebugAgentHandler (&IdtDescriptor, SOFT_INT_VECTOR_NUM)) { // // Do not trigger INT3 if Debug Agent did not setup IDT entries. // return; } - // - // Save and update IDT entry for INT1 - // - SaveAndUpdateIdtEntry1 (&IdtDescriptor, &OriginalIdtEntry); - IdtEntryHooked = TRUE; + } else { + if (!CheckDebugAgentHandler (&IdtDescriptor, IO_HW_BREAKPOINT_VECTOR_NUM)) { + // + // Save and update IDT entry for INT1 + // + SaveAndUpdateIdtEntry1 (&IdtDescriptor, &OriginalIdtEntry); + IdtEntryHooked = TRUE; + } } //