VBoxDispDbg.cpp revision ba6524ccac330688123403ddf0a83d702cd9e371
#include <stdio.h>
#include <stdarg.h>
#include "VBoxDispD3DCmn.h"
#ifdef VBOXWDDMDISP_DEBUG
bool g_bVBoxVDbgFDumpSetTexture = false;
bool g_bVBoxVDbgFDumpDrawPrim = false;
bool g_bVBoxVDbgFDumpTexBlt = false;
bool g_bVBoxVDbgFDumpBlt = false;
typedef enum
{
typedef struct VBOXDISPDBG
{
} VBOXDISPDBG, *PVBOXDISPDBG;
static VBOXDISPDBG g_VBoxDispDbg = {0};
{
if (ASMAtomicCmpXchgU32((volatile uint32_t *)g_VBoxDispDbg.enmState, VBOXDISPDBG_STATE_UNINITIALIZED, VBOXDISPDBG_STATE_INITIALIZING))
{
{
return &g_VBoxDispDbg;
}
else
{
}
}
else if (ASMAtomicReadU32((volatile uint32_t *)g_VBoxDispDbg.enmState) == VBOXDISPDBG_STATE_INITIALIZED)
{
return &g_VBoxDispDbg;
}
Assert(0);
return NULL;
}
void vboxDispLogDrv(char * szString)
{
#ifdef DEBUG_misha
#endif
if (!pDbg)
return;
{
if (pCmd)
{
D3DKMT_ESCAPE EscapeData = {0};
//EscapeData.hDevice = NULL;
// EscapeData.Flags.HardwareAccess = 1;
//EscapeData.hContext = NULL;
}
}
}
void vboxDispLogDrvF(char * szString, ...)
{
char szBuffer[4096] = {0};
}
VOID vboxVDbgDoDumpSurfRectByAlloc(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, const RECT *pRect, const char* pSuffix)
{
}
VOID vboxVDbgDoDumpAllocRect(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, const RECT *pRect, const char* pSuffix)
{
if (pPrefix)
{
}
{
vboxVDbgPrint(("<?dml?><exec cmd=\"!vbvdbg.ms 0x%p 0n%d 0n%d 0n%d 0n%d\">surface info</exec>\n",
if (pRect)
{
vboxVDbgPrint(("<?dml?><exec cmd=\"!vbvdbg.ms 0x%p 0n%d 0n%d 0n%d 0n%d\">rect info</exec>\n",
}
Assert(0);
}
if (pSuffix)
{
}
}
VOID vboxVDbgDoDumpSurfRectByRc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const RECT *pRect, const char* pSuffix)
{
BOOL bReleaseSurf = false;
{
}
}
VOID vboxVDbgDoDumpSurfRect(const char * pPrefix, IDirect3DSurface9 *pSurf, const RECT *pRect, const char * pSuffix, bool bBreak)
{
if (pPrefix)
{
}
{
{
vboxVDbgPrint(("<?dml?><exec cmd=\"!vbvdbg.ms 0x%p 0n%d 0n%d 0n%d 0n%d\">surface info</exec>\n",
if (pRect)
{
vboxVDbgPrint(("<?dml?><exec cmd=\"!vbvdbg.ms 0x%p 0n%d 0n%d 0n%d 0n%d\">rect info</exec>\n",
}
if (bBreak)
{
Assert(0);
}
}
}
if (pSuffix)
{
}
}
{
}
#define VBOXVDBG_STRCASE(_t) \
#define VBOXVDBG_STRCASE_UNKNOWN() \
default: Assert(0); return "Unknown";
{
switch (enmFace)
{
}
}
VOID vboxVDbgDoDumpRcRect(const char * pPrefix, IDirect3DResource9 *pRc, const RECT *pRect, const char * pSuffix)
{
if (pPrefix)
{
}
{
case D3DRTYPE_TEXTURE:
{
vboxVDbgPrint(("this is a texture\n"));
{
}
break;
}
case D3DRTYPE_CUBETEXTURE:
{
vboxVDbgPrint(("this is a cube texture\n"));
{
{
}
else
{
Assert(0);
}
}
Assert(0);
{
apSurf[i]->UnlockRect();
}
break;
}
case D3DRTYPE_SURFACE:
{
vboxVDbgPrint(("this is a surface\n"));
}
default:
vboxVDbgPrint(("unsupported rc type\n"));
Assert(0);
}
if (pSuffix)
{
}
}
VOID vboxVDbgDoDumpRcRectByRc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, const RECT *pRect, const char* pSuffix)
{
}
{
}
{
{
}
else
{
}
}
void vboxVDbgDoPrintAlloc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const char * pSuffix)
{
if (bPrimary)
{
}
bPrimary ?
: "?Everage? Alloc",
pSuffix));
}
{
vboxVDbgPrint(("%s left(%d), top(%d), right(%d), bottom(%d) %s", pPrefix, pRect->left, pRect->top, pRect->right, pRect->bottom, pSuffix));
}
#endif
#ifdef VBOXWDDMDISP_DEBUG_VEHANDLER
{
switch (pExceptionRecord->ExceptionCode)
{
case 0x40010006: /* <- OutputDebugString exception, ignore */
case 0xe06d7363: /* <- ms compiler - generated exception related to C++ exception */
case 0x000006d9: /* <- RPC exception, ignore */
break;
default:
AssertRelease(0);
break;
}
return EXCEPTION_CONTINUE_SEARCH;
}
void vboxVDbgVEHandlerRegister()
{
}
void vboxVDbgVEHandlerUnregister()
{
}
#endif