Changeset 30060 in vbox for trunk/src/VBox
- Timestamp:
- Jun 7, 2010 9:30:12 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 62421
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/VMM/DBGFInfo.cpp ¶
r28800 r30060 812 812 813 813 /** 814 * Display several info items. 815 * 816 * This is intended used by the fatal error dump only. 817 * 818 * @returns 819 * @param pVM The VM handle. 820 * @param pszIncludePat Simple string pattern of info items to include. 821 * @param pszExcludePat Simple string pattern of info items to exclude. 822 * @param pszSepFmt Item separator format string. The item name will be 823 * given as parameter. 824 * @param pHlp The output helper functions. If NULL the logger 825 * will be used. 826 * 827 * @threads EMT 828 */ 829 VMMR3DECL(int) DBGFR3InfoMulti(PVM pVM, const char *pszIncludePat, const char *pszExcludePat, const char *pszSepFmt, 830 PCDBGFINFOHLP pHlp) 831 { 832 /* 833 * Validate input. 834 */ 835 VM_ASSERT_EMT_RETURN(pVM, VERR_VM_THREAD_NOT_EMT); 836 AssertPtrReturn(pszIncludePat, VERR_INVALID_POINTER); 837 AssertPtrReturn(pszExcludePat, VERR_INVALID_POINTER); 838 if (pHlp) 839 { 840 AssertPtrReturn(pHlp->pfnPrintf, VERR_INVALID_POINTER); 841 AssertPtrReturn(pHlp->pfnPrintfV, VERR_INVALID_POINTER); 842 } 843 else 844 pHlp = &g_dbgfR3InfoLogHlp; 845 846 size_t const cchIncludePat = strlen(pszIncludePat); 847 size_t const cchExcludePat = strlen(pszExcludePat); 848 const char *pszArgs = ""; 849 850 /* 851 * Enumerate the info handlers and call the ones matching. 852 * Note! We won't leave the critical section here... 853 */ 854 int rc = RTCritSectEnter(&pVM->dbgf.s.InfoCritSect); 855 AssertRC(rc); 856 rc = VWRN_NOT_FOUND; 857 for (PDBGFINFO pInfo = pVM->dbgf.s.pInfoFirst; pInfo; pInfo = pInfo->pNext) 858 { 859 if ( RTStrSimplePatternMultiMatch(pszIncludePat, cchIncludePat, pInfo->szName, pInfo->cchName, NULL) 860 && !RTStrSimplePatternMultiMatch(pszExcludePat, cchExcludePat, pInfo->szName, pInfo->cchName, NULL)) 861 { 862 pHlp->pfnPrintf(pHlp, pszSepFmt, pInfo->szName); 863 rc = VINF_SUCCESS; 864 switch (pInfo->enmType) 865 { 866 case DBGFINFOTYPE_DEV: 867 if (pInfo->fFlags & DBGFINFO_FLAGS_RUN_ON_EMT) 868 rc = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)pInfo->u.Dev.pfnHandler, 3, pInfo->u.Dev.pDevIns, pHlp, pszArgs); 869 else 870 pInfo->u.Dev.pfnHandler(pInfo->u.Dev.pDevIns, pHlp, pszArgs); 871 break; 872 873 case DBGFINFOTYPE_DRV: 874 if (pInfo->fFlags & DBGFINFO_FLAGS_RUN_ON_EMT) 875 rc = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)pInfo->u.Drv.pfnHandler, 3, pInfo->u.Drv.pDrvIns, pHlp, pszArgs); 876 else 877 pInfo->u.Drv.pfnHandler(pInfo->u.Drv.pDrvIns, pHlp, pszArgs); 878 break; 879 880 case DBGFINFOTYPE_INT: 881 if (pInfo->fFlags & DBGFINFO_FLAGS_RUN_ON_EMT) 882 rc = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)pInfo->u.Int.pfnHandler, 3, pVM, pHlp, pszArgs); 883 else 884 pInfo->u.Int.pfnHandler(pVM, pHlp, pszArgs); 885 break; 886 887 case DBGFINFOTYPE_EXT: 888 if (pInfo->fFlags & DBGFINFO_FLAGS_RUN_ON_EMT) 889 rc = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)pInfo->u.Ext.pfnHandler, 3, pInfo->u.Ext.pvUser, pHlp, pszArgs); 890 else 891 pInfo->u.Ext.pfnHandler(pInfo->u.Ext.pvUser, pHlp, pszArgs); 892 break; 893 894 default: 895 AssertMsgFailed(("Invalid info type enmType=%d\n", pInfo->enmType)); 896 rc = VERR_INTERNAL_ERROR; 897 break; 898 } 899 } 900 } 901 int rc2 = RTCritSectLeave(&pVM->dbgf.s.InfoCritSect); 902 AssertRC(rc2); 903 904 return rc; 905 } 906 907 908 /** 814 909 * Enumerate all the register info handlers. 815 910 * -
TabularUnified trunk/src/VBox/VMM/VMMGuruMeditation.cpp ¶
r30056 r30060 483 483 { "mode", "all" }, 484 484 { "cpuid", "verbose" }, 485 { "gdt", NULL }, 486 { "ldt", NULL }, 487 //{ "tss", NULL }, 488 { "ioport", NULL }, 489 { "mmio", NULL }, 490 { "phys", NULL }, 491 //{ "pgmpd", NULL }, - doesn't always work at init time... 485 { "handlers", "phys virt hyper stats" }, 492 486 { "timers", NULL }, 493 487 { "activetimers", NULL }, 494 { "handlers", "phys virt hyper stats" },495 { "cfgm", NULL },496 488 }; 497 489 for (unsigned i = 0; i < RT_ELEMENTS(aInfo); i++) … … 507 499 } 508 500 501 /* All other info items */ 502 DBGFR3InfoMulti(pVM, 503 "*", 504 "mappings|hma|cpum|cpumguest|cpumguestinstr|cpumhyper|cpumhost|mode|cpuid" 505 "|pgmpd|pgmcr3|timers|activetimers|handlers|help", 506 "!!\n" 507 "!! {%s}\n" 508 "!!\n", 509 pHlp); 510 511 509 512 /* done */ 510 513 pHlp->pfnPrintf(pHlp,
Note:
See TracChangeset
for help on using the changeset viewer.