Changeset 35625 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Jan 19, 2011 11:17:34 AM (14 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUMDbg.cpp
r35601 r35625 1105 1105 CPU_REG_XMM(15), 1106 1106 CPU_REG_RW_AS("gdtr_base", GDTR_BASE, U64, gdtr.pGdt, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 1107 CPU_REG_RW_AS("gdtr_lim it",GDTR_LIMIT, U16, gdtr.cbGdt, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ),1107 CPU_REG_RW_AS("gdtr_lim", GDTR_LIMIT, U16, gdtr.cbGdt, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 1108 1108 CPU_REG_RW_AS("idtr_base", IDTR_BASE, U64, idtr.pIdt, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 1109 CPU_REG_RW_AS("idtr_lim it",IDTR_LIMIT, U16, idtr.cbIdt, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ),1109 CPU_REG_RW_AS("idtr_lim", IDTR_LIMIT, U16, idtr.cbIdt, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 1110 1110 CPU_REG_SEG(LDTR, ldtr), 1111 1111 CPU_REG_SEG(TR, tr), 1112 CPU_REG_EX_AS("cr0", CR0, U32, 0, cpumR3RegGstGet_crX, cpumR3RegGstSet_crX,g_aCpumRegAliases_cr0, g_aCpumRegFields_cr0 ),1113 CPU_REG_EX_AS("cr2", CR2, U64, 2, cpumR3RegGstGet_crX, cpumR3RegGstSet_crX,NULL, NULL ),1114 CPU_REG_EX_AS("cr3", CR3, U64, 3, cpumR3RegGstGet_crX, cpumR3RegGstSet_crX,NULL, g_aCpumRegFields_cr3 ),1115 CPU_REG_EX_AS("cr4", CR4, U32, 4, cpumR3RegGstGet_crX, cpumR3RegGstSet_crX,NULL, g_aCpumRegFields_cr4 ),1116 CPU_REG_EX_AS("cr8", CR8, U32, 8, cpumR3RegGstGet_crX, cpumR3RegGstSet_crX,NULL, NULL ),1117 CPU_REG_EX_AS("dr0", DR0, U64, 0, cpumR3RegGstGet_drX, cpumR3RegGstSet_drX,NULL, NULL ),1118 CPU_REG_EX_AS("dr1", DR1, U64, 1, cpumR3RegGstGet_drX, cpumR3RegGstSet_drX,NULL, NULL ),1119 CPU_REG_EX_AS("dr2", DR2, U64, 2, cpumR3RegGstGet_drX, cpumR3RegGstSet_drX,NULL, NULL ),1120 CPU_REG_EX_AS("dr3", DR3, U64, 3, cpumR3RegGstGet_drX, cpumR3RegGstSet_drX,NULL, NULL ),1121 CPU_REG_EX_AS("dr6", DR6, U32, 6, cpumR3RegGstGet_drX, cpumR3RegGstSet_drX,NULL, g_aCpumRegFields_dr6 ),1122 CPU_REG_EX_AS("dr7", DR7, U32, 7, cpumR3RegGstGet_drX, cpumR3RegGstSet_drX,NULL, g_aCpumRegFields_dr7 ),1112 CPU_REG_EX_AS("cr0", CR0, U32, 0, cpumR3RegGstGet_crX, cpumR3RegGstSet_crX, g_aCpumRegAliases_cr0, g_aCpumRegFields_cr0 ), 1113 CPU_REG_EX_AS("cr2", CR2, U64, 2, cpumR3RegGstGet_crX, cpumR3RegGstSet_crX, NULL, NULL ), 1114 CPU_REG_EX_AS("cr3", CR3, U64, 3, cpumR3RegGstGet_crX, cpumR3RegGstSet_crX, NULL, g_aCpumRegFields_cr3 ), 1115 CPU_REG_EX_AS("cr4", CR4, U32, 4, cpumR3RegGstGet_crX, cpumR3RegGstSet_crX, NULL, g_aCpumRegFields_cr4 ), 1116 CPU_REG_EX_AS("cr8", CR8, U32, 8, cpumR3RegGstGet_crX, cpumR3RegGstSet_crX, NULL, NULL ), 1117 CPU_REG_EX_AS("dr0", DR0, U64, 0, cpumR3RegGstGet_drX, cpumR3RegGstSet_drX, NULL, NULL ), 1118 CPU_REG_EX_AS("dr1", DR1, U64, 1, cpumR3RegGstGet_drX, cpumR3RegGstSet_drX, NULL, NULL ), 1119 CPU_REG_EX_AS("dr2", DR2, U64, 2, cpumR3RegGstGet_drX, cpumR3RegGstSet_drX, NULL, NULL ), 1120 CPU_REG_EX_AS("dr3", DR3, U64, 3, cpumR3RegGstGet_drX, cpumR3RegGstSet_drX, NULL, NULL ), 1121 CPU_REG_EX_AS("dr6", DR6, U32, 6, cpumR3RegGstGet_drX, cpumR3RegGstSet_drX, NULL, g_aCpumRegFields_dr6 ), 1122 CPU_REG_EX_AS("dr7", DR7, U32, 7, cpumR3RegGstGet_drX, cpumR3RegGstSet_drX, NULL, g_aCpumRegFields_dr7 ), 1123 1123 CPU_REG_MSR("apic_base", IA32_APICBASE, U32, g_aCpumRegFields_apic_base ), 1124 1124 CPU_REG_MSR("pat", IA32_CR_PAT, U64, g_aCpumRegFields_cr_pat ), … … 1233 1233 CPU_REG_XMM(15), 1234 1234 CPU_REG_RW_AS("gdtr_base", GDTR_BASE, U64, gdtr.pGdt, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 1235 CPU_REG_RW_AS("gdtr_lim it",GDTR_LIMIT, U16, gdtr.cbGdt, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ),1235 CPU_REG_RW_AS("gdtr_lim", GDTR_LIMIT, U16, gdtr.cbGdt, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 1236 1236 CPU_REG_RW_AS("idtr_base", IDTR_BASE, U64, idtr.pIdt, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 1237 CPU_REG_RW_AS("idtr_lim it",IDTR_LIMIT, U16, idtr.cbIdt, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ),1237 CPU_REG_RW_AS("idtr_lim", IDTR_LIMIT, U16, idtr.cbIdt, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 1238 1238 CPU_REG_SEG(LDTR, ldtr), 1239 1239 CPU_REG_SEG(TR, tr), -
trunk/src/VBox/VMM/VMMR3/DBGFReg.cpp
r35609 r35625 169 169 170 170 /** 171 * Argument packet passed by DBGFR3Reg NmPrintfV to dbgfR3RegNmPrintfCbOutput172 * and dbgfR3RegNmPrintfCbFormat.173 */ 174 typedef struct DBGFR3REG NMPRINTFARGS171 * Argument packet passed by DBGFR3RegPrintfV to dbgfR3RegPrintfCbOutput and 172 * dbgfR3RegPrintfCbFormat. 173 */ 174 typedef struct DBGFR3REGPRINTFARGS 175 175 { 176 176 /** The VM handle. */ … … 194 194 * subsequent ones are suppressed. */ 195 195 int rc; 196 } DBGFR3REG NMPRINTFARGS;197 /** Pointer to a DBGFR3Reg NmPrintfV argument packet. */198 typedef DBGFR3REG NMPRINTFARGS *PDBGFR3REGNMPRINTFARGS;196 } DBGFR3REGPRINTFARGS; 197 /** Pointer to a DBGFR3RegPrintfV argument packet. */ 198 typedef DBGFR3REGPRINTFARGS *PDBGFR3REGPRINTFARGS; 199 199 200 200 … … 1259 1259 /** 1260 1260 * On CPU worker for the register queries, used by dbgfR3RegNmQueryWorker and 1261 * dbgfR3Reg NmPrintfCbFormatNormal.1261 * dbgfR3RegPrintfCbFormatNormal. 1262 1262 * 1263 1263 * @returns VBox status code. … … 1840 1840 1841 1841 1842 VMMR3DECL(int) DBGFR3RegNmSet(PVM pVM, VMCPUID idDefCpu, const char *pszReg, PCDBGFREGVAL pValue, DBGFREGVALTYPE enmType) 1843 { 1844 return VERR_NOT_IMPLEMENTED; 1845 } 1846 1847 1842 1848 /** 1843 1849 * Internal worker for DBGFR3RegFormatValue, cbTmp is sufficent. … … 1905 1911 { 1906 1912 /* 1907 * Format to temporary buffer using worker shared with dbgfR3Reg NmPrintfCbFormatNormal.1913 * Format to temporary buffer using worker shared with dbgfR3RegPrintfCbFormatNormal. 1908 1914 */ 1909 1915 char szTmp[160]; … … 1971 1977 */ 1972 1978 static size_t 1973 dbgfR3Reg NmPrintfCbFormatField(PDBGFR3REGNMPRINTFARGS pThis, PFNRTSTROUTPUT pfnOutput, void *pvArgOutput,1974 1979 dbgfR3RegPrintfCbFormatField(PDBGFR3REGPRINTFARGS pThis, PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, 1980 PCDBGFREGLOOKUP pLookupRec, int cchWidth, int cchPrecision, unsigned fFlags) 1975 1981 { 1976 1982 char szTmp[160]; … … 2064 2070 */ 2065 2071 static size_t 2066 dbgfR3Reg NmPrintfCbFormatNormal(PDBGFR3REGNMPRINTFARGS pThis, PFNRTSTROUTPUT pfnOutput, void *pvArgOutput,2067 2072 dbgfR3RegPrintfCbFormatNormal(PDBGFR3REGPRINTFARGS pThis, PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, 2073 PCDBGFREGLOOKUP pLookupRec, unsigned uBase, int cchWidth, int cchPrecision, unsigned fFlags) 2068 2074 { 2069 2075 char szTmp[160]; … … 2100 2106 */ 2101 2107 static DECLCALLBACK(size_t) 2102 dbgfR3Reg NmPrintfCbFormat(void *pvArg, PFNRTSTROUTPUT pfnOutput, void *pvArgOutput,2103 2104 2108 dbgfR3RegPrintfCbFormat(void *pvArg, PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, 2109 const char **ppszFormat, va_list *pArgs, int cchWidth, 2110 int cchPrecision, unsigned fFlags, char chArgSize) 2105 2111 { 2106 2112 /* 2107 2113 * Parse the format type and hand the job to the appropriate worker. 2108 2114 */ 2109 PDBGFR3REG NMPRINTFARGS pThis = (PDBGFR3REGNMPRINTFARGS)pvArg;2115 PDBGFR3REGPRINTFARGS pThis = (PDBGFR3REGPRINTFARGS)pvArg; 2110 2116 const char *pszFormat = *ppszFormat; 2111 2117 if ( pszFormat[0] != 'V' … … 2173 2179 case 'R': /* %VR{} */ 2174 2180 case 'X': /* %VRX{} */ 2175 return dbgfR3Reg NmPrintfCbFormatNormal(pThis, pfnOutput, pvArgOutput, pLookupRec,2176 2181 return dbgfR3RegPrintfCbFormatNormal(pThis, pfnOutput, pvArgOutput, pLookupRec, 2182 16, cchWidth, cchPrecision, fFlags); 2177 2183 case 'U': 2178 return dbgfR3Reg NmPrintfCbFormatNormal(pThis, pfnOutput, pvArgOutput, pLookupRec,2179 2184 return dbgfR3RegPrintfCbFormatNormal(pThis, pfnOutput, pvArgOutput, pLookupRec, 2185 10, cchWidth, cchPrecision, fFlags); 2180 2186 case 'O': 2181 return dbgfR3Reg NmPrintfCbFormatNormal(pThis, pfnOutput, pvArgOutput, pLookupRec,2182 2187 return dbgfR3RegPrintfCbFormatNormal(pThis, pfnOutput, pvArgOutput, pLookupRec, 2188 8, cchWidth, cchPrecision, fFlags); 2183 2189 case 'B': 2184 return dbgfR3Reg NmPrintfCbFormatNormal(pThis, pfnOutput, pvArgOutput, pLookupRec,2185 2190 return dbgfR3RegPrintfCbFormatNormal(pThis, pfnOutput, pvArgOutput, pLookupRec, 2191 2, cchWidth, cchPrecision, fFlags); 2186 2192 case 'F': 2187 return dbgfR3Reg NmPrintfCbFormatField(pThis, pfnOutput, pvArgOutput, pLookupRec, cchWidth, cchPrecision, fFlags);2193 return dbgfR3RegPrintfCbFormatField(pThis, pfnOutput, pvArgOutput, pLookupRec, cchWidth, cchPrecision, fFlags); 2188 2194 default: 2189 2195 AssertFailed(); … … 2198 2204 */ 2199 2205 static DECLCALLBACK(size_t) 2200 dbgfR3Reg NmPrintfCbOutput(void *pvArg, const char *pachChars, size_t cbChars)2201 { 2202 PDBGFR3REG NMPRINTFARGS pArgs = (PDBGFR3REGNMPRINTFARGS)pvArg;2206 dbgfR3RegPrintfCbOutput(void *pvArg, const char *pachChars, size_t cbChars) 2207 { 2208 PDBGFR3REGPRINTFARGS pArgs = (PDBGFR3REGPRINTFARGS)pvArg; 2203 2209 size_t cbToCopy = cbChars; 2204 2210 if (cbToCopy >= pArgs->cchLeftBuf) … … 2220 2226 2221 2227 /** 2222 * On CPU worker for the register formatting, used by DBGFR3Reg NmPrintfV.2228 * On CPU worker for the register formatting, used by DBGFR3RegPrintfV. 2223 2229 * 2224 2230 * @returns VBox status code. … … 2226 2232 * @param pArgs The argument package and state. 2227 2233 */ 2228 static DECLCALLBACK(int) dbgfR3Reg NmPrintfWorkerOnCpu(PDBGFR3REGNMPRINTFARGS pArgs)2234 static DECLCALLBACK(int) dbgfR3RegPrintfWorkerOnCpu(PDBGFR3REGPRINTFARGS pArgs) 2229 2235 { 2230 2236 DBGF_REG_DB_LOCK_READ(pArgs->pVM); 2231 RTStrFormatV(dbgfR3Reg NmPrintfCbOutput, pArgs, dbgfR3RegNmPrintfCbFormat, pArgs, pArgs->pszFormat, pArgs->va);2237 RTStrFormatV(dbgfR3RegPrintfCbOutput, pArgs, dbgfR3RegPrintfCbFormat, pArgs, pArgs->pszFormat, pArgs->va); 2232 2238 DBGF_REG_DB_UNLOCK_READ(pArgs->pVM); 2233 2239 return pArgs->rc; … … 2264 2270 * specified CPU. 2265 2271 */ 2266 DBGFR3REG NMPRINTFARGS Args;2272 DBGFR3REGPRINTFARGS Args; 2267 2273 Args.pVM = pVM; 2268 2274 Args.idCpu = idCpu != VMCPUID_ANY ? idCpu & ~DBGFREG_HYPER_VMCPUID : idCpu; … … 2274 2280 Args.cchLeftBuf = cbBuf - 1; 2275 2281 Args.rc = VINF_SUCCESS; 2276 int rc = VMR3ReqCallWait(pVM, Args.idCpu, (PFNRT)dbgfR3Reg NmPrintfWorkerOnCpu, 1, &Args);2282 int rc = VMR3ReqCallWait(pVM, Args.idCpu, (PFNRT)dbgfR3RegPrintfWorkerOnCpu, 1, &Args); 2277 2283 va_end(Args.va); 2278 2284 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.