Changeset 42027 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Video
- Timestamp:
- Jul 5, 2012 3:22:12 PM (13 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.cpp
r41637 r42027 81 81 } 82 82 83 #if defined(VBOXWDDMDISP_DEBUG) || defined(VBOX_WDDMDISP_WITH_PROFILE) 84 LONG g_VBoxVDbgFIsDwm = -1; 85 86 DWORD g_VBoxVDbgPid = 0; 87 #endif 88 83 89 #ifdef VBOXWDDMDISP_DEBUG 84 90 #define VBOXWDDMDISP_DEBUG_DUMP_DEFAULT 0 … … 109 115 DWORD g_VBoxVDbgFLog = 1; 110 116 DWORD g_VBoxVDbgFLogFlow = 0; 111 112 LONG g_VBoxVDbgFIsDwm = -1;113 114 DWORD g_VBoxVDbgPid = 0;115 117 116 118 DWORD g_VBoxVDbgCfgMaxDirectRts = 0; … … 642 644 } 643 645 644 BOOL vboxVDbgDoCheckExe(const char * pszName)645 {646 char *pszModule = vboxVDbgDoGetModuleName();647 if (!pszModule)648 return FALSE;649 DWORD cbModule, cbName;650 cbModule = strlen(pszModule);651 cbName = strlen(pszName);652 if (cbName > cbModule)653 return FALSE;654 if (_stricmp(pszName, pszModule + (cbModule - cbName)))655 return FALSE;656 return TRUE;657 }658 659 646 static VOID CALLBACK vboxVDbgTimerCb(__in PVOID lpParameter, __in BOOLEAN TimerOrWaitFired) 660 647 { … … 686 673 } 687 674 return S_OK; 675 } 676 #endif 677 678 #if defined(VBOXWDDMDISP_DEBUG) || defined(VBOX_WDDMDISP_WITH_PROFILE) 679 BOOL vboxVDbgDoCheckExe(const char * pszName) 680 { 681 char *pszModule = vboxVDbgDoGetModuleName(); 682 if (!pszModule) 683 return FALSE; 684 DWORD cbModule, cbName; 685 cbModule = strlen(pszModule); 686 cbName = strlen(pszName); 687 if (cbName > cbModule) 688 return FALSE; 689 if (_stricmp(pszName, pszModule + (cbModule - cbName))) 690 return FALSE; 691 return TRUE; 688 692 } 689 693 #endif -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.h
r41637 r42027 79 79 extern DWORD g_VBoxVDbgFLogFlow; 80 80 81 extern LONG g_VBoxVDbgFIsDwm;82 83 81 extern DWORD g_VBoxVDbgCfgMaxDirectRts; 84 82 extern DWORD g_VBoxVDbgCfgForceDummyDevCreate; … … 170 168 } while (0) 171 169 170 #if defined(VBOXWDDMDISP_DEBUG) || defined(VBOX_WDDMDISP_WITH_PROFILE) 171 extern DWORD g_VBoxVDbgPid; 172 extern LONG g_VBoxVDbgFIsDwm; 173 #define VBOXVDBG_CHECK_EXE(_pszName) (vboxVDbgDoCheckExe(_pszName)) 174 #define VBOXVDBG_IS_DWM() (!!(g_VBoxVDbgFIsDwm >=0 ? g_VBoxVDbgFIsDwm : (g_VBoxVDbgFIsDwm = VBOXVDBG_CHECK_EXE("dwm.exe")))) 175 BOOL vboxVDbgDoCheckExe(const char * pszName); 176 #endif 172 177 #if defined(VBOXWDDMDISP_DEBUG) || defined(LOG_TO_BACKDOOR_DRV) 173 178 … … 259 264 BOOL fBreakOnMismatch); 260 265 261 BOOL vboxVDbgDoCheckExe(const char * pszName);262 263 266 VOID vboxVDbgDoPrintLopLastCmd(const char* pszDesc); 264 267 … … 266 269 HRESULT vboxVDbgTimerStop(HANDLE hTimerQueue, HANDLE hTimer); 267 270 268 extern DWORD g_VBoxVDbgPid;269 271 #define VBOXVDBG_IS_PID(_pid) ((_pid) == (g_VBoxVDbgPid ? g_VBoxVDbgPid : (g_VBoxVDbgPid = GetCurrentProcessId()))) 270 272 #define VBOXVDBG_IS_DUMP_ALLOWED_PID(_pid) (((int)(_pid)) > 0 ? VBOXVDBG_IS_PID(_pid) : !VBOXVDBG_IS_PID(-((int)(_pid)))) 271 272 #define VBOXVDBG_CHECK_EXE(_pszName) (vboxVDbgDoCheckExe(_pszName))273 #define VBOXVDBG_IS_DWM() (!!(g_VBoxVDbgFIsDwm >=0 ? g_VBoxVDbgFIsDwm : (g_VBoxVDbgFIsDwm = VBOXVDBG_CHECK_EXE("dwm.exe"))))274 273 275 274 #define VBOXVDBG_ASSERT_IS_DWM(_bDwm) do { \
Note:
See TracChangeset
for help on using the changeset viewer.