Changeset 35606 in vbox
- Timestamp:
- Jan 18, 2011 2:04:34 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/dbgf.h
r35601 r35606 1404 1404 typedef DBGFREGENTRY const *PCDBGFREGENTRY; 1405 1405 1406 /** Used with DBGFR3Reg* to indicate the hypervisor register set instead of the 1407 * guest. */ 1408 #define DBGFREG_HYPER_VMCPUID UINT32_C(0x01000000) 1409 1406 1410 VMMR3DECL(int) DBGFR3RegCpuQueryU8( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint8_t *pu8); 1407 1411 VMMR3DECL(int) DBGFR3RegCpuQueryU16( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint16_t *pu16); … … 1411 1415 VMMR3DECL(int) DBGFR3RegCpuQueryLrd( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, long double *plrd); 1412 1416 VMMR3DECL(int) DBGFR3RegCpuQueryXdtr(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint64_t *pu64Base, uint16_t *pu16Limit); 1417 #if 0 1413 1418 VMMR3DECL(int) DBGFR3RegCpuQueryBatch(PVM pVM,VMCPUID idCpu, PDBGFREGENTRY paRegs, size_t cRegs); 1414 1419 VMMR3DECL(int) DBGFR3RegCpuQueryAll( PVM pVM, VMCPUID idCpu, PDBGFREGENTRY paRegs, size_t cRegs); … … 1421 1426 VMMR3DECL(int) DBGFR3RegCpuSetLrd( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, long double lrd); 1422 1427 VMMR3DECL(int) DBGFR3RegCpuSetBatch( PVM pVM, VMCPUID idCpu, PCDBGFREGENTRY paRegs, size_t cRegs); 1428 #endif 1423 1429 1424 1430 VMMR3DECL(const char *) DBGFR3RegCpuName(PVM pVM, DBGFREG enmReg, DBGFREGVALTYPE enmType); 1425 1431 1426 1432 VMMR3_INT_DECL(int) DBGFR3RegRegisterCpu(PVM pVM, PVMCPU pVCpu, PCDBGFREGDESC paRegisters, bool fGuestRegs); 1427 VMMR3DECL(int) DBGFR3RegRegisterDevice(PVM pVM, PCDBGFREGDESC paRegisters, PPDMDEVINS pDevIns, const char *pszPrefix, uint32_t iInstance);1433 VMMR3DECL(int) DBGFR3RegRegisterDevice(PVM pVM, PCDBGFREGDESC paRegisters, PPDMDEVINS pDevIns, const char *pszPrefix, uint32_t iInstance); 1428 1434 1429 1435 /** … … 1455 1461 VMMR3DECL(int) DBGFR3RegNmQueryAllCount(PVM pVM, size_t *pcRegs); 1456 1462 VMMR3DECL(int) DBGFR3RegNmQueryAll( PVM pVM, PDBGFREGENTRYNM paRegs, size_t cRegs); 1457 VMMR3DECL(int) DBGFR3RegNmPrintf( PVM pVM, VMCPUID idDefCpu, char *pszBuf, size_t cbBuf, const char *pszFormat, ...);1458 VMMR3DECL(int) DBGFR3RegNmPrintfV( PVM pVM, VMCPUID idDefCpu, char *pszBuf, size_t cbBuf, const char *pszFormat, va_list va);1459 1463 1460 1464 VMMR3DECL(int) DBGFR3RegNmSetU8( PVM pVM, VMCPUID idDefCpu, const char *pszReg, uint8_t u8); … … 1467 1471 1468 1472 /** @todo add enumeration methods. */ 1473 1474 VMMR3DECL(int) DBGFR3RegPrintf( PVM pVM, VMCPUID idDefCpu, char *pszBuf, size_t cbBuf, const char *pszFormat, ...); 1475 VMMR3DECL(int) DBGFR3RegPrintfV(PVM pVM, VMCPUID idDefCpu, char *pszBuf, size_t cbBuf, const char *pszFormat, va_list va); 1469 1476 1470 1477 -
trunk/src/VBox/VMM/VMMR3/DBGFReg.cpp
r35601 r35606 178 178 /** The target CPU. */ 179 179 VMCPUID idCpu; 180 /** Set if we're looking at guest registers. */ 181 bool fGuestRegs; 180 182 /** The output buffer. */ 181 183 char *pszBuf; … … 784 786 * @param enmReg The register to query. 785 787 * @param enmType The desired return type. 788 * @param fGuestRegs Query guest CPU registers if set (true), 789 * hypervisor CPU registers if clear (false). 786 790 * @param pValue Where to return the register value. 787 791 */ 788 static DECLCALLBACK(int) dbgfR3RegCpuQueryWorker(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, DBGFREGVALTYPE enmType, PDBGFREGVAL pValue) 792 static DECLCALLBACK(int) dbgfR3RegCpuQueryWorkerOnCpu(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, DBGFREGVALTYPE enmType, 793 bool fGuestRegs, PDBGFREGVAL pValue) 789 794 { 790 795 int rc = VINF_SUCCESS; … … 794 799 * Look up the register set of the specified CPU. 795 800 */ 796 PDBGFREGSET pSet = pVM->aCpus[idCpu].dbgf.s.pGuestRegSet; 801 PDBGFREGSET pSet = fGuestRegs 802 ? pVM->aCpus[idCpu].dbgf.s.pGuestRegSet 803 : pVM->aCpus[idCpu].dbgf.s.pHyperRegSet; 797 804 if (RT_LIKELY(pSet)) 798 805 { … … 830 837 831 838 /** 832 * Queries a 8-bit CPU register value. 833 * 834 * @retval VINF_SUCCESS 835 * @retval VERR_INVALID_VM_HANDLE 836 * @retval VERR_INVALID_CPU_ID 837 * @retval VERR_DBGF_REGISTER_NOT_FOUND 838 * @retval VERR_DBGF_UNSUPPORTED_CAST 839 * @retval VINF_DBGF_TRUNCATED_REGISTER 840 * 841 * @param pVM The VM handle. 842 * @param idCpu The target CPU ID. 843 * @param enmReg The register that's being queried. 844 * @param pu8 Where to store the register value. 845 */ 846 VMMR3DECL(int) DBGFR3RegCpuQueryU8(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint8_t *pu8) 847 { 848 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 849 AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID); 850 851 DBGFREGVAL Value; 852 int rc = VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3RegCpuQueryWorker, 5, pVM, idCpu, enmReg, DBGFREGVALTYPE_U8, &Value); 853 if (RT_SUCCESS(rc)) 854 *pu8 = Value.u8; 855 else 856 *pu8 = 0; 857 858 return rc; 859 } 860 861 862 /** 863 * Queries a 16-bit CPU register value. 864 * 839 * Internal worker for the CPU register query functions. 840 * 841 * @returns VBox status code. 865 842 * @retval VINF_SUCCESS 866 843 * @retval VERR_INVALID_VM_HANDLE … … 872 849 * 873 850 * @param pVM The VM handle. 874 * @param idCpu The target CPU ID. 851 * @param idCpu The virtual CPU ID. Can be OR'ed with 852 * DBGFREG_HYPER_VMCPUID. 853 * @param enmReg The register to query. 854 * @param enmType The desired return type. 855 * @param pValue Where to return the register value. 856 */ 857 static int dbgfR3RegCpuQueryWorker(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, DBGFREGVALTYPE enmType, PDBGFREGVAL pValue) 858 { 859 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 860 AssertMsgReturn(enmReg >= DBGFREG_AL && enmReg <= DBGFREG_END, ("%d\n", enmReg), VERR_INVALID_PARAMETER); 861 862 bool const fGuestRegs = idCpu & DBGFREG_HYPER_VMCPUID; 863 idCpu &= ~DBGFREG_HYPER_VMCPUID; 864 AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID); 865 866 return VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3RegCpuQueryWorkerOnCpu, 6, 867 pVM, idCpu, enmReg, enmType, fGuestRegs, pValue); 868 } 869 870 871 /** 872 * Queries a 8-bit CPU register value. 873 * 874 * @retval VINF_SUCCESS 875 * @retval VERR_INVALID_VM_HANDLE 876 * @retval VERR_INVALID_CPU_ID 877 * @retval VERR_DBGF_REGISTER_NOT_FOUND 878 * @retval VERR_DBGF_UNSUPPORTED_CAST 879 * @retval VINF_DBGF_TRUNCATED_REGISTER 880 * 881 * @param pVM The VM handle. 882 * @param idCpu The target CPU ID. Can be OR'ed with 883 * DBGFREG_HYPER_VMCPUID. 875 884 * @param enmReg The register that's being queried. 876 * @param pu16 Where to store the register value. 877 */ 878 VMMR3DECL(int) DBGFR3RegCpuQueryU16(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint16_t *pu16) 879 { 880 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 881 AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID); 882 885 * @param pu8 Where to store the register value. 886 */ 887 VMMR3DECL(int) DBGFR3RegCpuQueryU8(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint8_t *pu8) 888 { 883 889 DBGFREGVAL Value; 884 int rc = VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3RegCpuQueryWorker, 5, pVM, idCpu, enmReg, DBGFREGVALTYPE_U16, &Value);890 int rc = dbgfR3RegCpuQueryWorker(pVM, idCpu, enmReg, DBGFREGVALTYPE_U8, &Value); 885 891 if (RT_SUCCESS(rc)) 886 *pu 16 = Value.u16;892 *pu8 = Value.u8; 887 893 else 888 *pu16 = 0; 889 894 *pu8 = 0; 890 895 return rc; 891 896 } … … 893 898 894 899 /** 895 * Queries a 32-bit CPU register value.900 * Queries a 16-bit CPU register value. 896 901 * 897 902 * @retval VINF_SUCCESS … … 904 909 * 905 910 * @param pVM The VM handle. 906 * @param idCpu The target CPU ID. 911 * @param idCpu The target CPU ID. Can be OR'ed with 912 * DBGFREG_HYPER_VMCPUID. 907 913 * @param enmReg The register that's being queried. 908 * @param pu32 Where to store the register value. 909 */ 910 VMMR3DECL(int) DBGFR3RegCpuQueryU32(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint32_t *pu32) 911 { 912 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 913 AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID); 914 914 * @param pu16 Where to store the register value. 915 */ 916 VMMR3DECL(int) DBGFR3RegCpuQueryU16(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint16_t *pu16) 917 { 915 918 DBGFREGVAL Value; 916 int rc = VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3RegCpuQueryWorker, 5, pVM, idCpu, enmReg, DBGFREGVALTYPE_U32, &Value);919 int rc = dbgfR3RegCpuQueryWorker(pVM, idCpu, enmReg, DBGFREGVALTYPE_U16, &Value); 917 920 if (RT_SUCCESS(rc)) 918 *pu 32 = Value.u32;921 *pu16 = Value.u16; 919 922 else 920 *pu32 = 0; 921 923 *pu16 = 0; 922 924 return rc; 923 925 } … … 925 927 926 928 /** 927 * Queries a 64-bit CPU register value.929 * Queries a 32-bit CPU register value. 928 930 * 929 931 * @retval VINF_SUCCESS … … 936 938 * 937 939 * @param pVM The VM handle. 938 * @param idCpu The target CPU ID. 940 * @param idCpu The target CPU ID. Can be OR'ed with 941 * DBGFREG_HYPER_VMCPUID. 942 * @param enmReg The register that's being queried. 943 * @param pu32 Where to store the register value. 944 */ 945 VMMR3DECL(int) DBGFR3RegCpuQueryU32(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint32_t *pu32) 946 { 947 DBGFREGVAL Value; 948 int rc = dbgfR3RegCpuQueryWorker(pVM, idCpu, enmReg, DBGFREGVALTYPE_U32, &Value); 949 if (RT_SUCCESS(rc)) 950 *pu32 = Value.u32; 951 else 952 *pu32 = 0; 953 return rc; 954 } 955 956 957 /** 958 * Queries a 64-bit CPU register value. 959 * 960 * @retval VINF_SUCCESS 961 * @retval VERR_INVALID_VM_HANDLE 962 * @retval VERR_INVALID_CPU_ID 963 * @retval VERR_DBGF_REGISTER_NOT_FOUND 964 * @retval VERR_DBGF_UNSUPPORTED_CAST 965 * @retval VINF_DBGF_TRUNCATED_REGISTER 966 * @retval VINF_DBGF_ZERO_EXTENDED_REGISTER 967 * 968 * @param pVM The VM handle. 969 * @param idCpu The target CPU ID. Can be OR'ed with 970 * DBGFREG_HYPER_VMCPUID. 939 971 * @param enmReg The register that's being queried. 940 972 * @param pu64 Where to store the register value. … … 942 974 VMMR3DECL(int) DBGFR3RegCpuQueryU64(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint64_t *pu64) 943 975 { 944 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE);945 AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID);946 947 976 DBGFREGVAL Value; 948 int rc = VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3RegCpuQueryWorker, 5,pVM, idCpu, enmReg, DBGFREGVALTYPE_U64, &Value);977 int rc = dbgfR3RegCpuQueryWorker(pVM, idCpu, enmReg, DBGFREGVALTYPE_U64, &Value); 949 978 if (RT_SUCCESS(rc)) 950 979 *pu64 = Value.u64; 951 980 else 952 981 *pu64 = 0; 953 954 982 return rc; 955 983 } 956 984 985 #if 0 /* rewrite / remove */ 957 986 958 987 /** … … 1043 1072 * 1044 1073 * @param pVM The VM handle. 1045 * @param idCpu The target CPU ID. 1074 * @param idCpu The target CPU ID. Can be OR'ed with 1075 * DBGFREG_HYPER_VMCPUID. 1046 1076 * @param paRegs Pointer to an array of @a cRegs elements. On 1047 1077 * input the enmReg members indicates which … … 1078 1108 * 1079 1109 * @param pVM The VM handle. 1080 * @param idCpu The target CPU ID. 1110 * @param idCpu The target CPU ID. Can be OR'ed with 1111 * DBGFREG_HYPER_VMCPUID. 1081 1112 * @param paRegs Pointer to an array of @a cRegs elements. 1082 1113 * These will be filled with the CPU register … … 1114 1145 } 1115 1146 1116 1147 #endif /* rewrite or remove? */ 1117 1148 1118 1149 /** … … 1193 1224 * @param idDefCpu The default CPU ID set. 1194 1225 * @param pszReg The register name. 1195 */ 1196 static PCDBGFREGLOOKUP dbgfR3RegResolve(PVM pVM, VMCPUID idDefCpu, const char *pszReg) 1226 * @param fGuestRegs Default to guest CPU registers if set, the 1227 * hypervisor CPU registers if clear. 1228 */ 1229 static PCDBGFREGLOOKUP dbgfR3RegResolve(PVM pVM, VMCPUID idDefCpu, const char *pszReg, bool fGuestRegs) 1197 1230 { 1198 1231 DBGF_REG_DB_LOCK_READ(pVM); … … 1213 1246 { 1214 1247 /* Prefix it with the specified CPU set. */ 1215 size_t cchCpuSet = RTStrPrintf(szName, sizeof(szName), "cpu%u.", idDefCpu);1248 size_t cchCpuSet = RTStrPrintf(szName, sizeof(szName), fGuestRegs ? "cpu%u." : "hypercpu%u.", idDefCpu); 1216 1249 dbgfR3RegCopyToLower(pszReg, RTSTR_MAX, &szName[cchCpuSet], sizeof(szName) - cchCpuSet); 1217 1250 pLookupRec = (PCDBGFREGLOOKUP)RTStrSpaceGet(&pVM->dbgf.s.RegSpace, szName); … … 1345 1378 * @param pVM The VM handle. 1346 1379 * @param idDefCpu The virtual CPU ID for the default CPU register 1347 * set. 1380 * set. Can be OR'ed with DBGFREG_HYPER_VMCPUID. 1348 1381 * @param pszReg The register to query. 1349 1382 * @param enmType The desired return type. … … 1359 1392 */ 1360 1393 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 1361 AssertReturn( idDefCpu< pVM->cCpus || idDefCpu == VMCPUID_ANY, VERR_INVALID_CPU_ID);1394 AssertReturn((idDefCpu & ~DBGFREG_HYPER_VMCPUID) < pVM->cCpus || idDefCpu == VMCPUID_ANY, VERR_INVALID_CPU_ID); 1362 1395 AssertPtrReturn(pszReg, VERR_INVALID_POINTER); 1363 1396 … … 1368 1401 * Resolve the register and call the getter on the relevant CPU. 1369 1402 */ 1370 PCDBGFREGLOOKUP pLookupRec = dbgfR3RegResolve(pVM, idDefCpu, pszReg); 1403 bool const fGuestRegs = !(idDefCpu & DBGFREG_HYPER_VMCPUID) && idDefCpu != VMCPUID_ANY; 1404 PCDBGFREGLOOKUP pLookupRec = dbgfR3RegResolve(pVM, idDefCpu, pszReg, fGuestRegs); 1371 1405 if (pLookupRec) 1372 1406 { 1373 1407 if (pLookupRec->pSet->enmType == DBGFREGSETTYPE_CPU) 1374 1408 idDefCpu = pLookupRec->pSet->uUserArg.pVCpu->idCpu; 1409 else if (idDefCpu != VMCPUID_ANY) 1410 idDefCpu &= ~DBGFREG_HYPER_VMCPUID; 1375 1411 return VMR3ReqCallWait(pVM, idDefCpu, (PFNRT)dbgfR3RegNmQueryWorkerOnCpu, 5, pVM, pLookupRec, enmType, pValue, penmType); 1376 1412 } … … 1389 1425 * @param pVM The VM handle. 1390 1426 * @param idDefCpu The default target CPU ID, VMCPUID_ANY if not 1391 * applicable. 1427 * applicable. Can be OR'ed with 1428 * DBGFREG_HYPER_VMCPUID. 1392 1429 * @param pszReg The register that's being queried. Except for 1393 1430 * CPU registers, this must be on the form … … 1414 1451 * @param pVM The VM handle. 1415 1452 * @param idDefCpu The default target CPU ID, VMCPUID_ANY if not 1416 * applicable. 1453 * applicable. Can be OR'ed with 1454 * DBGFREG_HYPER_VMCPUID. 1417 1455 * @param pszReg The register that's being queried. Except for 1418 1456 * CPU registers, this must be on the form … … 1445 1483 * @param pVM The VM handle. 1446 1484 * @param idDefCpu The default target CPU ID, VMCPUID_ANY if not 1447 * applicable. 1485 * applicable. Can be OR'ed with 1486 * DBGFREG_HYPER_VMCPUID. 1448 1487 * @param pszReg The register that's being queried. Except for 1449 1488 * CPU registers, this must be on the form … … 1476 1515 * @param pVM The VM handle. 1477 1516 * @param idDefCpu The default target CPU ID, VMCPUID_ANY if not 1478 * applicable. 1517 * applicable. Can be OR'ed with 1518 * DBGFREG_HYPER_VMCPUID. 1479 1519 * @param pszReg The register that's being queried. Except for 1480 1520 * CPU registers, this must be on the form … … 1507 1547 * @param pVM The VM handle. 1508 1548 * @param idDefCpu The default target CPU ID, VMCPUID_ANY if not 1509 * applicable. 1549 * applicable. Can be OR'ed with 1550 * DBGFREG_HYPER_VMCPUID. 1510 1551 * @param pszReg The register that's being queried. Except for 1511 1552 * CPU registers, this must be on the form … … 1538 1579 * @param pVM The VM handle. 1539 1580 * @param idDefCpu The default target CPU ID, VMCPUID_ANY if not 1540 * applicable. 1581 * applicable. Can be OR'ed with 1582 * DBGFREG_HYPER_VMCPUID. 1541 1583 * @param pszReg The register that's being queried. Except for 1542 1584 * CPU registers, this must be on the form … … 1570 1612 * @param pVM The VM handle. 1571 1613 * @param idDefCpu The default target CPU ID, VMCPUID_ANY if not 1572 * applicable. 1614 * applicable. Can be OR'ed with 1615 * DBGFREG_HYPER_VMCPUID. 1573 1616 * @param pszReg The register that's being queried. Except for 1574 1617 * CPU registers, this must be on the form … … 1602 1645 * @param pVM The VM handle. 1603 1646 * @param idDefCpu The default target CPU ID, VMCPUID_ANY if not 1604 * applicable. 1647 * applicable. Can be OR'ed with 1648 * DBGFREG_HYPER_VMCPUID. 1605 1649 * @param pszReg The register that's being queried. Except for 1606 1650 * CPU registers, this must be on the form … … 2083 2127 * The end and length of the register. 2084 2128 */ 2085 const char *pszEnd = strchr( &pachReg[3], '}');2129 const char *pszEnd = strchr(pachReg, '}'); 2086 2130 AssertMsgReturn(pszEnd, ("Missing closing curly bracket: '%s'\n", pszFormat), 0); 2087 2131 size_t const cchReg = pszEnd - pachReg; … … 2105 2149 { 2106 2150 /* Prefix it with the specified CPU set. */ 2107 size_t cchCpuSet = RTStrPrintf(szName, sizeof(szName), "cpu%u.", pThis->idCpu);2151 size_t cchCpuSet = RTStrPrintf(szName, sizeof(szName), pThis->fGuestRegs ? "cpu%u." : "hypercpu%u.", pThis->idCpu); 2108 2152 dbgfR3RegCopyToLower(pachReg, cchReg, &szName[cchCpuSet], sizeof(szName) - cchCpuSet); 2109 2153 pLookupRec = (PCDBGFREGLOOKUP)RTStrSpaceGet(&pThis->pVM->dbgf.s.RegSpace, szName); … … 2206 2250 * @param va Other format arguments. 2207 2251 */ 2208 VMMR3DECL(int) DBGFR3Reg NmPrintfV(PVM pVM, VMCPUID idCpu, char *pszBuf, size_t cbBuf, const char *pszFormat, va_list va)2252 VMMR3DECL(int) DBGFR3RegPrintfV(PVM pVM, VMCPUID idCpu, char *pszBuf, size_t cbBuf, const char *pszFormat, va_list va) 2209 2253 { 2210 2254 AssertPtrReturn(pszBuf, VERR_INVALID_POINTER); … … 2213 2257 2214 2258 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 2215 AssertReturn( idCpu< pVM->cCpus || idCpu == VMCPUID_ANY, VERR_INVALID_CPU_ID);2259 AssertReturn((idCpu & ~DBGFREG_HYPER_VMCPUID) < pVM->cCpus || idCpu == VMCPUID_ANY, VERR_INVALID_CPU_ID); 2216 2260 AssertPtrReturn(pszFormat, VERR_INVALID_POINTER); 2217 2261 … … 2222 2266 DBGFR3REGNMPRINTFARGS Args; 2223 2267 Args.pVM = pVM; 2224 Args.idCpu = idCpu; 2268 Args.idCpu = idCpu != VMCPUID_ANY ? idCpu & ~DBGFREG_HYPER_VMCPUID : idCpu; 2269 Args.fGuestRegs = idCpu != VMCPUID_ANY && !(idCpu & DBGFREG_HYPER_VMCPUID); 2225 2270 Args.pszBuf = pszBuf; 2226 2271 Args.pszFormat = pszFormat; … … 2229 2274 Args.cchLeftBuf = cbBuf - 1; 2230 2275 Args.rc = VINF_SUCCESS; 2231 int rc = VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3RegNmPrintfWorkerOnCpu, 1, &Args);2276 int rc = VMR3ReqCallWait(pVM, Args.idCpu, (PFNRT)dbgfR3RegNmPrintfWorkerOnCpu, 1, &Args); 2232 2277 va_end(Args.va); 2233 2278 return rc; … … 2253 2298 * @param ... Other format arguments. 2254 2299 */ 2255 VMMR3DECL(int) DBGFR3Reg NmPrintf(PVM pVM, VMCPUID idCpu, char *pszBuf, size_t cbBuf, const char *pszFormat, ...)2300 VMMR3DECL(int) DBGFR3RegPrintf(PVM pVM, VMCPUID idCpu, char *pszBuf, size_t cbBuf, const char *pszFormat, ...) 2256 2301 { 2257 2302 va_list va; 2258 2303 va_start(va, pszFormat); 2259 int rc = DBGFR3Reg NmPrintfV(pVM, idCpu, pszBuf, cbBuf, pszFormat, va);2304 int rc = DBGFR3RegPrintfV(pVM, idCpu, pszBuf, cbBuf, pszFormat, va); 2260 2305 va_end(va); 2261 2306 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.