VirtualBox

Changeset 41374 in vbox


Ignore:
Timestamp:
May 21, 2012 6:04:03 PM (13 years ago)
Author:
vboxsync
Message:

wddm/3d/crogl: backdoor logging

Location:
trunk
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxCrHgsmi.h

    r40483 r41374  
    3030/* enable this in case we include this in a dll*/
    3131# ifdef IN_VBOXCRHGSMI
    32 #  define VBOXCRHGSMI_DECL(a_Type) DECLEXPORT(a_Type)
     32#  define VBOXCRHGSMI_DECL(a_Type) DECLEXPORT(a_Type) RTCALL
    3333# else
    34 #  define VBOXCRHGSMI_DECL(a_Type) DECLIMPORT(a_Type)
     34#  define VBOXCRHGSMI_DECL(a_Type) DECLIMPORT(a_Type) RTCALL
    3535# endif
    3636#else
    3737/*enable this in case we include this in a static lib*/
    38 # define VBOXCRHGSMI_DECL(a_Type) a_Type
     38# define VBOXCRHGSMI_DECL(a_Type) a_Type RTCALL
    3939#endif
    4040
     
    6363VBOXCRHGSMI_DECL(int) VBoxCrHgsmiTerm(void);
    6464
    65 VBOXCRHGSMI_DECL(void) VBoxCrHgsmiLog(char * szString);
    66 
    67 VBOXCRHGSMI_DECL(int) VBoxCrHgsmiTerm(void);
    68 
    6965VBOXCRHGSMI_DECL(int) VBoxCrHgsmiCtlConGetClientID(PVBOXUHGSMI pHgsmi, uint32_t *pu32ClientID);
    7066VBOXCRHGSMI_DECL(int) VBoxCrHgsmiCtlConCall(PVBOXUHGSMI pHgsmi, struct VBoxGuestHGCMCallInfo *pCallInfo, int cbCallInfo);
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/Makefile.kmk

    r40716 r41374  
    122122        $(VBOX_LIB_IPRT_GUEST_R3) \
    123123        $(VBOX_LIB_VBGL_R3) \
    124         Psapi.lib
     124        Psapi.lib \
     125        $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger$(VBOX_SUFF_LIB)
    125126
    126127#
     
    133134        $(VBOX_LIB_IPRT_GUEST_R3_X86) \
    134135        $(VBOX_LIB_VBGL_R3_X86) \
    135         Psapi.lib
     136        Psapi.lib \
     137        $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB)
    136138VBoxDispD3D-x86_DEFS = $(VBoxDispD3D_DEFS) VBOX_WDDM_WOW64
    137139
     
    161163endif #VBOX_WITH_CRHGSMI
    162164
     165#
     166# VBoxDispMpLogger - display backdoor logger library
     167#
     168LIBRARIES += VBoxDispMpLogger
     169VBoxDispMpLogger_TEMPLATE    = VBOXGUESTR3LIB
     170VBoxDispMpLogger_DEFS        = UNICODE _UNICODE VBOX_WITH_CRHGSMI IN_VBOXCRHGSMI VBOX_WITH_WDDM VBOX_WITH_VDMA VBOX_WITH_HGCM
     171VBoxDispMpLogger_INCS        = ../../../include ..
     172VBoxDispMpLogger_SOURCES     = \
     173    wddm/VBoxDispMpLogger.cpp
     174VBoxDispMpLogger_SDKS        = WINDDKWLH
     175
     176#
     177# 64-bit systems needs a 32-bit version of VBoxCrHgsmi.
     178#
     179LIBRARIES.amd64 += VBoxDispMpLogger-x86
     180VBoxDispMpLogger-x86_TEMPLATE    = VBOXGUESTR3LIB
     181VBoxDispMpLogger-x86_EXTENDS = VBoxDispMpLogger
     182VBoxDispMpLogger-x86_BLD_TRG_ARCH = x86
     183VBoxDispMpLogger-x86_DEFS = $(VBoxDispMpLogger_DEFS) VBOX_WDDM_WOW64
     184
    163185endif #ifdef VBOX_WITH_WDDM
    164186
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxCrHgsmi.cpp

    r40483 r41374  
    253253}
    254254
    255 VBOXCRHGSMI_DECL(void) VBoxCrHgsmiLog(char * szString)
    256 {
    257     vboxVDbgPrint(("%s", szString));
    258 }
    259 
    260255VBOXCRHGSMI_DECL(int) VBoxCrHgsmiCtlConGetClientID(PVBOXUHGSMI pHgsmi, uint32_t *pu32ClientID)
    261256{
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.cpp

    r39819 r41374  
    715715
    716716#if defined(VBOXWDDMDISP_DEBUG) || defined(LOG_TO_BACKDOOR_DRV)
    717 typedef enum
    718 {
    719     VBOXDISPDBG_STATE_UNINITIALIZED = 0,
    720     VBOXDISPDBG_STATE_INITIALIZING,
    721     VBOXDISPDBG_STATE_INITIALIZED,
    722 } VBOXDISPDBG_STATE;
    723 
    724 typedef struct VBOXDISPDBG
    725 {
    726     VBOXDISPKMT_CALLBACKS KmtCallbacks;
    727     VBOXDISPDBG_STATE enmState;
    728 } VBOXDISPDBG, *PVBOXDISPDBG;
    729 
    730 static VBOXDISPDBG g_VBoxDispDbg = {0};
    731 
    732 PVBOXDISPDBG vboxDispDbgGet()
    733 {
    734     if (ASMAtomicCmpXchgU32((volatile uint32_t *)&g_VBoxDispDbg.enmState, VBOXDISPDBG_STATE_INITIALIZING, VBOXDISPDBG_STATE_UNINITIALIZED))
    735     {
    736         HRESULT hr = vboxDispKmtCallbacksInit(&g_VBoxDispDbg.KmtCallbacks);
    737         Assert(hr == S_OK);
    738         if (hr == S_OK)
    739         {
    740             ASMAtomicWriteU32((volatile uint32_t *)&g_VBoxDispDbg.enmState, VBOXDISPDBG_STATE_INITIALIZED);
    741             return &g_VBoxDispDbg;
    742         }
    743         else
    744         {
    745             ASMAtomicWriteU32((volatile uint32_t *)&g_VBoxDispDbg.enmState, VBOXDISPDBG_STATE_UNINITIALIZED);
    746         }
    747     }
    748     else if (ASMAtomicReadU32((volatile uint32_t *)&g_VBoxDispDbg.enmState) == VBOXDISPDBG_STATE_INITIALIZED)
    749     {
    750         return &g_VBoxDispDbg;
    751     }
    752     Assert(0);
    753     return NULL;
    754 }
    755 
    756 void vboxDispLogDrv(char * szString)
    757 {
    758     PVBOXDISPDBG pDbg = vboxDispDbgGet();
    759     if (!pDbg)
    760     {
    761         /* do not use WARN her esince this would lead to a recursion */
    762         BP_WARN();
    763         return;
    764     }
    765 
    766     VBOXDISPKMT_ADAPTER Adapter;
    767     HRESULT hr = vboxDispKmtOpenAdapter(&pDbg->KmtCallbacks, &Adapter);
    768     if (hr == S_OK)
    769     {
    770         uint32_t cbString = (uint32_t)strlen(szString) + 1;
    771         uint32_t cbCmd = RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[cbString]);
    772         PVBOXDISPIFESCAPE_DBGPRINT pCmd = (PVBOXDISPIFESCAPE_DBGPRINT)RTMemAllocZ(cbCmd);
    773         if (pCmd)
    774         {
    775             pCmd->EscapeHdr.escapeCode = VBOXESC_DBGPRINT;
    776             memcpy(pCmd->aStringBuf, szString, cbString);
    777 
    778             D3DKMT_ESCAPE EscapeData = {0};
    779             EscapeData.hAdapter = Adapter.hAdapter;
    780             //EscapeData.hDevice = NULL;
    781             EscapeData.Type = D3DKMT_ESCAPE_DRIVERPRIVATE;
    782     //        EscapeData.Flags.HardwareAccess = 1;
    783             EscapeData.pPrivateDriverData = pCmd;
    784             EscapeData.PrivateDriverDataSize = cbCmd;
    785             //EscapeData.hContext = NULL;
    786 
    787             int Status = pDbg->KmtCallbacks.pfnD3DKMTEscape(&EscapeData);
    788             if (Status)
    789             {
    790                 BP_WARN();
    791             }
    792 
    793             RTMemFree(pCmd);
    794         }
    795         else
    796         {
    797             BP_WARN();
    798         }
    799         hr = vboxDispKmtCloseAdapter(&Adapter);
    800         if(hr != S_OK)
    801         {
    802             BP_WARN();
    803         }
    804     }
    805 }
    806 
    807 void vboxDispLogDrvF(char * szString, ...)
    808 {
    809     char szBuffer[4096] = {0};
    810     va_list pArgList;
    811     va_start(pArgList, szString);
    812     _vsnprintf(szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0]), szString, pArgList);
    813     va_end(pArgList);
    814 
    815     vboxDispLogDrv(szBuffer);
    816 }
    817 
    818 static void vboxDispDumpBufDrv(void *pvBuf, uint32_t cbBuf, VBOXDISPIFESCAPE_DBGDUMPBUF_TYPE enmBuf)
    819 {
    820     PVBOXDISPDBG pDbg = vboxDispDbgGet();
    821     if (!pDbg)
    822     {
    823         /* do not use WARN her esince this would lead to a recursion */
    824         BP_WARN();
    825         return;
    826     }
    827 
    828     VBOXDISPKMT_ADAPTER Adapter;
    829     HRESULT hr = vboxDispKmtOpenAdapter(&pDbg->KmtCallbacks, &Adapter);
    830     if (hr == S_OK)
    831     {
    832         uint32_t cbCmd = RT_OFFSETOF(VBOXDISPIFESCAPE_DBGDUMPBUF, aBuf[cbBuf]);
    833         PVBOXDISPIFESCAPE_DBGDUMPBUF pCmd = (PVBOXDISPIFESCAPE_DBGDUMPBUF)RTMemAllocZ(cbCmd);
    834         if (pCmd)
    835         {
    836             pCmd->EscapeHdr.escapeCode = VBOXESC_DBGDUMPBUF;
    837             pCmd->enmType = enmBuf;
    838 #ifdef VBOX_WDDM_WOW64
    839             pCmd->Flags.WoW64 = 1;
     717
    840718#endif
    841             memcpy(pCmd->aBuf, pvBuf, cbBuf);
    842 
    843             D3DKMT_ESCAPE EscapeData = {0};
    844             EscapeData.hAdapter = Adapter.hAdapter;
    845             //EscapeData.hDevice = NULL;
    846             EscapeData.Type = D3DKMT_ESCAPE_DRIVERPRIVATE;
    847     //        EscapeData.Flags.HardwareAccess = 1;
    848             EscapeData.pPrivateDriverData = pCmd;
    849             EscapeData.PrivateDriverDataSize = cbCmd;
    850             //EscapeData.hContext = NULL;
    851 
    852             int Status = pDbg->KmtCallbacks.pfnD3DKMTEscape(&EscapeData);
    853             if (Status)
    854             {
    855                 BP_WARN();
    856             }
    857 
    858             RTMemFree(pCmd);
    859         }
    860         else
    861         {
    862             BP_WARN();
    863         }
    864         hr = vboxDispKmtCloseAdapter(&Adapter);
    865         if(hr != S_OK)
    866         {
    867             BP_WARN();
    868         }
    869     }
    870 }
    871 
    872 void vboxDispDumpD3DCAPS9Drv(D3DCAPS9 *pCaps)
    873 {
    874     vboxDispDumpBufDrv(pCaps, sizeof (*pCaps), VBOXDISPIFESCAPE_DBGDUMPBUF_TYPE_D3DCAPS9);
    875 }
    876 #endif
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.h

    r39900 r41374  
    111111
    112112#if defined(LOG_TO_BACKDOOR_DRV) || defined(VBOXWDDMDISP_DEBUG_PRINTDRV)
    113 # define DbgPrintDrv(_m) do { vboxDispLogDrvF _m; } while (0)
    114 # define DbgPrintDrvRel(_m) do { vboxDispLogDrvF _m; } while (0)
    115 # define DbgPrintDrvFlow(_m) do { vboxDispLogDrvF _m; } while (0)
     113# define DbgPrintDrv(_m) do { VBoxDispMpLoggerLogF _m; } while (0)
     114# define DbgPrintDrvRel(_m) do { VBoxDispMpLoggerLogF _m; } while (0)
     115# define DbgPrintDrvFlow(_m) do { VBoxDispMpLoggerLogF _m; } while (0)
    116116#else
    117117# define DbgPrintDrv(_m) do { } while (0)
     
    171171#if defined(VBOXWDDMDISP_DEBUG) || defined(LOG_TO_BACKDOOR_DRV)
    172172
    173 void vboxDispLogDrvF(char * szString, ...);
    174 void vboxDispLogDrv(char * szString);
    175 void vboxDispDumpD3DCAPS9Drv(D3DCAPS9 *pCaps);
    176 
    177 # define vboxDispDumpD3DCAPS9(_pCaps) do { vboxDispDumpD3DCAPS9Drv(_pCaps); } while (0)
     173#include "VBoxDispMpLogger.h"
     174
     175VBOXDISPMPLOGGER_DECL(void) VBoxDispMpLoggerDumpD3DCAPS9(struct _D3DCAPS9 *pCaps);
     176
     177# define vboxDispDumpD3DCAPS9(_pCaps) do { VBoxDispMpLoggerDumpD3DCAPS9(_pCaps); } while (0)
    178178#else
    179179# define vboxDispDumpD3DCAPS9(_pCaps) do { } while (0)
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispMp.cpp

    r38112 r41374  
    193193    pCallbacks->pfnDisableEvents = vboxDispMpDisableEvents;
    194194    pCallbacks->pfnGetRegions = vboxDispMpGetRegions;
    195     pCallbacks->pfnLog = vboxDispMpLog;
    196195    return S_OK;
    197196}
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispMp.h

    r38114 r41374  
    5858     */
    5959    PFNVBOXDISPMP_GETREGIONS pfnGetRegions;
    60 
    61     PFNVBOXDISPMP_LOG pfnLog;
    6260} VBOXDISPMP_CALLBACKS, *PVBOXDISPMP_CALLBACKS;
    6361
     
    6866/* enable this in case we include this in a dll*/
    6967# ifdef VBOXWDDMDISP
    70 #  define VBOXDISPMP_DECL(_type) DECLEXPORT(_type)
     68#  define VBOXDISPMP_DECL(_type) DECLEXPORT(_type) VBOXCALL
    7169# else
    72 #  define VBOXDISPMP_DECL(_type) DECLIMPORT(_type)
     70#  define VBOXDISPMP_DECL(_type) DECLIMPORT(_type) VBOXCALL
    7371# endif
    7472
    75 #define VBOXDISPMP_IFVERSION 2
     73#define VBOXDISPMP_IFVERSION 3
    7674#define VBOXDISPMP_VERSION (VBOXVIDEOIF_VERSION | (VBOXDISPMP_IFVERSION < 16))
    7775/**
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp

    r41337 r41374  
    3131#include <VBoxDisplay.h> /* this is from Additions/WINNT/include/ to include escape codes */
    3232#include <VBox/Hardware/VBoxVideoVBE.h>
     33
     34DWORD g_VBoxLogUm = 0;
    3335
    3436#define VBOXWDDM_MEMTAG 'MDBV'
     
    40554057                    /* ensure the last char is \0*/
    40564058                    *((uint8_t*)pDbgPrint + pEscape->PrivateDriverDataSize - 1) = '\0';
    4057 #if defined(DEBUG_misha) || defined(DEBUG_leo)
    4058                     DbgPrint("%s", pDbgPrint->aStringBuf);
    4059 #else
    4060                     LOGREL_EXACT(("%s", pDbgPrint->aStringBuf));
    4061 #endif
     4059                    if (g_VBoxLogUm & VBOXWDDM_CFG_LOG_UM_DBGPRINT)
     4060                        DbgPrint("%s\n", pDbgPrint->aStringBuf);
     4061                    if (g_VBoxLogUm & VBOXWDDM_CFG_LOG_UM_BACKDOOR)
     4062                        LOGREL_EXACT(("%s\n", pDbgPrint->aStringBuf));
    40624063                }
    40634064                Status = STATUS_SUCCESS;
     
    60936094    }
    60946095
     6096    vboxWddmDrvCfgInit(RegistryPath);
     6097
    60956098    ULONG major, minor, build;
    60966099    BOOLEAN checkedBuild = PsGetVersion(&major, &minor, &build, NULL);
  • trunk/src/VBox/GuestHost/OpenGL/Makefile.kmk

    r39288 r41374  
    9292VBoxOGLcrutil_LIBS.win    += $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi$(VBOX_SUFF_LIB)
    9393endif
     94ifdef VBOX_WITH_WDDM
     95VBoxOGLcrutil_DEFS.win    += CR_DEBUG_TO_BACKDOOR_ENABLE
     96VBoxOGLcrutil_INCS.win    += $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
     97VBoxOGLcrutil_LIBS.win    += $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger$(VBOX_SUFF_LIB)
     98endif
    9499VBoxOGLcrutil_CLEAN = \
    95100        $(VBOX_PATH_CROGL_GENFILES)/debug_opcodes.c
     
    117122endif
    118123VBoxOGLcrutil-x86_DEFS = $(VBoxOGLcrutil_DEFS) VBOX_WDDM_WOW64
     124ifdef VBOX_WITH_WDDM
     125# CR_DEBUG_TO_BACKDOOR_ENABLE define is inherited from VBoxOGLcrutil
     126VBoxOGLcrutil-x86_INCS.win    += $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
     127VBoxOGLcrutil-x86_LIBS.win    += $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB)
     128endif
    119129# vc7 hangs during compilation of this file when optimizations are enabled.
    120130VBoxOGLcrutil-x86_pixel.c_CFLAGS += -Od
     
    141151VBoxOGLhostcrutil_DEFS    += VBOX_WITH_CRHGSMI
    142152VBoxOGLhostcrutil_LIBS.win = $(subst $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi$(VBOX_SUFF_LIB),,$(VBoxOGLcrutil_LIBS.win))
     153endif
     154ifdef VBOX_WITH_WDDM
     155VBoxOGLhostcrutil_LIBS.win = $(subst $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger$(VBOX_SUFF_LIB),,$(VBoxOGLcrutil_LIBS.win))
     156VBoxOGLhostcrutil_INCS.win = $(NO_SUCH_VARIABLE)
     157VBoxOGLhostcrutil_DEFS.win = $(NO_SUCH_VARIABLE)
    143158endif
    144159
  • trunk/src/VBox/GuestHost/OpenGL/util/error.c

    r40388 r41374  
    2727#include <VBox/log.h>
    2828#endif
     29
     30#if defined(WINDOWS)
     31# define CR_DEBUG_TO_CONSOLE_ENABLE
     32#endif
     33
     34#if defined(WINDOWS) && defined(IN_GUEST)
     35# ifndef CR_DEBUG_TO_BACKDOOR_ENABLE
     36#  error "CR_DEBUG_TO_BACKDOOR_ENABLE is expected!"
     37# endif
     38#else
     39# ifdef CR_DEBUG_TO_BACKDOOR_ENABLE
     40#  error "CR_DEBUG_TO_BACKDOOR_ENABLE is NOT expected!"
     41# endif
     42#endif
     43
     44
     45#ifdef CR_DEBUG_TO_BACKDOOR_ENABLE
     46# include <VBoxDispMpLogger.h>
     47# include <iprt/err.h>
     48#endif
     49
    2950
    3051static char my_hostname[256];
     
    291312    static int first_time = 1;
    292313    static int silent = 0;
     314#ifdef CR_DEBUG_TO_BACKDOOR_ENABLE
     315    static int logBackdoor = 0;
     316#endif
    293317
    294318    if (first_time)
    295319    {
    296320        const char *fname = crGetenv( "CR_DEBUG_FILE" );
    297         char str[1024];
    298 
    299 #if defined(Linux) && defined(IN_GUEST) && defined(DEBUG_leo)
    300         if (!fname)
     321        const char *fnamePrefix = crGetenv( "CR_DEBUG_FILE_PREFIX" );
     322        char str[2048];
     323#ifdef CR_DEBUG_TO_CONSOLE_ENABLE
     324        int logToConsole = 0;
     325#endif
     326#ifdef CR_DEBUG_TO_BACKDOOR_ENABLE
     327        if (crGetenv( "CR_DEBUG_TO_BACKDOOR" ))
     328        {
     329            int rc = VBoxDispMpLoggerInit();
     330            if (RT_SUCCESS(rc))
     331                logBackdoor = 1;
     332        }
     333#endif
     334
     335        if (!fname && fnamePrefix)
    301336        {
    302337            char pname[1024];
    303             crGetProcName(pname, 1024);
    304             sprintf(str, "/home/leo/crlog_%s.txt", pname);
    305             fname = &str[0];
    306         }
    307 #endif
     338            if (strlen(fnamePrefix) < sizeof (str) - sizeof (pname) - 20)
     339            {
     340                crGetProcName(pname, 1024);
     341                sprintf(str, "%s_%s_%d.txt", fnamePrefix, pname,
     342#ifdef RT_OS_WINDOWS
     343                        GetCurrentProcessId()
     344#else
     345                        crGetPID()
     346#endif
     347                        );
     348                fname = &str[0];
     349            }
     350        }
    308351
    309352        first_time = 0;
    310353        if (fname)
    311354        {
    312             char debugFile[1000], *p;
     355            char debugFile[2048], *p;
    313356            crStrcpy(debugFile, fname);
    314357            p = crStrstr(debugFile, "%p");
     
    327370        else
    328371        {
    329 #if defined(WINDOWS) && defined(IN_GUEST) && (defined(DEBUG_leo) || defined(DEBUG_ll158262) || defined(DEBUG_misha))
    330             crRedirectIOToConsole();
     372#ifdef CR_DEBUG_TO_CONSOLE_ENABLE
     373            if (crGetenv( "CR_DEBUG_TO_CONSOLE" ))
     374            {
     375                crRedirectIOToConsole();
     376                logToConsole = 1;
     377            }
    331378#endif
    332379            output = stderr;
    333380        }
     381
    334382#if !defined(DEBUG)/* || defined(DEBUG_misha)*/
    335383        /* Release mode: only emit crDebug messages if CR_DEBUG
    336384         * or CR_DEBUG_FILE is set.
    337385         */
    338         if (!fname && !crGetenv("CR_DEBUG"))
     386        if (!fname && !crGetenv("CR_DEBUG")
     387#ifdef CR_DEBUG_TO_CONSOLE_ENABLE
     388                    && !logToConsole
     389#endif
     390#ifdef CR_DEBUG_TO_BACKDOOR_ENABLE
     391                    && !logBackdoor
     392#endif
     393                )
    339394            silent = 1;
    340395#endif
     
    380435    else
    381436    {
    382         offset = sprintf( txt, "[0x%x] OpenGL Debug: ", crThreadID());
    383     }
    384 #else
    385     offset = sprintf( txt, "[0x%lx] OpenGL Debug: ", crThreadID());
     437        offset = sprintf( txt, "[0x%x.0x%x] OpenGL Debug: ", GetCurrentProcessId(), crThreadID());
     438    }
     439#else
     440    offset = sprintf( txt, "[0x%lx.0x%lx] OpenGL Debug: ", crGetPID(), crThreadID());
    386441#endif
    387442    va_start( args, format );
    388443    vsprintf( txt + offset, format, args );
     444#ifdef CR_DEBUG_TO_BACKDOOR_ENABLE
     445    if (logBackdoor)
     446    {
     447        VBoxDispMpLoggerLog(txt);
     448    }
     449#endif
    389450#if defined(IN_GUEST)
    390451    outputChromiumMessage( output, txt );
    391452#else
    392 # if defined(DEBUG) && (defined(DEBUG_leo) || defined(DEBUG_ll158262))
    393     outputChromiumMessage( output, txt );
     453    if (!output
     454# ifndef DEBUG_misha
     455            || output==stderr
    394456# endif
    395 #ifndef DEBUG_misha
    396     if (output==stderr)
    397 #endif
     457            )
    398458    {
    399459        LogRel(("%s\n", txt));
    400460    }
    401 #ifndef DEBUG_misha
    402461    else
    403 #endif
    404     {
     462    {
     463# ifndef DEBUG_misha
     464        LogRel(("%s\n", txt));
     465# endif
    405466        outputChromiumMessage(output, txt);
    406467    }
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