VirtualBox

Ignore:
Timestamp:
Mar 4, 2009 3:34:40 PM (16 years ago)
Author:
vboxsync
Message:

IPRT/assert: don't create a debug log on assert if we've got a release log and logging isn't enabled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/assert.cpp

    r8245 r17348  
    4242
    4343
    44 #if defined(IN_GUEST_R0) && (defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS)) 
    45 /* 
    46  * This is legacy that should be eliminated. OS specific code deals with 
     44#if defined(IN_GUEST_R0) && (defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS))
     45/*
     46 * This is legacy that should be eliminated. OS specific code deals with
    4747 * R0 assertions now and it will do the backdoor printfs in addition to
    4848 * proper OS specific printfs and panics / BSODs / IPEs.
     
    134134    }
    135135
    136     pLog = RTLogDefaultInstance();
    137     if (pLog)
    138     {
    139         RTLogPrintf("\n!!Assertion Failed!!\n"
    140                     "Expression: %s\n"
    141                     "Location  : %s(%d) %s\n",
    142                     pszExpr, pszFile, uLine, pszFunction);
    143         RTLogFlush(pLog);
     136#ifndef LOG_ENABLED
     137    if (!pLog)
     138#endif
     139    {
     140        pLog = RTLogDefaultInstance();
     141        if (pLog)
     142        {
     143            RTLogPrintf("\n!!Assertion Failed!!\n"
     144                        "Expression: %s\n"
     145                        "Location  : %s(%d) %s\n",
     146                        pszExpr, pszFile, uLine, pszFunction);
     147            RTLogFlush(pLog);
     148        }
    144149    }
    145150
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