Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1203 lines
35 KiB

  1. /*++
  2. Copyright (c) 1995-1997 Microsoft Corporation
  3. Module Name:
  4. dbgasp.cxx
  5. Abstract:
  6. Author:
  7. David Gottner (dgottner) 3-Aug-1998
  8. Revision History:
  9. --*/
  10. #include "inetdbgp.h"
  11. // Need to Undef malloc() & free() because ASP includes malloc.h, which will result
  12. // in syntax error if these are defined.
  13. //
  14. #undef malloc
  15. #undef calloc
  16. #undef realloc
  17. #undef free
  18. #include "denali.h"
  19. #include "hitobj.h"
  20. #include "scrptmgr.h"
  21. #include "cachemgr.h"
  22. #include "wamxinfo.hxx"
  23. // re-instate malloc & free macros. -- NOTE: inetdbgp.h needs to be included before
  24. // asp includes, so this funky design is necessary.
  25. //
  26. #define malloc( n ) HeapAlloc( GetProcessHeap(), 0, (n) )
  27. #define calloc( n, s ) HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, (n)*(s) )
  28. #define realloc( p, n ) HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, (p), (n) )
  29. #define free( p ) HeapFree( GetProcessHeap(), 0, (p) )
  30. #define Bool2Str(f) ((f)? "true" : "false")
  31. static void CreateStringFromVariant(char *, const VARIANT *, void *);
  32. static void *GetObjectList(CComponentCollection *pDebuggeeCompColl);
  33. static void DumpAspGlobals();
  34. static void ListTemplateCache();
  35. static void DumpAspHitobj(void *pvArg, int nVerbosity);
  36. static void DumpAspAppln(void *pvArg, int nVerbosity);
  37. static void DumpAspSession(void *pvArg, int nVerbosity);
  38. static void DumpAspObject(void *pvArg, int nVerbosity);
  39. static void DumpAspTemplate(void *pvArg, int nVerbosity);
  40. static void DumpAspFilemap(void *pvArg, int nVerbosity);
  41. static void DumpAspEngine(void *pvArg, int nVerbosity);
  42. static void ListAspObjects(void *pvArg, int /* unused */);
  43. DECLARE_API( asp )
  44. /*++
  45. Routine Description:
  46. This function is called as an NTSD extension to Diagnose ASP bugs
  47. Arguments:
  48. hCurrentProcess - Supplies a handle to the current process (at the
  49. time the extension was called).
  50. hCurrentThread - Supplies a handle to the current thread (at the
  51. time the extension was called).
  52. CurrentPc - Supplies the current pc at the time the extension is
  53. called.
  54. lpExtensionApis - Supplies the address of the functions callable
  55. by this extension.
  56. lpArgumentString - Supplies the asciiz string that describes the
  57. ansi string to be dumped.
  58. Return Value:
  59. None.
  60. --*/
  61. {
  62. INIT_API();
  63. int nVerbosity = 0;
  64. void (*pfnDebugPrint)(void *pvArg, int nVerbosity) = NULL;
  65. //
  66. // Skip leading blanks.
  67. //
  68. while( *lpArgumentString == ' ' || *lpArgumentString == '\t' )
  69. ++lpArgumentString;
  70. if( *lpArgumentString == '\0' )
  71. {
  72. PrintUsage( "asp" );
  73. return;
  74. }
  75. if ( *lpArgumentString == '-' )
  76. {
  77. switch ( *++lpArgumentString )
  78. {
  79. case 'v':
  80. switch ( *++lpArgumentString )
  81. {
  82. case '0':
  83. case '1':
  84. case '2':
  85. nVerbosity = *lpArgumentString++ - '0';
  86. break;
  87. case ' ':
  88. case '\t':
  89. nVerbosity = 1;
  90. break;
  91. default:
  92. // allow option combining; e.g. "!inetdbg.asp -vh <addr>" to dump verbose hitobj.
  93. // to do this, insert hyphen at current location and run through the switch again.
  94. //
  95. nVerbosity = 1;
  96. *--lpArgumentString = '-';
  97. }
  98. // Now, we are pointing just after "-v" arg. Skip blanks to move to next argument
  99. while( *lpArgumentString == ' ' || *lpArgumentString == '\t' )
  100. ++lpArgumentString;
  101. // enter new select/case statement, this one not accepting "-v" option.
  102. if ( *lpArgumentString == '-' )
  103. {
  104. switch ( *++lpArgumentString )
  105. {
  106. case 'h': case 'H': pfnDebugPrint = DumpAspHitobj; break;
  107. case 'a': case 'A': pfnDebugPrint = DumpAspAppln; break;
  108. case 'e': case 'E': pfnDebugPrint = DumpAspEngine; break;
  109. case 's': case 'S': pfnDebugPrint = DumpAspSession; break;
  110. case 'o': case 'O': pfnDebugPrint = DumpAspObject; break;
  111. case 't': case 'T':
  112. switch (*(lpArgumentString + 1))
  113. {
  114. case 'f': case 'F': pfnDebugPrint = DumpAspFilemap; ++lpArgumentString; break;
  115. default:
  116. pfnDebugPrint = DumpAspTemplate;
  117. break;
  118. }
  119. break;
  120. default:
  121. PrintUsage( "asp" );
  122. return;
  123. }
  124. }
  125. else
  126. {
  127. PrintUsage( "asp" );
  128. return;
  129. }
  130. break;
  131. case 'g': case 'G': DumpAspGlobals(); break;
  132. case 'h': case 'H': pfnDebugPrint = DumpAspHitobj; break;
  133. case 'a': case 'A': pfnDebugPrint = DumpAspAppln; break;
  134. case 'e': case 'E': pfnDebugPrint = DumpAspEngine; break;
  135. case 's': case 'S': pfnDebugPrint = DumpAspSession; break;
  136. case 'o': case 'O': pfnDebugPrint = DumpAspObject; break;
  137. case 'l': case 'L': pfnDebugPrint = ListAspObjects; break;
  138. case 't': case 'T':
  139. switch (*(lpArgumentString + 1))
  140. {
  141. case 'f': case 'F': pfnDebugPrint = DumpAspFilemap; ++lpArgumentString; break;
  142. case 'l': case 'L': ListTemplateCache(); ++lpArgumentString; break;
  143. default:
  144. pfnDebugPrint = DumpAspTemplate;
  145. break;
  146. }
  147. break;
  148. default:
  149. PrintUsage( "asp" );
  150. return;
  151. }
  152. }
  153. else
  154. {
  155. PrintUsage( "asp" );
  156. return;
  157. }
  158. if (pfnDebugPrint) // set to NULL if output func already called ('-g' etc.)
  159. {
  160. void *pvArg = reinterpret_cast<void *>(GetExpression(lpArgumentString + 1));
  161. if (!pvArg)
  162. {
  163. dprintf("inetdbg: Unable to evaluate \"%s\"\n", lpArgumentString + 1);
  164. return;
  165. }
  166. (*pfnDebugPrint)(pvArg, nVerbosity);
  167. }
  168. }
  169. /*++
  170. * DumpAspGlobals
  171. --*/
  172. void DumpAspGlobals()
  173. {
  174. dprintf("Asp Globals:\n");
  175. DumpDword( "asp!g_nSessions " );
  176. DumpDword( "asp!g_nApplications " );
  177. DumpDword( "asp!g_nApplicationsRestarting" );
  178. DumpDword( "asp!g_nBrowserRequests " );
  179. DumpDword( "asp!g_nSessionCleanupRequests" );
  180. DumpDword( "asp!g_nApplnCleanupRequests " );
  181. DumpDword( "asp!g_fShutDownInProgress " );
  182. DumpDword( "asp!g_dwDebugThreadId " );
  183. DumpDword( "asp!g_pPDM " );
  184. DumpDword( "asp!g_pDebugApp " );
  185. DumpDword( "asp!g_pDebugAppRoot " );
  186. DumpDword( "asp!CTemplate__gm_pTraceLog " );
  187. DumpDword( "asp!CSession__gm_pTraceLog " );
  188. void *pvApplnMgr = reinterpret_cast<void *>(GetExpression("asp!g_ApplnMgr"));
  189. if (pvApplnMgr)
  190. {
  191. // Copy Appln Manager Stuff
  192. DEFINE_CPP_VAR(CApplnMgr, TheObject);
  193. move(TheObject, pvApplnMgr);
  194. CApplnMgr *pApplnMgr = GET_CPP_VAR_PTR(CApplnMgr, TheObject);
  195. // print Queues
  196. dprintf("\n"
  197. "\t\t--- Application Manager\n"
  198. "\n"
  199. "\tApplication Lock = %p\n"
  200. "\tDelete Appln Event = 0x%X\n"
  201. "\tEngine Cleanup List = %p (Contents: <%p, %p>)\n"
  202. "\tFirst Application = %p\n",
  203. &static_cast<CApplnMgr *>(pvApplnMgr)->m_csLock,
  204. pApplnMgr->m_hDeleteApplnEvent,
  205. &static_cast<CApplnMgr *>(pvApplnMgr)->m_listEngineCleanup,
  206. pApplnMgr->m_listEngineCleanup.m_pLinkNext,
  207. pApplnMgr->m_listEngineCleanup.m_pLinkPrev,
  208. static_cast<CAppln *>(pApplnMgr->m_pHead)); // cast required due to multiple vtables
  209. }
  210. void *pvScriptMgr = reinterpret_cast<void *>(GetExpression("asp!g_ScriptManager"));
  211. if (pvScriptMgr)
  212. {
  213. // Copy Script Manager Stuff
  214. DEFINE_CPP_VAR(CScriptManager, TheObject);
  215. move(TheObject, pvScriptMgr);
  216. CScriptManager *pScriptMgr = GET_CPP_VAR_PTR(CScriptManager, TheObject);
  217. // print Queues
  218. dprintf("\n"
  219. "\t\t--- Script Manager\n"
  220. "\n"
  221. "\tRunning Script List = %p (Contents: <%p, %p>)\n"
  222. "\tFree Script Queue = %p (Contents: <%p, %p>)\n"
  223. "\tRunning Script CritSec = %p\n"
  224. "\tFree Script CritSec = %p\n",
  225. &static_cast<CScriptManager *>(pvScriptMgr)->m_htRSL.m_lruHead,
  226. pScriptMgr->m_htRSL.m_lruHead.m_pLinkNext,
  227. pScriptMgr->m_htRSL.m_lruHead.m_pLinkPrev,
  228. &static_cast<CScriptManager *>(pvScriptMgr)->m_htFSQ.m_lruHead,
  229. pScriptMgr->m_htFSQ.m_lruHead.m_pLinkNext,
  230. pScriptMgr->m_htFSQ.m_lruHead.m_pLinkPrev,
  231. &static_cast<CScriptManager *>(pvScriptMgr)->m_csRSL,
  232. &static_cast<CScriptManager *>(pvScriptMgr)->m_csFSQ);
  233. }
  234. void *pvTemplateCache = reinterpret_cast<void *>(GetExpression("asp!g_TemplateCache"));
  235. if (pvTemplateCache)
  236. {
  237. // Copy Template Cache Stuff
  238. DEFINE_CPP_VAR(CTemplateCacheManager, TheObject);
  239. move(TheObject, pvTemplateCache);
  240. CTemplateCacheManager *pTemplateCache = GET_CPP_VAR_PTR(CTemplateCacheManager, TheObject);
  241. // print Stuff
  242. dprintf("\n"
  243. "\t\t--- Template Cache\n"
  244. "\n"
  245. "\tTemplate LKRhash Table = %p\n"
  246. "\tTemplate Mem LRU Order Q= %p (Contents: <%p, %p>)\n"
  247. "\tTemplate Per LRU Order Q= %p (Contents: <%p, %p>)\n"
  248. "\tTemplate Update CritSec = %p\n",
  249. static_cast<CTemplateCacheManager *>(pvTemplateCache)->m_pHashTemplates,
  250. &static_cast<CTemplateCacheManager *>(pvTemplateCache)->m_pHashTemplates->m_listMemoryTemplates,
  251. pTemplateCache->m_pHashTemplates->m_listMemoryTemplates.m_pLinkNext,
  252. pTemplateCache->m_pHashTemplates->m_listMemoryTemplates.m_pLinkPrev,
  253. &static_cast<CTemplateCacheManager *>(pvTemplateCache)->m_pHashTemplates->m_listPersistTemplates,
  254. pTemplateCache->m_pHashTemplates->m_listPersistTemplates.m_pLinkNext,
  255. pTemplateCache->m_pHashTemplates->m_listPersistTemplates.m_pLinkPrev,
  256. &static_cast<CTemplateCacheManager *>(pvTemplateCache)->m_csUpdate);
  257. }
  258. }
  259. /*++
  260. * DumpAspHitobj
  261. --*/
  262. void DumpAspHitobj(void *pvObj, int nVerbosity)
  263. {
  264. // used to create english readable strings
  265. // The hitobj fields are 4 bits, so each possible value is enumerated.
  266. static
  267. char *szNone = "<bad value>";
  268. static
  269. char *rgszRequestTypes[16] = { "Uninitialized", "Browser Request", "Session Cleanup", szNone, "Application Cleanup",
  270. szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone };
  271. static
  272. char *rgszEventStates[16] = { "None", "Application_OnStart", "Session_OnStart", szNone, "Application_OnEnd",
  273. szNone, szNone, szNone, "Session_OnEnd",
  274. szNone, szNone, szNone, szNone, szNone, szNone, szNone };
  275. static
  276. char *rgszActivityScope[16] = { "Unknown", "Application", "Session", szNone, "Page",
  277. szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone };
  278. // copy Hitobj from debuggee to debugger
  279. DEFINE_CPP_VAR(CHitObj, TheObject);
  280. move(TheObject, pvObj);
  281. CHitObj *pHitObj = GET_CPP_VAR_PTR(CHitObj, TheObject);
  282. // get name of file & ecb.
  283. DEFINE_CPP_VAR(WAM_EXEC_INFO, WamXInfo);
  284. move(WamXInfo, pHitObj->m_pWXI);
  285. WAM_EXEC_INFO *pWXI = GET_CPP_VAR_PTR(WAM_EXEC_INFO, WamXInfo);
  286. char szPathInfo[256];
  287. move(szPathInfo, pWXI->ecb.lpszPathInfo);
  288. char szPathTranslated[256];
  289. move(szPathTranslated, pWXI->ecb.lpszPathTranslated);
  290. char szMethod[256];
  291. move(szMethod, pWXI->ecb.lpszMethod);
  292. // terminate strings
  293. szPathInfo[255] = 0;
  294. szPathTranslated[255] = 0;
  295. szMethod[255] = 0;
  296. // yeehaw! dumpit.
  297. dprintf("METHOD = %s\n"
  298. "PATH_INFO = %s\n"
  299. "PATH_TRANSLATED = %s\n"
  300. "WAM_EXEC_INFO = %p\n"
  301. "ECB = %p\n"
  302. "Request Type = %s\n"
  303. "Event State = %s\n"
  304. "Activity Scope = %s\n"
  305. "\n"
  306. "\t-- object pointers --\n"
  307. "\n"
  308. "Session Object = %p\n"
  309. "Application Object = %p\n"
  310. "Response Object = %p\n"
  311. "Request Object = %p\n"
  312. "Server Object = %p\n"
  313. "Page Object List = %p\n"
  314. "Page Component Mgr = %p\n",
  315. szMethod,
  316. szPathInfo,
  317. szPathTranslated,
  318. pHitObj->m_pWXI,
  319. &pWXI->ecb,
  320. rgszRequestTypes[pHitObj->m_ehtType],
  321. rgszEventStates[pHitObj->m_eEventState],
  322. rgszActivityScope[pHitObj->m_ecsActivityScope],
  323. pHitObj->m_pSession,
  324. pHitObj->m_pAppln,
  325. pHitObj->m_pResponse,
  326. pHitObj->m_pRequest,
  327. pHitObj->m_pServer,
  328. GetObjectList(pHitObj->m_pPageCompCol),
  329. pHitObj->m_pPageObjMgr);
  330. if (nVerbosity >= 1)
  331. dprintf("\n"
  332. "\t--- flags ---\n"
  333. "\n"
  334. "Inited = %s\n"
  335. "RunGlobalAsa = %s\n"
  336. "StartSession = %s\n"
  337. "NewCookie = %s\n"
  338. "StartApplication = %s\n"
  339. "ClientCodeDebug = %s\n"
  340. "ApplnOnStartFailed = %s\n"
  341. "CompilationFailed = %s\n"
  342. "Executing = %s\n"
  343. "HideRequestAndResponseIntrinsics = %s\n"
  344. "HideSessionIntrinsic = %s\n"
  345. "DoneWithSession = %s\n"
  346. "Rejected = %s\n"
  347. "449Done = %s\n"
  348. "InTransferOnError = %s\n",
  349. Bool2Str(pHitObj->m_fInited),
  350. Bool2Str(pHitObj->m_fRunGlobalAsa),
  351. Bool2Str(pHitObj->m_fStartSession),
  352. Bool2Str(pHitObj->m_fNewCookie),
  353. Bool2Str(pHitObj->m_fStartApplication),
  354. Bool2Str(pHitObj->m_fClientCodeDebug),
  355. Bool2Str(pHitObj->m_fApplnOnStartFailed),
  356. Bool2Str(pHitObj->m_fCompilationFailed),
  357. Bool2Str(pHitObj->m_fExecuting),
  358. Bool2Str(pHitObj->m_fHideRequestAndResponseIntrinsics),
  359. Bool2Str(pHitObj->m_fHideSessionIntrinsic),
  360. Bool2Str(pHitObj->m_fDoneWithSession),
  361. Bool2Str(pHitObj->m_fRejected),
  362. Bool2Str(pHitObj->m_f449Done),
  363. Bool2Str(pHitObj->m_fInTransferOnError));
  364. if (nVerbosity >= 2)
  365. dprintf("\n"
  366. "\t--- kitchen sink---\n"
  367. "\n"
  368. "pUnkScriptingNamespace = %p\n"
  369. "dwObjectContextCookie = 0x%X\n"
  370. "Impersonation Handle = 0x%p\n"
  371. "Viper Activity = %p\n"
  372. "Session Cookie = %s\n"
  373. "Session ID tuple = (0x%X, 0x%X, 0x%X)\n"
  374. "Scripting Context Object = %p\n"
  375. "Scripting Timeout = %d\n"
  376. "Code Page = %u\n"
  377. "LCID = %u\n"
  378. "pEngineInfo = %p\n"
  379. "pDispTypeLibWrapper = %p\n"
  380. "Timestamp = %u\n",
  381. pHitObj->m_punkScriptingNamespace,
  382. pHitObj->m_dwObjectContextCookie,
  383. pHitObj->m_hImpersonate,
  384. pHitObj->m_pActivity,
  385. pHitObj->m_szSessionCookie,
  386. pHitObj->m_SessionId.m_dwId, pHitObj->m_SessionId.m_dwR1, pHitObj->m_SessionId.m_dwR2,
  387. pHitObj->m_pScriptingContext,
  388. pHitObj->m_nScriptTimeout,
  389. pHitObj->m_uCodePage,
  390. pHitObj->m_lcid,
  391. pHitObj->m_pEngineInfo,
  392. pHitObj->m_pdispTypeLibWrapper,
  393. pHitObj->m_dwtTimestamp);
  394. }
  395. /*++
  396. * DumpAspAppln
  397. --*/
  398. void DumpAspAppln(void *pvObj, int nVerbosity)
  399. {
  400. // copy Appln from debuggee to debugger
  401. DEFINE_CPP_VAR(CAppln, TheObject);
  402. move(TheObject, pvObj);
  403. CAppln *pAppln = GET_CPP_VAR_PTR(CAppln, TheObject);
  404. char szMBaseKey[256];
  405. move(szMBaseKey, pAppln->m_pszMetabaseKey);
  406. char szApplnPathTranslated[256];
  407. move(szApplnPathTranslated, pAppln->m_pszApplnPath);
  408. char szApplnPath[256];
  409. move(szApplnPath, pAppln->m_pszApplnVRoot);
  410. char szGlobalAsa[256];
  411. move(szGlobalAsa, pAppln->m_pszGlobalAsa);
  412. // terminate strings
  413. szMBaseKey[255] = 0;
  414. szApplnPathTranslated[255] = 0;
  415. szApplnPath[255] = 0;
  416. szGlobalAsa[255] = 0;
  417. // yeehaw! dumpit.
  418. dprintf("Reference Count = %d\n"
  419. "# of Requests = %d\n"
  420. "# of Sessions = %d\n"
  421. "Metabase Key = %s\n"
  422. "Application Root = %s\n"
  423. "Physical Root Path = %s\n"
  424. "global.asa Path = %s\n"
  425. "global.asa Template = %p\n"
  426. "Next Application = %p\n"
  427. "Previous Application = %p\n"
  428. "\n"
  429. "\t-- object pointers --\n"
  430. "\n"
  431. "Application Object List = %p\n"
  432. "Property Collection = %p\n"
  433. "TaggedObjects Collection = %p\n"
  434. "pSessionMgr = %p\n",
  435. pAppln->m_cRefs,
  436. pAppln->m_cRequests,
  437. pAppln->m_cSessions,
  438. szMBaseKey,
  439. szApplnPath,
  440. szApplnPathTranslated,
  441. szGlobalAsa,
  442. pAppln->m_pGlobalTemplate,
  443. pAppln->m_pNext,
  444. pAppln->m_pPrev,
  445. GetObjectList(pAppln->m_pApplCompCol),
  446. pAppln->m_pProperties,
  447. pAppln->m_pTaggedObjects,
  448. pAppln->m_pSessionMgr);
  449. if (nVerbosity >= 1)
  450. dprintf("\n"
  451. "\t--- flags ---\n"
  452. "\n"
  453. "Inited = %s\n"
  454. "FirstRequestRan = %s\n"
  455. "GlobalChanged = %s\n"
  456. "DeleteInProgress = %s\n"
  457. "Tombstone = %s\n"
  458. "DebuggingEnabled = %s\n"
  459. "NotificationAdded = %s\n"
  460. "UseImpersonationHandle = %s\n",
  461. Bool2Str(pAppln->m_fInited),
  462. Bool2Str(pAppln->m_fFirstRequestRan),
  463. Bool2Str(pAppln->m_fGlobalChanged),
  464. Bool2Str(pAppln->m_fDeleteInProgress),
  465. Bool2Str(pAppln->m_fTombstone),
  466. Bool2Str(pAppln->m_fDebuggable),
  467. Bool2Str(pAppln->m_fNotificationAdded),
  468. Bool2Str(pAppln->m_fUseImpersonationHandle));
  469. if (nVerbosity >= 2)
  470. dprintf("\n"
  471. "\t--- kitchen sink---\n"
  472. "\n"
  473. "Viper Activity = %p\n"
  474. "Application Config = %p\n"
  475. "Internal Lock (CS) = %p\n"
  476. "Application Lock (CS) = %p\n"
  477. "Locking thread ID = 0x%X\n"
  478. "Lock Ref Count = %u\n"
  479. "User Impersonation Handle = 0x%p\n"
  480. "pDispTypeLibWrapper = %p\n"
  481. "IDebugApplicationNode = %p\n",
  482. pAppln->m_pActivity,
  483. pAppln->m_pAppConfig,
  484. &pAppln->m_csInternalLock,
  485. &pAppln->m_csApplnLock,
  486. pAppln->m_dwLockThreadID,
  487. pAppln->m_cLockRefCount,
  488. pAppln->m_hUserImpersonation,
  489. pAppln->m_pdispGlobTypeLibWrapper,
  490. pAppln->m_pAppRoot);
  491. }
  492. /*++
  493. * DumpAspSession
  494. --*/
  495. void DumpAspSession(void *pvObj, int nVerbosity)
  496. {
  497. // copy Session from debuggee to debugger
  498. DEFINE_CPP_VAR(CSession, TheObject);
  499. move(TheObject, pvObj);
  500. CSession *pSession = GET_CPP_VAR_PTR(CSession, TheObject);
  501. dprintf("Reference Count = %d\n"
  502. "# of Requests = %d\n"
  503. "Application = %p\n"
  504. "Current HitObj = %p\n"
  505. "Session ID tuple = (0x%X, 0x%X, 0x%X)\n"
  506. "External ID = %d\n"
  507. "\n"
  508. "\t-- object pointers --\n"
  509. "\n"
  510. "Session Object List = %p\n"
  511. "Property Collection = %p\n"
  512. "TaggedObjects Collection = %p\n"
  513. "Request Object = %p\n"
  514. "Response Object = %p\n"
  515. "Server Object = %p\n",
  516. pSession->m_cRefs,
  517. pSession->m_cRequests,
  518. pSession->m_pAppln,
  519. pSession->m_pHitObj,
  520. pSession->m_Id.m_dwId, pSession->m_Id.m_dwR1, pSession->m_Id.m_dwR2,
  521. pSession->m_dwExternId,
  522. GetObjectList(&static_cast<CSession *>(pvObj)->m_SessCompCol),
  523. pSession->m_pProperties,
  524. pSession->m_pTaggedObjects,
  525. &static_cast<CSession *>(pvObj)->m_Request, // OK since we don't dereference ptrs
  526. &static_cast<CSession *>(pvObj)->m_Response,
  527. &static_cast<CSession *>(pvObj)->m_Server);
  528. if (nVerbosity >= 1)
  529. dprintf("\n"
  530. "\t--- flags ---\n"
  531. "\n"
  532. "Inited = %s\n"
  533. "LightWeight = %s\n"
  534. "OnStartFailed = %s\n"
  535. "OnStartInvoked = %s\n"
  536. "OnEndPresent = %s\n"
  537. "TimedOut = %s\n"
  538. "StateAcquired = %s\n"
  539. "CustomTimeout = %s\n"
  540. "Abandoned = %s\n"
  541. "Tombstone = %s\n"
  542. "InTOBucket = %s\n"
  543. "SessCompCol = %s\n",
  544. Bool2Str(pSession->m_fInited),
  545. Bool2Str(pSession->m_fLightWeight),
  546. Bool2Str(pSession->m_fOnStartFailed),
  547. Bool2Str(pSession->m_fOnStartInvoked),
  548. Bool2Str(pSession->m_fOnEndPresent),
  549. Bool2Str(pSession->m_fTimedOut),
  550. Bool2Str(pSession->m_fStateAcquired),
  551. Bool2Str(pSession->m_fCustomTimeout),
  552. Bool2Str(pSession->m_fAbandoned),
  553. Bool2Str(pSession->m_fTombstone),
  554. Bool2Str(pSession->m_fInTOBucket),
  555. Bool2Str(pSession->m_fSessCompCol));
  556. if (nVerbosity >= 2)
  557. dprintf("\n"
  558. "\t--- kitchen sink---\n"
  559. "\n"
  560. "Viper Activity = %p\n"
  561. "Timeout Time = %d\n"
  562. "Current Time = %d\n"
  563. "Code Page = %d\n"
  564. "LCID = %d\n",
  565. &pSession->m_Activity,
  566. pSession->m_dwmTimeoutTime,
  567. pSession->m_nTimeout,
  568. pSession->m_lCodePage,
  569. pSession->m_lcid);
  570. }
  571. /*++
  572. * DumpAspTemplate
  573. --*/
  574. void DumpAspTemplate(void *pvObj, int nVerbosity)
  575. {
  576. static
  577. char *szNone = "<bad value>";
  578. static
  579. char *rgszTransType[16] = { "Undefined", "NotSupported", "Supported", szNone, "Required",
  580. szNone, szNone, szNone, "RequiresNew", szNone, szNone, szNone, szNone, szNone, szNone, szNone };
  581. // copy Template from debuggee to debugger
  582. DEFINE_CPP_VAR(CTemplate, TheObject);
  583. move(TheObject, pvObj);
  584. CTemplate *pTemplate = GET_CPP_VAR_PTR(CTemplate, TheObject);
  585. // get strings
  586. char szPathTranslated[256];
  587. move(szPathTranslated, pTemplate->m_LKHashKey.szPathTranslated);
  588. char szApplnURL[256];
  589. move(szApplnURL, pTemplate->m_szApplnURL);
  590. // terminate strings
  591. szPathTranslated[255] = 0;
  592. szApplnURL[255] = 0;
  593. // yeehaw! dumpit.
  594. dprintf("Template File Name = %s\n"
  595. "Server Instance ID = %d\n"
  596. "Application URL = %s\n"
  597. "Reference Count = %d\n"
  598. "# of Filemaps = %d\n"
  599. "Filemap Ptr Array = %p\n"
  600. "# of Script Engines = %d\n"
  601. "Debug Script Engines = %p\n"
  602. "Compiled Template = %p\n"
  603. "Template Size = %d\n"
  604. "Transacted = %s\n"
  605. "Next Template = %p\n"
  606. "Previous Template = %p\n",
  607. szPathTranslated,
  608. pTemplate->m_LKHashKey.dwInstanceID,
  609. szApplnURL,
  610. pTemplate->m_cRefs,
  611. pTemplate->m_cFilemaps,
  612. pTemplate->m_rgpFilemaps,
  613. pTemplate->m_cScriptEngines,
  614. pTemplate->m_rgpDebugScripts,
  615. pTemplate->m_pbStart,
  616. pTemplate->m_cbTemplate,
  617. rgszTransType[pTemplate->m_ttTransacted & 0x0F],
  618. pTemplate->m_pLinkNext,
  619. pTemplate->m_pLinkPrev);
  620. if (nVerbosity >= 1)
  621. dprintf("\n"
  622. "\t--- flags ---\n"
  623. "\n"
  624. "DebuggerDetachCSInited = %s\n"
  625. "GlobalAsa = %s\n"
  626. "IsValid = %s\n"
  627. "DontCache = %s\n"
  628. "ReadyForUse = %s\n"
  629. "DontAttach = %s\n"
  630. "Session = %s\n"
  631. "Scriptless = %s\n"
  632. "Debuggable = %s\n"
  633. "Zombie = %s\n"
  634. "CodePageSet = %s\n"
  635. "LCIDSet = %s\n",
  636. Bool2Str(pTemplate->m_fDebuggerDetachCSInited),
  637. Bool2Str(pTemplate->m_fGlobalAsa),
  638. Bool2Str(pTemplate->m_fIsValid),
  639. Bool2Str(pTemplate->m_fDontCache),
  640. Bool2Str(pTemplate->m_fReadyForUse),
  641. Bool2Str(pTemplate->m_fDontAttach),
  642. Bool2Str(pTemplate->m_fSession),
  643. Bool2Str(pTemplate->m_fScriptless),
  644. Bool2Str(pTemplate->m_fDebuggable),
  645. Bool2Str(pTemplate->m_fZombie),
  646. Bool2Str(pTemplate->m_fCodePageSet),
  647. Bool2Str(pTemplate->m_fLCIDSet));
  648. if (nVerbosity >= 2)
  649. dprintf("\n"
  650. "\t--- kitchen sink---\n"
  651. "\n"
  652. "hEventReadyForUse = 0x%p\n"
  653. "Connection Pt Obj = %p\n"
  654. "csDebuggerDetach = %p\n"
  655. "List of Doc Nodes = %p (Contents: <%p, %p>)\n"
  656. "pbErrorLocation = %p\n"
  657. "szLastErrorInfo[0] = %s\n"
  658. "szLastErrorInfo[1] = %s\n"
  659. "szLastErrorInfo[2] = %s\n"
  660. "szLastErrorInfo[3] = %s\n"
  661. "szLastErrorInfo[4] = %s\n"
  662. "szLastErrorInfo[5] = %s\n"
  663. "dwLastErrorMask = 0x%X\n"
  664. "hrOnNoCache = 0x%08X\n"
  665. "Code Page = %d\n"
  666. "LCID = %d\n"
  667. "pdispTypeLibWrapper = %p\n",
  668. pTemplate->m_hEventReadyForUse,
  669. &static_cast<CTemplate *>(pvObj)->m_CPTextEvents, // OK since we don't dereference ptrs
  670. &static_cast<CTemplate *>(pvObj)->m_csDebuggerDetach,
  671. &static_cast<CTemplate *>(pvObj)->m_listDocNodes,
  672. pTemplate->m_listDocNodes.m_pLinkNext,
  673. pTemplate->m_listDocNodes.m_pLinkPrev,
  674. pTemplate->m_pbErrorLocation,
  675. pTemplate->m_pszLastErrorInfo[0],
  676. pTemplate->m_pszLastErrorInfo[1],
  677. pTemplate->m_pszLastErrorInfo[2],
  678. pTemplate->m_pszLastErrorInfo[3],
  679. pTemplate->m_pszLastErrorInfo[4],
  680. pTemplate->m_pszLastErrorInfo[5],
  681. pTemplate->m_dwLastErrorMask,
  682. pTemplate->m_hrOnNoCache,
  683. pTemplate->m_wCodePage,
  684. pTemplate->m_lLCID,
  685. pTemplate->m_pdispTypeLibWrapper);
  686. }
  687. /*++
  688. * DumpAspFilemap
  689. --*/
  690. void DumpAspFilemap(void *pvObj, int nVerbosity)
  691. {
  692. // copy Filemap from debuggee to debugger
  693. DEFINE_CPP_VAR(CTemplate::CFileMap, TheObject);
  694. move(TheObject, pvObj);
  695. CTemplate::CFileMap *pFileMap = GET_CPP_VAR_PTR(CTemplate::CFileMap, TheObject);
  696. // get strings
  697. char szPathInfo[256];
  698. move(szPathInfo, pFileMap->m_szPathInfo);
  699. char szPathTranslated[256];
  700. move(szPathTranslated, pFileMap->m_szPathTranslated);
  701. // terminate strings
  702. szPathTranslated[255] = 0;
  703. szPathInfo[255] = 0;
  704. // yeehaw! dumpit.
  705. dprintf("PathInfo = %s\n"
  706. "PathTranslated = %s\n"
  707. "Child Filemap = %p\n"
  708. "%s Filemap = %p\n"
  709. "File Handle = 0x%p\n"
  710. "Map Handle = 0x%p\n"
  711. "File Text = %p\n"
  712. "Include File = %p\n"
  713. "File Size = %d\n",
  714. szPathInfo,
  715. szPathTranslated,
  716. pFileMap->m_pfilemapChild,
  717. pFileMap->m_fHasSibling? "Sibling" : "Parent ", pFileMap->m_pfilemapParent,
  718. pFileMap->m_hFile,
  719. pFileMap->m_hMap,
  720. pFileMap->m_pbStartOfFile,
  721. pFileMap->m_pIncFile,
  722. pFileMap->m_cChars);
  723. if (nVerbosity >= 1)
  724. dprintf("\n"
  725. "\t--- kitchen sink ---\n"
  726. "\n"
  727. "Security Descriptor Size = %d\n"
  728. "Security Descriptor = %p\n"
  729. "Last Write Time = 0x%08X%08X\n"
  730. "DirMon entry = %p\n",
  731. pFileMap->m_dwSecDescSize,
  732. pFileMap->m_pSecurityDescriptor,
  733. pFileMap->m_ftLastWriteTime.dwHighDateTime, pFileMap->m_ftLastWriteTime.dwLowDateTime,
  734. pFileMap->m_pDME);
  735. }
  736. /*++
  737. * DumpAspEngine
  738. --*/
  739. void DumpAspEngine(void *pvObj, int nVerbosity)
  740. {
  741. // copy Engine from debuggee to debugger
  742. DEFINE_CPP_VAR(CActiveScriptEngine, TheObject);
  743. move(TheObject, pvObj);
  744. CActiveScriptEngine *pEng = GET_CPP_VAR_PTR(CActiveScriptEngine, TheObject);
  745. // get strings
  746. char szTemplateName[256];
  747. move(szTemplateName, pEng->m_szTemplateName);
  748. szTemplateName[127] = 0;
  749. char szProglangId[256];
  750. wsprintf(szProglangId,
  751. "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
  752. pEng->m_proglang_id.Data1,
  753. pEng->m_proglang_id.Data2,
  754. pEng->m_proglang_id.Data3,
  755. pEng->m_proglang_id.Data4[0],
  756. pEng->m_proglang_id.Data4[1],
  757. pEng->m_proglang_id.Data4[2],
  758. pEng->m_proglang_id.Data4[3],
  759. pEng->m_proglang_id.Data4[4],
  760. pEng->m_proglang_id.Data4[5],
  761. pEng->m_proglang_id.Data4[6],
  762. pEng->m_proglang_id.Data4[7]);
  763. // terminate strings
  764. szTemplateName[255] = 0;
  765. // yeehaw! dumpit.
  766. dprintf("Template Name = %s\n"
  767. "Instance ID = %d\n"
  768. "Reference Count = %d\n"
  769. "Language ID = %s\n"
  770. "Template = %p\n"
  771. "HitObject = %p\n",
  772. szTemplateName,
  773. pEng->m_dwInstanceID,
  774. pEng->m_cRef,
  775. szProglangId,
  776. pEng->m_pTemplate,
  777. pEng->m_pHitObj);
  778. if (nVerbosity >= 1)
  779. dprintf("\n"
  780. "\t--- flags ---\n"
  781. "\n"
  782. "Inited = %s\n"
  783. "Zombie = %s\n"
  784. "ScriptLoaded = %s\n"
  785. "ObjectsLoaded = %s\n"
  786. "BeingDebugged = %s\n"
  787. "ScriptAborted = %s\n"
  788. "ScriptTimedOut = %s\n"
  789. "ScriptHadError = %s\n"
  790. "Corrupted = %s\n"
  791. "NameAllocated = %s\n",
  792. Bool2Str(pEng->m_fInited),
  793. Bool2Str(pEng->m_fZombie),
  794. Bool2Str(pEng->m_fScriptLoaded),
  795. Bool2Str(pEng->m_fObjectsLoaded),
  796. Bool2Str(pEng->m_fBeingDebugged),
  797. Bool2Str(pEng->m_fScriptAborted),
  798. Bool2Str(pEng->m_fScriptTimedOut),
  799. Bool2Str(pEng->m_fScriptHadError),
  800. Bool2Str(pEng->m_fCorrupted),
  801. Bool2Str(pEng->m_fTemplateNameAllocated));
  802. if (nVerbosity >= 2)
  803. dprintf("\n"
  804. "\t--- interfaces ---\n"
  805. "\n"
  806. "IDispatch = %p\n"
  807. "IActiveScript = %p\n"
  808. "IActiveScriptParse = %p\n"
  809. "IHostInfoUpdate = %p\n"
  810. "\n"
  811. "\t--- kitchen sink ---\n"
  812. "\n"
  813. "LCID = %d\n"
  814. "Time Started = %u\n"
  815. "Source Context = %d\n",
  816. pEng->m_pDisp,
  817. pEng->m_pAS,
  818. pEng->m_pASP,
  819. pEng->m_pHIUpdate,
  820. pEng->m_lcid,
  821. pEng->m_timeStarted,
  822. pEng->m_dwSourceContext);
  823. }
  824. /*++
  825. * DumpAspObject
  826. --*/
  827. void DumpAspObject(void *pvObj, int nVerbosity)
  828. {
  829. static
  830. char *szNone = "<bad value>";
  831. static
  832. char *rgszCompScope[16] = { "Unknown", "Application", "Session", szNone, "Page",
  833. szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone };
  834. static
  835. char *rgszCompType[16] = { "Unknown", "Tagged", "Property", szNone, "Unnamed",
  836. szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone, szNone };
  837. static
  838. char *rgszThreadModel[16] = { "Unknown", "Single", "Apartment", szNone, "Free",
  839. szNone, szNone, szNone, "Both", szNone, szNone, szNone, szNone, szNone, szNone, szNone };
  840. // copy CompColl from debuggee to debugger
  841. DEFINE_CPP_VAR(CComponentObject, TheObject);
  842. move(TheObject, pvObj);
  843. CComponentObject *pObj = GET_CPP_VAR_PTR(CComponentObject, TheObject);
  844. // get strings
  845. wchar_t wszName[128];
  846. move(wszName, pObj->m_pKey);
  847. wszName[127] = 0;
  848. char szVariantOrGUID[256];
  849. if (pObj->m_fVariant)
  850. CreateStringFromVariant(szVariantOrGUID, &pObj->m_Variant, &static_cast<CComponentObject *>(pvObj)->m_Variant);
  851. else
  852. wsprintf(szVariantOrGUID,
  853. "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
  854. pObj->m_ClsId.Data1,
  855. pObj->m_ClsId.Data2,
  856. pObj->m_ClsId.Data3,
  857. pObj->m_ClsId.Data4[0],
  858. pObj->m_ClsId.Data4[1],
  859. pObj->m_ClsId.Data4[2],
  860. pObj->m_ClsId.Data4[3],
  861. pObj->m_ClsId.Data4[4],
  862. pObj->m_ClsId.Data4[5],
  863. pObj->m_ClsId.Data4[6],
  864. pObj->m_ClsId.Data4[7]);
  865. // yeehaw! dumpit.
  866. dprintf("Name = %S\n"
  867. "Scope = %s\n"
  868. "Object Type = %s\n"
  869. "Threading Model = %s\n"
  870. "\n"
  871. "\t--- value ---\n"
  872. "\n"
  873. "VARIANT Value = %s\n"
  874. "Class ID = %s\n"
  875. "IDispatch * = %p\n"
  876. "IUnknown * = %p\n"
  877. "GIP Cookie = 0x%X\n"
  878. "\n"
  879. "\t--- pointers ---\n"
  880. "\n"
  881. "Next Object = %p\n"
  882. "Prev Object = %p\n",
  883. wszName,
  884. rgszCompScope[pObj->m_csScope],
  885. rgszCompType[pObj->m_ctType],
  886. rgszThreadModel[pObj->m_cmModel],
  887. pObj->m_fVariant? szVariantOrGUID : "N/A",
  888. pObj->m_fVariant? "N/A" : szVariantOrGUID,
  889. pObj->m_pDisp,
  890. pObj->m_pUnknown,
  891. pObj->m_dwGIPCookie,
  892. pObj->m_pCompNext,
  893. pObj->m_pCompPrev);
  894. if (nVerbosity >= 1)
  895. dprintf("\n"
  896. "\t--- flags ---\n"
  897. "\n"
  898. "Agile = %s\n"
  899. "OnPageInfoCached = %s\n"
  900. "OnPageStarted = %s\n"
  901. "FailedToInstantiate = %s\n"
  902. "InstantiatedTagged = %s\n"
  903. "InPtrCache = %s\n"
  904. "Variant = %s\n"
  905. "NameAllocated = %s\n",
  906. Bool2Str(pObj->m_fAgile),
  907. Bool2Str(pObj->m_fOnPageInfoCached),
  908. Bool2Str(pObj->m_fOnPageStarted),
  909. Bool2Str(pObj->m_fFailedToInstantiate),
  910. Bool2Str(pObj->m_fInstantiatedTagged),
  911. Bool2Str(pObj->m_fInPtrCache),
  912. Bool2Str(pObj->m_fVariant),
  913. Bool2Str(pObj->m_fNameAllocated));
  914. }
  915. /*++
  916. * ListTemplateCache
  917. *
  918. * Provide condensed object list
  919. --*/
  920. static
  921. void ListTemplateCache()
  922. {
  923. void *pvTemplateCache = reinterpret_cast<void *>(GetExpression("asp!g_TemplateCache"));
  924. if (pvTemplateCache)
  925. {
  926. // Copy Template Cache Stuff
  927. DEFINE_CPP_VAR(CTemplateCacheManager, TheObject);
  928. move(TheObject, pvTemplateCache);
  929. CTemplateCacheManager *pTemplateCache = GET_CPP_VAR_PTR(CTemplateCacheManager, TheObject);
  930. dprintf("%-8s %-4s %s\n", "addr", "id", "file");
  931. dprintf("------------------------------------------------\n");
  932. void *pvList = &static_cast<CTemplateCacheManager *>(pvTemplateCache)->m_pHashTemplates->m_listMemoryTemplates;
  933. void *pvTemplate = pTemplateCache->m_pHashTemplates->m_listMemoryTemplates.m_pLinkNext;
  934. for (int i=0;
  935. i < 2;
  936. i++,
  937. pvList = &static_cast<CTemplateCacheManager *>(pvTemplateCache)->m_pHashTemplates->m_listPersistTemplates,
  938. pvTemplate = pTemplateCache->m_pHashTemplates->m_listPersistTemplates.m_pLinkNext) {
  939. while (pvTemplate != pvList)
  940. {
  941. DEFINE_CPP_VAR(CTemplate, TheObject);
  942. move(TheObject, pvTemplate);
  943. CTemplate *pTemplate = GET_CPP_VAR_PTR(CTemplate, TheObject);
  944. // get name
  945. char szPathTranslated[256];
  946. move(szPathTranslated, pTemplate->m_LKHashKey.szPathTranslated);
  947. dprintf("%p %-4d %s\n", pvTemplate, pTemplate->m_LKHashKey.dwInstanceID, szPathTranslated);
  948. if (CheckControlC())
  949. {
  950. dprintf("\n^C\n");
  951. return;
  952. }
  953. pvTemplate = pTemplate->m_pLinkNext;
  954. }
  955. }
  956. }
  957. }
  958. /*++
  959. * ListAspObjects
  960. *
  961. * Provide condensed object list
  962. --*/
  963. static
  964. void ListAspObjects(void *pvObj, int /* unused */)
  965. {
  966. while (pvObj != NULL)
  967. {
  968. DEFINE_CPP_VAR(CComponentObject, TheObject);
  969. move(TheObject, pvObj);
  970. CComponentObject *pObj = GET_CPP_VAR_PTR(CComponentObject, TheObject);
  971. // get strings
  972. wchar_t wszName[20];
  973. move(wszName, pObj->m_pKey);
  974. wszName[19] = 0;
  975. char szVariantOrGUID[256];
  976. if (pObj->m_fVariant)
  977. CreateStringFromVariant(szVariantOrGUID, &pObj->m_Variant, &static_cast<CComponentObject *>(pvObj)->m_Variant);
  978. else
  979. wsprintf(szVariantOrGUID,
  980. "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
  981. pObj->m_ClsId.Data1,
  982. pObj->m_ClsId.Data2,
  983. pObj->m_ClsId.Data3,
  984. pObj->m_ClsId.Data4[0],
  985. pObj->m_ClsId.Data4[1],
  986. pObj->m_ClsId.Data4[2],
  987. pObj->m_ClsId.Data4[3],
  988. pObj->m_ClsId.Data4[4],
  989. pObj->m_ClsId.Data4[5],
  990. pObj->m_ClsId.Data4[6],
  991. pObj->m_ClsId.Data4[7]);
  992. if (CheckControlC())
  993. {
  994. dprintf("\n^C\n");
  995. return;
  996. }
  997. dprintf("%-10p %-20S %s\n", pvObj, wszName, szVariantOrGUID);
  998. pvObj = pObj->m_pCompNext;
  999. }
  1000. }
  1001. /*++
  1002. * CreateStringFromVariant
  1003. *
  1004. * Print value of a VARIANT structure
  1005. --*/
  1006. void CreateStringFromVariant(char *szOut, const VARIANT *pvarCopy, void *pvDebuggeeVariant)
  1007. {
  1008. const BSTR_BUF_SIZE = 120;
  1009. wchar_t wszBstr[BSTR_BUF_SIZE];
  1010. switch (V_VT(pvarCopy))
  1011. {
  1012. case VT_I4: wsprintf(szOut, "(I4) %d", V_I4(pvarCopy)); break;
  1013. case VT_I2: wsprintf(szOut, "(I2) %d", V_I2(pvarCopy)); break;
  1014. case VT_UI1: wsprintf(szOut, "(UI1) %d", V_UI1(pvarCopy)); break;
  1015. case VT_R4: wsprintf(szOut, "(R4) %g", V_R4(pvarCopy)); break;
  1016. case VT_R8: wsprintf(szOut, "(R4) %g", V_R8(pvarCopy)); break;
  1017. case VT_BOOL: wsprintf(szOut, "(BOOL) %s", V_BOOL(pvarCopy)? "true" : "false"); break;
  1018. case VT_ERROR: wsprintf(szOut, "(ERROR) %08x", V_ERROR(pvarCopy)); break;
  1019. case VT_UNKNOWN: wsprintf(szOut, "(UNKNOWN) %p", V_UNKNOWN(pvarCopy)); break;
  1020. case VT_DISPATCH: wsprintf(szOut, "(DISPATCH) %p", V_UNKNOWN(pvarCopy)); break;
  1021. case VT_BSTR:
  1022. move(wszBstr, V_BSTR(pvarCopy));
  1023. wszBstr[BSTR_BUF_SIZE - 1] = 0;
  1024. wsprintf(szOut, "(BSTR) \"%S\"", wszBstr);
  1025. break;
  1026. default:
  1027. wsprintf(szOut, "VarType: %#04x, Unsupported Type. Please \"dd\" Variant at %p", V_VT(pvarCopy), pvDebuggeeVariant);
  1028. break;
  1029. }
  1030. }
  1031. /*++
  1032. * GetObjectList
  1033. --*/
  1034. void *GetObjectList(CComponentCollection *pDebuggeeCompColl)
  1035. {
  1036. // copy CompColl from debuggee to debugger
  1037. if (pDebuggeeCompColl == NULL)
  1038. return NULL;
  1039. void *pvObjectList;
  1040. MoveWithRet(pvObjectList, &pDebuggeeCompColl->m_pCompFirst, NULL);
  1041. return pvObjectList;
  1042. }