git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@410
6f19259b-4bc3-4df7-8a09-
765794883524
// The first 12 * UINT64 bytes of the string are really an\r
// arguement stack to support varargs on the Format string.\r
//\r
// The first 12 * UINT64 bytes of the string are really an\r
// arguement stack to support varargs on the Format string.\r
//\r
- DebugInfo = (EFI_DEBUG_INFO *) (Data + 1);\r
- Marker = (VA_LIST) (DebugInfo + 1);\r
- Format = (CHAR8 *) (((UINT64 *) Marker) + 12);\r
+ if (Data != NULL) {\r
+ DebugInfo = (EFI_DEBUG_INFO *) (Data + 1);\r
+ Marker = (VA_LIST) (DebugInfo + 1);\r
+ Format = (CHAR8 *) (((UINT64 *) Marker) + 12);\r
- AsciiVSPrint (PrintBuffer, BYTES_PER_RECORD, Format, Marker);\r
- printf (PrintBuffer);\r
+ AsciiVSPrint (PrintBuffer, BYTES_PER_RECORD, Format, Marker);\r
+ printf (PrintBuffer);\r
+ } else {\r
+ printf ("DEBUG <null>\n");\r
+ }\r
}\r
\r
if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) &&\r
((CodeType & EFI_STATUS_CODE_SEVERITY_MASK) == EFI_ERROR_UNRECOVERED)\r
) {\r
}\r
\r
if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) &&\r
((CodeType & EFI_STATUS_CODE_SEVERITY_MASK) == EFI_ERROR_UNRECOVERED)\r
) {\r
- if (ReportStatusCodeExtractAssertInfo (CodeType, Value, Data, &Filename, &Description, &LineNumber)) {\r
+ if (Data != NULL && ReportStatusCodeExtractAssertInfo (CodeType, Value, Data, &Filename, &Description, &LineNumber)) {\r
//\r
// Support ASSERT () macro\r
//\r
printf ("ASSERT %s(%d): %s\n", Filename, LineNumber, Description);\r
//\r
// Support ASSERT () macro\r
//\r
printf ("ASSERT %s(%d): %s\n", Filename, LineNumber, Description);\r
+ } else {\r
+ printf ("ASSERT <null>\n");\r
}\r
\r
return EFI_SUCCESS;\r
}\r
\r
return EFI_SUCCESS;\r