Revision: 19127
http://sourceforge.net/p/edk2/code/19127
Author: lgao4
Date: 2015-12-07 03:06:02 +0000 (Mon, 07 Dec 2015)
Log Message:
-----------
MdePkg: DebugAssert enhancement
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 <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c
trunk/edk2/MdePkg/Library/UefiDebugLibConOut/DebugLib.c
trunk/edk2/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c
trunk/edk2/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
Modified: trunk/edk2/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c
===================================================================
--- trunk/edk2/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c 2015-12-07
02:21:29 UTC (rev 19126)
+++ trunk/edk2/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c 2015-12-07
03:06:02 UTC (rev 19127)
@@ -133,7 +133,7 @@
//
// Generate the ASSERT() message in Ascii format
//
- AsciiSPrint (Buffer, sizeof (Buffer), "ASSERT %a(%d): %a\n", FileName,
LineNumber, Description);
+ AsciiSPrint (Buffer, sizeof (Buffer), "ASSERT [%a] %a(%d): %a\n",
gEfiCallerBaseName, FileName, LineNumber, Description);
//
// Send the print string to the Console Output device
Modified: trunk/edk2/MdePkg/Library/UefiDebugLibConOut/DebugLib.c
===================================================================
--- trunk/edk2/MdePkg/Library/UefiDebugLibConOut/DebugLib.c 2015-12-07
02:21:29 UTC (rev 19126)
+++ trunk/edk2/MdePkg/Library/UefiDebugLibConOut/DebugLib.c 2015-12-07
03:06:02 UTC (rev 19127)
@@ -121,7 +121,8 @@
UnicodeSPrintAsciiFormat (
Buffer,
sizeof (Buffer),
- "ASSERT %a(%d): %a\n",
+ "ASSERT [%a] %a(%d): %a\n",
+ gEfiCallerBaseName,
FileName,
LineNumber,
Description
Modified: trunk/edk2/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c
===================================================================
--- trunk/edk2/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c
2015-12-07 02:21:29 UTC (rev 19126)
+++ trunk/edk2/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c
2015-12-07 03:06:02 UTC (rev 19127)
@@ -175,7 +175,8 @@
AsciiSPrint (
Buffer,
sizeof (Buffer),
- "ASSERT %a(%d): %a\n",
+ "ASSERT [%a] %a(%d): %a\n",
+ gEfiCallerBaseName,
FileName,
LineNumber,
Description
Modified: trunk/edk2/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
===================================================================
--- trunk/edk2/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c 2015-12-07
02:21:29 UTC (rev 19126)
+++ trunk/edk2/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c 2015-12-07
03:06:02 UTC (rev 19127)
@@ -122,7 +122,8 @@
UnicodeSPrintAsciiFormat (
Buffer,
sizeof (Buffer),
- "ASSERT %a(%d): %a\n",
+ "ASSERT [%a] %a(%d): %a\n",
+ gEfiCallerBaseName,
FileName,
LineNumber,
Description
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits