VirtualBox

Changeset 14500 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Nov 24, 2008 2:22:08 AM (16 years ago)
Author:
vboxsync
Message:

IPRT/SUPDrv/VMM: Made RTR0AssertPanicSystem available to VMMR0.r0 on darwin & solaris (only platforms implemting it currently). Created RTAssertMsg1, RTAssertMsg2 and RTAssertMsg2V (darwin only atm) in addition to AssertMsg1/2 and delcared the latter two as weak and overridable by users, while the former are strong and exposed by SUPDrv. This way we can get the full assertion text in the 'Problem Report for Mac OS X Kernel' thing. Will propagte the changes to the other platforms and rings later.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r14499 r14500  
    11781178DECLEXPORT(void) RTCALL AssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction)
    11791179{
    1180 #ifndef DEBUG_sandervl
     1180#if !defined(DEBUG_sandervl) && !defined(RT_OS_DARWIN)
    11811181    SUPR0Printf("\n!!R0-Assertion Failed!!\n"
    11821182                "Expression: %s\n"
     
    11961196                    "Location  : %s(%d) %s\n",
    11971197                    pszExpr, pszFile, uLine, pszFunction);
     1198#ifdef RT_OS_DARWIN
     1199    RTAssertMsg1(pszExpr, uLine, pszFile, pszFunction);
     1200#endif
    11981201}
    11991202
     
    12071210    for (size_t i = 0; i < cbChars; i++)
    12081211    {
    1209 #ifndef DEBUG_sandervl
     1212#if !defined(DEBUG_sandervl) && !defined(RT_OS_DARWIN)
    12101213        SUPR0Printf("%c", pachChars[i]);
    12111214#endif
     
    12191222DECLEXPORT(void) RTCALL AssertMsg2(const char *pszFormat, ...)
    12201223{
     1224    va_list va;
     1225
    12211226    PRTLOGGER pLog = RTLogDefaultInstance(); /** @todo we want this for release as well! */
    12221227    if (pLog)
    12231228    {
    1224         va_list va;
    12251229        va_start(va, pszFormat);
    12261230        RTLogFormatV(rtLogOutput, pLog, pszFormat, va);
     
    12351239        }
    12361240    }
    1237 }
    1238 
     1241
     1242#ifdef RT_OS_DARWIN
     1243    va_start(va, pszFormat);
     1244    RTAssertMsg2V(pszFormat, va);
     1245    va_end(va);
     1246#endif
     1247}
     1248
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette