Changeset 25528 in vbox for trunk/src/VBox/Runtime/r0drv/solaris
- Timestamp:
- Dec 20, 2009 11:24:59 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56201
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/assert-r0drv-solaris.c
r22073 r25528 42 42 #include <iprt/string.h> 43 43 44 45 /******************************************************************************* 46 * Global Variables * 47 *******************************************************************************/ 48 /** The last assert message, 1st part. */ 49 RTDATADECL(char) g_szRTAssertMsg1[1024]; 50 /** The last assert message, 2nd part. */ 51 RTDATADECL(char) g_szRTAssertMsg2[2048]; 52 /** The last assert message, expression. */ 53 RTDATADECL(const char * volatile) g_pszRTAssertExpr; 54 /** The last assert message, file name. */ 55 RTDATADECL(const char * volatile) g_pszRTAssertFile; 56 /** The last assert message, line number. */ 57 RTDATADECL(uint32_t volatile) g_u32RTAssertLine; 58 /** The last assert message, function name. */ 59 RTDATADECL(const char * volatile) g_pszRTAssertFunction; 44 #include "internal/assert.h" 60 45 61 46 62 RTDECL(void) AssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction)47 void rtR0AssertNativeMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction) 63 48 { 64 65 #ifdef IN_GUEST_R066 RTLogBackdoorPrintf("\n!!Assertion Failed!!\n"67 "Expression: %s\n"68 "Location : %s(%d) %s\n",69 pszExpr, pszFile, uLine, pszFunction);70 #endif71 72 49 uprintf("\r\n!!Assertion Failed!!\r\n" 73 50 "Expression: %s\r\n" 74 51 "Location : %s(%d) %s\r\n", 75 52 pszExpr, pszFile, uLine, pszFunction); 76 77 RTStrPrintf(g_szRTAssertMsg1, sizeof(g_szRTAssertMsg1),78 "\n!!Assertion Failed!!\n"79 "Expression: %s\n"80 "Location : %s(%d) %s\n",81 pszExpr, pszFile, uLine, pszFunction);82 ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertExpr, (void *)pszExpr);83 ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertFile, (void *)pszFile);84 ASMAtomicUoWritePtr((void * volatile *)&g_pszRTAssertFunction, (void *)pszFunction);85 ASMAtomicUoWriteU32(&g_u32RTAssertLine, uLine);86 53 } 87 54 88 55 89 RTDECL(void) AssertMsg2(const char *pszFormat, ...)56 void rtR0AssertNativeMsg2V(const char *pszFormat, va_list va) 90 57 { 91 58 va_list va; 92 59 char szMsg[256]; 93 94 #ifdef IN_GUEST_R095 va_start(va, pszFormat);96 RTLogBackdoorPrintfV(pszFormat, va);97 va_end(va);98 #endif99 60 100 61 va_start(va, pszFormat); … … 103 64 va_end(va); 104 65 uprintf("%s", szMsg); 105 106 va_start(va, pszFormat);107 RTStrPrintfV(g_szRTAssertMsg2, sizeof(g_szRTAssertMsg2), pszFormat, va);108 va_end(va);109 66 } 110 67
Note:
See TracChangeset
for help on using the changeset viewer.