VirtualBox

Changeset 25528 in vbox for trunk/src/VBox/Runtime/r0drv/os2


Ignore:
Timestamp:
Dec 20, 2009 11:24:59 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56201
Message:

IPRT,SUPDrv,++: AssertMsg[12] -> AssertMsg1Weak, AssertMsg1, AssertMsg2Weak, AssertMsg2, AssertMsg2WeakV and AssertMsg2V. Doing more of the assertion machinery in common/misc/assert.cpp to avoid code duplication (ring-0). Major SUPDrv version bump.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/os2/assert-r0drv-os2.cpp

    r8245 r25528  
    4040#include <VBox/log.h>
    4141
     42#include "internal/assert.h"
     43
    4244
    4345/*******************************************************************************
     
    4951extern size_t g_cchRTAssertMsg;
    5052
     53
    5154/*******************************************************************************
    5255*   Internal Functions                                                         *
     
    5558
    5659
    57 /**
    58  * The 1st part of an assert message.
    59  *
    60  * @param   pszExpr     Expression. Can be NULL.
    61  * @param   uLine       Location line number.
    62  * @param   pszFile     Location file name.
    63  * @param   pszFunction Location function name.
    64  * @remark  This API exists in HC Ring-3 and GC.
    65  */
    66 RTDECL(void)    AssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction)
     60void rtR0AssertNativeMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction)
    6761{
    68 #ifdef IN_GUEST_R0
    69     RTLogBackdoorPrintf("\n!!Assertion Failed!!\n"
    70                         "Expression: %s\n"
    71                         "Location  : %s(%d) %s\n",
    72                         pszExpr, pszFile, uLine, pszFunction);
    73 #endif
    74 
    7562#if defined(DEBUG_bird)
    7663    RTLogComPrintf("\n!!Assertion Failed!!\n"
     
    8875
    8976
    90 /**
    91  * The 2nd (optional) part of an assert message.
    92  *
    93  * @param   pszFormat   Printf like format string.
    94  * @param   ...         Arguments to that string.
    95  * @remark  This API exists in HC Ring-3 and GC.
    96  */
    97 RTDECL(void) AssertMsg2(const char *pszFormat, ...)
     77void rtR0AssertNativeMsg2V(const char *pszFormat, va_list va)
    9878{
    99     va_list va;
    100 
    101 #ifdef IN_GUEST_R0
    102     va_start(va, pszFormat);
    103     RTLogBackdoorPrintfV(pszFormat, va);
    104     va_end(va);
    105 #endif
    106 
    10779#if defined(DEBUG_bird)
    108     va_start(va, pszFormat);
    109     RTLogComPrintfV(pszFormat, va);
    110     va_end(va);
     80    va_list vaCopy;
     81    va_copy(vaCopy, va);
     82    RTLogComPrintfV(pszFormat, vaCopy);
     83    va_end(vaCopy);
    11184#endif
    11285
Note: See TracChangeset for help on using the changeset viewer.

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