MdeModulePkg: Change complex DEBUG_CODE() to DEBUG_CODE_BEGIN/END()
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3767 Update use of DEBUG_CODE(Expression) if Expression is a complex code block with if/while/for/case statements that use {}. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
4a9d411662
commit
db52c7f755
@@ -38,7 +38,7 @@ SetIdtEntry (
|
||||
Status = InitializeCpuExceptionHandlers (NULL);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
//
|
||||
// Update IDT entry INT3 if the instruction is valid in it
|
||||
//
|
||||
@@ -51,6 +51,5 @@ SetIdtEntry (
|
||||
IdtEntry->Bits.GateType = IA32_IDT_GATE_TYPE_INTERRUPT_32;
|
||||
IdtEntry->Bits.OffsetHigh = (UINT16)(S3DebugBuffer >> 16);
|
||||
}
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
}
|
||||
|
||||
|
@@ -149,7 +149,7 @@ SetIdtEntry (
|
||||
Status = InitializeCpuExceptionHandlers (NULL);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
//
|
||||
// Update IDT entry INT3 if the instruction is valid in it
|
||||
//
|
||||
@@ -164,7 +164,7 @@ SetIdtEntry (
|
||||
IdtEntry->Bits.OffsetUpper = (UINT32)(S3DebugBuffer >> 32);
|
||||
IdtEntry->Bits.Reserved_1 = 0;
|
||||
}
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
//
|
||||
// If both BIOS and OS wants long mode waking vector,
|
||||
|
@@ -941,7 +941,7 @@ BdsEntry (
|
||||
OsIndication = 0;
|
||||
}
|
||||
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
EFI_BOOT_MANAGER_LOAD_OPTION_TYPE LoadOptionType;
|
||||
DEBUG ((DEBUG_INFO, "[Bds]OsIndication: %016x\n", OsIndication));
|
||||
DEBUG ((DEBUG_INFO, "[Bds]=============Begin Load Options Dumping ...=============\n"));
|
||||
@@ -963,7 +963,7 @@ BdsEntry (
|
||||
EfiBootManagerFreeLoadOptions (LoadOptions, LoadOptionCount);
|
||||
}
|
||||
DEBUG ((DEBUG_INFO, "[Bds]=============End Load Options Dumping=============\n"));
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
//
|
||||
// BootManagerMenu doesn't contain the correct information when return status is EFI_NOT_FOUND.
|
||||
|
@@ -282,7 +282,7 @@ InitializeCapsuleOnDiskLoad (
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
VOID *CapsuleOnDiskModePpi;
|
||||
|
||||
if (!IsCapsuleOnDiskMode()){
|
||||
@@ -302,7 +302,7 @@ InitializeCapsuleOnDiskLoad (
|
||||
DEBUG((DEBUG_ERROR, "Locate CapsuleOnDiskModePpi error %x\n", Status));
|
||||
return Status;
|
||||
}
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
Status = PeiServicesInstallPpi (&mCapsuleOnDiskPpiList);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
@@ -335,12 +335,12 @@ InitializeGraphicsConsoleTextMode (
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
for (Index = 0; Index < ValidCount; Index++) {
|
||||
DEBUG ((DEBUG_INFO, "Graphics - Mode %d, Column = %d, Row = %d\n",
|
||||
Index, NewModeBuffer[Index].Columns, NewModeBuffer[Index].Rows));
|
||||
}
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
//
|
||||
// Return valid mode count and mode information buffer.
|
||||
|
@@ -327,13 +327,13 @@ InitializeTerminalConsoleTextMode (
|
||||
}
|
||||
*TextModeCount = ARRAY_SIZE (mTerminalConsoleModeData);
|
||||
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
INT32 Index;
|
||||
for (Index = 0; Index < *TextModeCount; Index++) {
|
||||
DEBUG ((DEBUG_INFO, "Terminal - Mode %d, Column = %d, Row = %d\n",
|
||||
Index, TextModeData[Index].Columns, TextModeData[Index].Rows));
|
||||
}
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
return TextModeData;
|
||||
}
|
||||
|
||||
@@ -1380,4 +1380,3 @@ IsHotPlugDevice (
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@@ -330,7 +330,7 @@ Defer3rdPartyImageLoad (
|
||||
|
||||
ImageInfo = LookupImage (File, BootPolicy);
|
||||
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
CHAR16 *DevicePathStr;
|
||||
DevicePathStr = ConvertDevicePathToText (File, FALSE, FALSE);
|
||||
DEBUG ((
|
||||
@@ -342,7 +342,7 @@ Defer3rdPartyImageLoad (
|
||||
if (DevicePathStr != NULL) {
|
||||
FreePool (DevicePathStr);
|
||||
}
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
if (mEndOfDxe) {
|
||||
mImageLoadedAfterEndOfDxe = TRUE;
|
||||
|
@@ -512,7 +512,7 @@ GetHobVariableStore (
|
||||
//
|
||||
// Make sure there is no more than one Variable HOB.
|
||||
//
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
GuidHob = GetFirstGuidHob (&gEfiAuthenticatedVariableGuid);
|
||||
if (GuidHob != NULL) {
|
||||
if ((GetNextGuidHob (&gEfiAuthenticatedVariableGuid, GET_NEXT_HOB (GuidHob)) != NULL)) {
|
||||
@@ -531,7 +531,7 @@ GetHobVariableStore (
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
GuidHob = GetFirstGuidHob (&gEfiAuthenticatedVariableGuid);
|
||||
if (GuidHob != NULL) {
|
||||
|
@@ -280,7 +280,7 @@ RecordVarErrorFlag (
|
||||
VAR_ERROR_FLAG *VarErrFlag;
|
||||
VAR_ERROR_FLAG TempFlag;
|
||||
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
DEBUG ((DEBUG_ERROR, "RecordVarErrorFlag (0x%02x) %s:%g - 0x%08x - 0x%x\n", Flag, VariableName, VendorGuid, Attributes, VariableSize));
|
||||
if (Flag == VAR_ERROR_FLAG_SYSTEM_ERROR) {
|
||||
if (AtRuntime ()) {
|
||||
@@ -291,7 +291,7 @@ RecordVarErrorFlag (
|
||||
} else {
|
||||
DEBUG ((DEBUG_ERROR, "CommonMaxUserVariableSpace = 0x%x - CommonUserVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonMaxUserVariableSpace, mVariableModuleGlobal->CommonUserVariableTotalSize));
|
||||
}
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
if (!mEndOfDxe) {
|
||||
//
|
||||
@@ -3498,7 +3498,7 @@ GetHobVariableStore (
|
||||
//
|
||||
// Make sure there is no more than one Variable HOB.
|
||||
//
|
||||
DEBUG_CODE (
|
||||
DEBUG_CODE_BEGIN ();
|
||||
GuidHob = GetFirstGuidHob (&gEfiAuthenticatedVariableGuid);
|
||||
if (GuidHob != NULL) {
|
||||
if ((GetNextGuidHob (&gEfiAuthenticatedVariableGuid, GET_NEXT_HOB (GuidHob)) != NULL)) {
|
||||
@@ -3517,7 +3517,7 @@ GetHobVariableStore (
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
//
|
||||
// Combinations supported:
|
||||
|
Reference in New Issue
Block a user