- Timestamp:
- Apr 16, 2012 10:49:17 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PDM.cpp
r40920 r40954 325 325 static DECLCALLBACK(int) pdmR3LoadPrep(PVM pVM, PSSMHANDLE pSSM); 326 326 327 static FNDBGFHANDLERINT pdmR3InfoTracingIds; 327 328 328 329 … … 413 414 if (RT_SUCCESS(rc)) 414 415 { 416 /* 417 * Register the info handlers. 418 */ 419 DBGFR3InfoRegisterInternal(pVM, "pdmtracingids", 420 "Displays the tracing IDs assigned by PDM to devices, USB device, drivers and more.", 421 pdmR3InfoTracingIds); 422 415 423 LogFlow(("PDM: Successfully initialized\n")); 416 424 return rc; … … 2664 2672 } 2665 2673 2674 2675 /** 2676 * Info handler for 'pdmtracingids'. 2677 * 2678 * @param pVM The VM handle. 2679 * @param pHlp The output helpers. 2680 * @param pszArgs The optional user arguments. 2681 * 2682 * @remarks Can be called on most threads. 2683 */ 2684 static DECLCALLBACK(void) pdmR3InfoTracingIds(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 2685 { 2686 /* 2687 * Parse the argument (optional). 2688 */ 2689 if ( *pszArgs 2690 && strcmp(pszArgs, "all") 2691 && strcmp(pszArgs, "devices") 2692 && strcmp(pszArgs, "drivers") 2693 && strcmp(pszArgs, "usb")) 2694 { 2695 pHlp->pfnPrintf(pHlp, "Unable to grok '%s'\n", pszArgs); 2696 return; 2697 } 2698 bool fAll = !*pszArgs || !strcmp(pszArgs, "all"); 2699 bool fDevices = fAll || !strcmp(pszArgs, "devices"); 2700 bool fUsbDevs = fAll || !strcmp(pszArgs, "usb"); 2701 bool fDrivers = fAll || !strcmp(pszArgs, "drivers"); 2702 2703 /* 2704 * Produce the requested output. 2705 */ 2706 /** @todo lock PDM lists! */ 2707 /* devices */ 2708 if (fDevices) 2709 { 2710 pHlp->pfnPrintf(pHlp, "Device tracing IDs:\n"); 2711 for (PPDMDEVINS pDevIns = pVM->pdm.s.pDevInstances; pDevIns; pDevIns = pDevIns->Internal.s.pNextR3) 2712 pHlp->pfnPrintf(pHlp, "%05u %s\n", pDevIns->idTracing, pDevIns->Internal.s.pDevR3->pReg->szName); 2713 } 2714 2715 /* USB devices */ 2716 if (fUsbDevs) 2717 { 2718 pHlp->pfnPrintf(pHlp, "USB device tracing IDs:\n"); 2719 for (PPDMUSBINS pUsbIns = pVM->pdm.s.pUsbInstances; pUsbIns; pUsbIns = pUsbIns->Internal.s.pNext) 2720 pHlp->pfnPrintf(pHlp, "%05u %s\n", pUsbIns->idTracing, pUsbIns->Internal.s.pUsbDev->pReg->szName); 2721 } 2722 2723 /* Drivers */ 2724 if (fDrivers) 2725 { 2726 pHlp->pfnPrintf(pHlp, "Driver tracing IDs:\n"); 2727 for (PPDMDEVINS pDevIns = pVM->pdm.s.pDevInstances; pDevIns; pDevIns = pDevIns->Internal.s.pNextR3) 2728 { 2729 for (PPDMLUN pLun = pDevIns->Internal.s.pLunsR3; pLun; pLun = pLun->pNext) 2730 { 2731 uint32_t iLevel = 0; 2732 for (PPDMDRVINS pDrvIns = pLun->pTop; pDrvIns; pDrvIns = pDrvIns->Internal.s.pDown, iLevel++) 2733 pHlp->pfnPrintf(pHlp, "%05u %s (level %u, lun %u, dev %s)\n", 2734 pDrvIns->idTracing, pDrvIns->Internal.s.pDrv->pReg->szName, 2735 iLevel, pLun->iLun, pDevIns->Internal.s.pDevR3->pReg->szName); 2736 } 2737 } 2738 2739 for (PPDMUSBINS pUsbIns = pVM->pdm.s.pUsbInstances; pUsbIns; pUsbIns = pUsbIns->Internal.s.pNext) 2740 { 2741 for (PPDMLUN pLun = pUsbIns->Internal.s.pLuns; pLun; pLun = pLun->pNext) 2742 { 2743 uint32_t iLevel = 0; 2744 for (PPDMDRVINS pDrvIns = pLun->pTop; pDrvIns; pDrvIns = pDrvIns->Internal.s.pDown, iLevel++) 2745 pHlp->pfnPrintf(pHlp, "%05u %s (level %u, lun %u, dev %s)\n", 2746 pDrvIns->idTracing, pDrvIns->Internal.s.pDrv->pReg->szName, 2747 iLevel, pLun->iLun, pUsbIns->Internal.s.pUsbDev->pReg->szName); 2748 } 2749 } 2750 } 2751 } 2752
Note:
See TracChangeset
for help on using the changeset viewer.