19.4.1 Debug Message Output
One typical debug technique is to output debug messages. The EDK II library
DebugLib
provides the DEBUG()
and ASSERT()
macros to output debug
messages (see Chapter 31 of this guide for details on the usage of the
DEBUG()
and ASSERT()
macros). Messages may be sent at the entry point and
exit point of functions. When this is done, a log of the call stack is produced
that may help locate the source of the error. It is not suggested to print the
debug message in a frequently called function, such as a timer handler because
this can starve execution cycles at lower TPLs and can significant change the
behavior of the drivers under debug.