VirtualBox

Changeset 14500 in vbox for trunk/include/iprt/assert.h


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/include/iprt/assert.h

    r13931 r14500  
    3333#include <iprt/cdefs.h>
    3434#include <iprt/types.h>
     35#include <iprt/stdarg.h>
    3536
    3637/** @defgroup grp_rt_assert     Assert - Assertions
     
    8687 * @param   pszFile     Location file name.
    8788 * @param   pszFunction Location function name.
    88  * @remark  This API exists in HC Ring-3 and GC.
     89 */
     90RTDECL(void)    RTAssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction);
     91/**
     92 * Weak version of RTAssertMsg1
     93 *
     94 * @copydoc RTAssertMsg1
     95 * @todo rename to AssertMsg1Weak
    8996 */
    9097RTDECL(void)    AssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction);
     
    9299/**
    93100 * The 2nd (optional) part of an assert message.
     101 *
     102 * @param   pszFormat   Printf like format string.
     103 * @param   va          Arguments to that string.
     104 */
     105RTDECL(void)    RTAssertMsg2V(const char *pszFormat, va_list va);
     106
     107/**
     108 * The 2nd (optional) part of an assert message.
     109 *
    94110 * @param   pszFormat   Printf like format string.
    95111 * @param   ...         Arguments to that string.
    96  * @remark  This API exists in HC Ring-3 and GC.
     112 */
     113RTDECL(void)    RTAssertMsg2(const char *pszFormat, ...);
     114/** Weak version of RTAssertMsg2
     115 * @copydoc RTAssertMsg2
     116 * @todo rename to AssertMsg2Weak
    97117 */
    98118RTDECL(void)    AssertMsg2(const char *pszFormat, ...);
     
    294314 * @remarks This macro does not depend on RT_STRICT.
    295315 */
    296 #if (defined(IN_RING0) && !defined(IN_RING0_AGNOSTIC)) \
     316#if defined(IN_RING0) \
    297317 && (defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS))
    298318# define RTAssertDoPanic()      RTR0AssertPanicSystem()
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