VirtualBox

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/Runtime/r0drv/darwin/assert-r0drv-darwin.cpp

    r13314 r14500  
    5959
    6060
    61 RTDECL(void) AssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction)
     61RTDECL(void) RTAssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction)
    6262{
    6363#ifdef IN_GUEST_R0
     
    8585
    8686
    87 RTDECL(void) AssertMsg2(const char *pszFormat, ...)
     87RTDECL(void) RTAssertMsg2V(const char *pszFormat, va_list va)
    8888{
    89     va_list va;
     89    va_list vaCopy;
    9090    char    szMsg[256];
    9191
    9292#ifdef IN_GUEST_R0
    93     va_start(va, pszFormat);
    94     RTLogBackdoorPrintfV(pszFormat, va);
    95     va_end(va);
     93    va_copy(vaCopy, va);
     94    RTLogBackdoorPrintfV(pszFormat, vaCopy);
     95    va_end(vaCopy);
    9696#endif
    9797
    98     va_start(va, pszFormat);
    99     RTStrPrintfV(szMsg, sizeof(szMsg) - 1, pszFormat, va);
     98    va_copy(vaCopy, va);
     99    RTStrPrintfV(szMsg, sizeof(szMsg) - 1, pszFormat, vaCopy);
    100100    szMsg[sizeof(szMsg) - 1] = '\0';
    101     va_end(va);
     101    va_end(vaCopy);
    102102    printf("%s", szMsg);
    103103
    104     va_start(va, pszFormat);
    105     RTStrPrintfV(g_szRTAssertMsg2, sizeof(g_szRTAssertMsg2), pszFormat, va);
    106     va_end(va);
     104    va_copy(vaCopy, va);
     105    RTStrPrintfV(g_szRTAssertMsg2, sizeof(g_szRTAssertMsg2), pszFormat, vaCopy);
     106    va_end(vaCopy);
    107107}
    108108
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