mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-24 02:07:44 +02:00
MdePkg: Moved DEBUG_RAISE() to DebugLib.h.
This commit is contained in:
parent
526c4b13ab
commit
8a6da01b9b
@ -885,21 +885,6 @@ STATIC_ASSERT (ALIGNOF (__VERIFY_UINT32_ENUM_SIZE) == sizeof (__VERIFY_UINT32_EN
|
|||||||
**/
|
**/
|
||||||
#define BASE_CR(Record, TYPE, Field) ((TYPE *) ((CHAR8 *) (Record) - OFFSET_OF (TYPE, Field)))
|
#define BASE_CR(Record, TYPE, Field) ((TYPE *) ((CHAR8 *) (Record) - OFFSET_OF (TYPE, Field)))
|
||||||
|
|
||||||
#define DEBUG_RAISE() \
|
|
||||||
do { \
|
|
||||||
if ((PcdGet8 (PcdDebugRaisePropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0) { \
|
|
||||||
DEBUG ((DEBUG_WARN, "DEBUG RAISE: Constraint violation in %a:%a:%u\n", __FILE__, __func__, __LINE__));\
|
|
||||||
} \
|
|
||||||
\
|
|
||||||
if ((PcdGet8 (PcdDebugRaisePropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0) { \
|
|
||||||
ASSERT (FALSE); \
|
|
||||||
} \
|
|
||||||
\
|
|
||||||
if ((PcdGet8 (PcdDebugRaisePropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { \
|
|
||||||
CpuBreakpoint (); \
|
|
||||||
} \
|
|
||||||
} while (FALSE)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Checks whether a value is a power of two.
|
Checks whether a value is a power of two.
|
||||||
|
|
||||||
|
@ -608,6 +608,21 @@ UnitTestDebugAssert (
|
|||||||
} \
|
} \
|
||||||
} while (FALSE)
|
} while (FALSE)
|
||||||
|
|
||||||
|
#define DEBUG_RAISE() \
|
||||||
|
do { \
|
||||||
|
if ((PcdGet8 (PcdDebugRaisePropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0) { \
|
||||||
|
DEBUG ((DEBUG_WARN, "DEBUG RAISE: Constraint violation in %a:%a:%u\n", __FILE__, __func__, __LINE__));\
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
if ((PcdGet8 (PcdDebugRaisePropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0) { \
|
||||||
|
ASSERT (FALSE); \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
if ((PcdGet8 (PcdDebugRaisePropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { \
|
||||||
|
CpuBreakpoint (); \
|
||||||
|
} \
|
||||||
|
} while (FALSE)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Macro that calls DebugAssert() if the containing record does not have a
|
Macro that calls DebugAssert() if the containing record does not have a
|
||||||
matching signature. If the signatures matches, then a pointer to the data
|
matching signature. If the signatures matches, then a pointer to the data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user