If the assert happens in a library, then it's hard to determine which
module using that library is generating that assert. Use gEfiCallerBaseName
in DebugAssert to display the module name.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Baraneedharan Anbazhagan <anbazhagan@hp.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19127
6f19259b-4bc3-4df7-8a09-
765794883524
//\r
// Generate the ASSERT() message in Ascii format\r
//\r
- AsciiSPrint (Buffer, sizeof (Buffer), "ASSERT %a(%d): %a\n", FileName, LineNumber, Description);\r
+ AsciiSPrint (Buffer, sizeof (Buffer), "ASSERT [%a] %a(%d): %a\n", gEfiCallerBaseName, FileName, LineNumber, Description);\r
\r
//\r
// Send the print string to the Console Output device\r
UnicodeSPrintAsciiFormat (\r
Buffer, \r
sizeof (Buffer), \r
- "ASSERT %a(%d): %a\n", \r
+ "ASSERT [%a] %a(%d): %a\n",\r
+ gEfiCallerBaseName,\r
FileName, \r
LineNumber, \r
Description\r
AsciiSPrint (\r
Buffer, \r
sizeof (Buffer), \r
- "ASSERT %a(%d): %a\n", \r
+ "ASSERT [%a] %a(%d): %a\n",\r
+ gEfiCallerBaseName,\r
FileName, \r
LineNumber, \r
Description\r
UnicodeSPrintAsciiFormat (\r
Buffer, \r
sizeof (Buffer),\r
- "ASSERT %a(%d): %a\n", \r
+ "ASSERT [%a] %a(%d): %a\n",\r
+ gEfiCallerBaseName,\r
FileName, \r
LineNumber, \r
Description\r