Changeset 35410 in vbox for trunk/include/VBox
- Timestamp:
- Jan 5, 2011 5:21:11 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 69275
- Location:
- trunk/include/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/err.h
r35184 r35410 277 277 * For setters this means that the value is narrower than the register. */ 278 278 #define VINF_DBGF_ZERO_EXTENDED_REGISTER 1212 279 /** The requested type conversion was not supported. */ 280 #define VERR_DBGF_UNSUPPORTED_CAST (-1213) 279 281 /** @} */ 280 282 -
trunk/include/VBox/types.h
r34021 r35410 1021 1021 typedef const struct DBGFINFOHLP *PCDBGFINFOHLP; 1022 1022 1023 /** Pointer to a const register descriptor. */ 1024 typedef struct DBGFREGDESC const *PCDBGFREGDESC; 1025 1023 1026 1024 1027 /** Configuration manager tree node - A key. */ -
trunk/include/VBox/vmm/dbgf.h
r35361 r35410 1243 1243 } DBGFREGVALTYPE; 1244 1244 1245 /** 1246 * A generic register value type. 1247 */ 1248 typedef union DBGFREGVAL 1249 { 1250 uint8_t u8; /**< The 8-bit view. */ 1251 uint16_t u16; /**< The 16-bit view. */ 1252 uint32_t u32; /**< The 32-bit view. */ 1253 uint64_t u64; /**< The 64-bit view. */ 1254 RTUINT128U u128; /**< The 128-bit view. */ 1255 long double lrd; /**< The long double view. */ 1256 /** GDTR or LDTR (DBGFREGVALTYPE_DTR). */ 1257 struct 1258 { 1259 /** The table address. */ 1260 uint64_t u64Base; 1261 /** The table limit (length minus 1). */ 1262 uint32_t u32Limit; 1263 } dtr; 1264 1265 uint8_t au8[16]; /**< The 8-bit array view. */ 1266 uint16_t au16[8]; /**< The 16-bit array view. */ 1267 uint32_t au32[4]; /**< The 32-bit array view. */ 1268 uint64_t au64[2]; /**< The 64-bit array view. */ 1269 RTUINT128U u; 1270 } DBGFREGVAL; 1271 /** Pointer to a generic register value type. */ 1272 typedef DBGFREGVAL *PDBGFREGVAL; 1273 /** Pointer to a const generic register value type. */ 1274 typedef DBGFREGVAL const *PCDBGFREGVAL; 1275 1276 1277 /** 1278 * Register sub-field descriptor. 1279 */ 1280 typedef struct DBGFREGSUBFIELD 1281 { 1282 /** The name of the sub-field. NULL is used to terminate the array. */ 1283 const char *pszName; 1284 /** The index of the first bit. */ 1285 uint8_t iFirstBit; 1286 /** The number of bits. */ 1287 uint8_t cBits; 1288 /** The shift count. */ 1289 int8_t cShift; 1290 /** Sub-field flags, DBGFREGSUBFIELD_FLAGS_XXX. */ 1291 uint8_t fFlags; 1292 /** Getter (optional). */ 1293 DECLCALLBACKMEMBER(int, pfnGet)(void *pvUser, struct DBGFREGSUBFIELD const *pSubField, PRTUINT128U puValue); 1294 /** Setter (optional). */ 1295 DECLCALLBACKMEMBER(int, pfnSet)(void *pvUser, struct DBGFREGSUBFIELD const *pSubField, RTUINT128U uValue, RTUINT128U fMask); 1296 } DBGFREGSUBFIELD; 1297 /** Pointer to a const register sub-field descriptor. */ 1298 typedef DBGFREGSUBFIELD const *PCDBGFREGSUBFIELD; 1299 1300 /** @name DBGFREGSUBFIELD_FLAGS_XXX 1301 * @{ */ 1302 /** The sub-field is read-only. */ 1303 #define DBGFREGSUBFIELD_FLAGS_READ_ONLY UINT8_C(0x01) 1304 /** @} */ 1305 1306 1307 /** 1308 * Register alias descriptor. 1309 */ 1310 typedef struct DBGFREGALIAS 1311 { 1312 /** The alias name. NULL is used to terminate the array. */ 1313 const char *pszName; 1314 /** Set to a valid type if the alias has a different type. */ 1315 DBGFREGVALTYPE enmType; 1316 } DBGFREGALIAS; 1317 /** Pointer to a const register alias descriptor. */ 1318 typedef DBGFREGALIAS const *PCDBGFREGALIAS; 1319 1320 /** 1321 * Register descriptor. 1322 */ 1323 typedef struct DBGFREGDESC 1324 { 1325 /** The normal register name. */ 1326 const char *pszName; 1327 /** The register identifier if this is a CPU register. */ 1328 DBGFREG enmReg; 1329 /** The default register type. */ 1330 DBGFREGVALTYPE enmType; 1331 /** Flags, see DBGFREG_FLAGS_XXX. */ 1332 uint32_t fFlags; 1333 /** The internal register indicator. 1334 * For CPU registers this is the offset into the CPUMCTX structure, 1335 * thuse the 'off' prefix. */ 1336 uint32_t offRegister; 1337 /** Getter. */ 1338 DECLCALLBACKMEMBER(int, pfnGet)(void *pvUser, struct DBGFREGDESC const *pDesc, PDBGFREGVAL puValue); 1339 /** Setter. */ 1340 DECLCALLBACKMEMBER(int, pfnSet)(void *pvUser, struct DBGFREGDESC const *pDesc, PCDBGFREGVAL puValue, PCDBGFREGVAL pfMask); 1341 /** Aliases (optional). */ 1342 PCDBGFREGALIAS paAliases; 1343 /** Sub fields (optional). */ 1344 PCDBGFREGSUBFIELD paSubFields; 1345 } DBGFREGDESC; 1346 1347 /** @name DBGFREG_FLAGS_XXX 1348 * @{ */ 1349 /** The register is read-only. */ 1350 #define DBGFREG_FLAGS_READ_ONLY RT_BIT_32(0) 1351 /** @} */ 1352 1353 1354 1245 1355 1246 1356 /** … … 1254 1364 DBGFREGVALTYPE enmType; 1255 1365 /** The register value. The valid view is indicated by enmType. */ 1256 union DBGFREGVAL 1257 { 1258 uint8_t u8; /**< The 8-bit view. */ 1259 uint16_t u16; /**< The 16-bit view. */ 1260 uint32_t u32; /**< The 32-bit view. */ 1261 uint64_t u64; /**< The 64-bit view. */ 1262 uint128_t u128; /**< The 128-bit view. */ 1263 long double lrd; /**< The long double view. */ 1264 /** GDTR or LDTR (DBGFREGVALTYPE_DTR). */ 1265 struct 1266 { 1267 /** The table address. */ 1268 uint64_t u64Base; 1269 /** The table limit (length minus 1). */ 1270 uint32_t u32Limit; 1271 } dtr; 1272 1273 uint8_t au8[16]; /**< The 8-bit array view. */ 1274 uint16_t au16[8]; /**< The 16-bit array view. */ 1275 uint32_t au32[4]; /**< The 32-bit array view. */ 1276 uint64_t au64[2]; /**< The 64-bit array view. */ 1277 RTUINT128U u; 1278 } Val; 1366 DBGFREGVAL Val; 1279 1367 } DBGFREGENTRY; 1280 1368 /** Pointer to a register entry in a batch operation. */ … … 1283 1371 typedef DBGFREGENTRY const *PCDBGFREGENTRY; 1284 1372 1285 VMMR3DECL(int) DBGFR3RegQueryU8( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint8_t *pu8); 1286 VMMR3DECL(int) DBGFR3RegQueryU16( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint16_t *pu16); 1287 VMMR3DECL(int) DBGFR3RegQueryU32( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint32_t *pu32); 1288 VMMR3DECL(int) DBGFR3RegQueryU64( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint64_t *pu64); 1289 VMMR3DECL(int) DBGFR3RegQueryU128(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint128_t *pu128); 1290 VMMR3DECL(int) DBGFR3RegQueryLrd( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, long double *plrd); 1291 VMMR3DECL(int) DBGFR3RegQueryXdtr(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint64_t *pu64Base, uint16_t *pu16Limit); 1292 VMMR3DECL(int) DBGFR3RegQueryBatch(PVM pVM,VMCPUID idCpu, PDBGFREGENTRY paRegs, size_t cRegs); 1293 VMMR3DECL(int) DBGFR3RegQueryAll( PVM pVM, VMCPUID idCpu, PDBGFREGENTRY paRegs, size_t cRegs); 1294 1295 VMMR3DECL(int) DBGFR3RegSetU8( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint8_t u8); 1296 VMMR3DECL(int) DBGFR3RegSetU16( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint16_t u16); 1297 VMMR3DECL(int) DBGFR3RegSetU32( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint32_t u32); 1298 VMMR3DECL(int) DBGFR3RegSetU64( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint64_t u64); 1299 VMMR3DECL(int) DBGFR3RegSetU128( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint128_t u128); 1300 VMMR3DECL(int) DBGFR3RegSetLrd( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, long double lrd); 1301 VMMR3DECL(int) DBGFR3RegSetBatch( PVM pVM, VMCPUID idCpu, PCDBGFREGENTRY paRegs, size_t cbRegs); 1302 1303 VMMR3DECL(const char *) DBGFR3RegName(DBGFREG enmReg, DBGFREGVALTYPE enmType); 1373 VMMR3DECL(int) DBGFR3RegCpuQueryU8( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint8_t *pu8); 1374 VMMR3DECL(int) DBGFR3RegCpuQueryU16( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint16_t *pu16); 1375 VMMR3DECL(int) DBGFR3RegCpuQueryU32( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint32_t *pu32); 1376 VMMR3DECL(int) DBGFR3RegCpuQueryU64( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint64_t *pu64); 1377 VMMR3DECL(int) DBGFR3RegCpuQueryU128(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint128_t *pu128); 1378 VMMR3DECL(int) DBGFR3RegCpuQueryLrd( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, long double *plrd); 1379 VMMR3DECL(int) DBGFR3RegCpuQueryXdtr(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint64_t *pu64Base, uint16_t *pu16Limit); 1380 VMMR3DECL(int) DBGFR3RegCpuQueryBatch(PVM pVM,VMCPUID idCpu, PDBGFREGENTRY paRegs, size_t cRegs); 1381 VMMR3DECL(int) DBGFR3RegCpuQueryAll( PVM pVM, VMCPUID idCpu, PDBGFREGENTRY paRegs, size_t cRegs); 1382 1383 VMMR3DECL(int) DBGFR3RegCpuSetU8( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint8_t u8); 1384 VMMR3DECL(int) DBGFR3RegCpuSetU16( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint16_t u16); 1385 VMMR3DECL(int) DBGFR3RegCpuSetU32( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint32_t u32); 1386 VMMR3DECL(int) DBGFR3RegCpuSetU64( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint64_t u64); 1387 VMMR3DECL(int) DBGFR3RegCpuSetU128( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint128_t u128); 1388 VMMR3DECL(int) DBGFR3RegCpuSetLrd( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, long double lrd); 1389 VMMR3DECL(int) DBGFR3RegCpuSetBatch( PVM pVM, VMCPUID idCpu, PCDBGFREGENTRY paRegs, size_t cRegs); 1390 1391 VMMR3DECL(const char *) DBGFR3RegCpuName(DBGFREG enmReg, DBGFREGVALTYPE enmType); 1392 1393 /** 1394 * Entry in a named batch query or set operation. 1395 */ 1396 typedef struct DBGFREGENTRYNM 1397 { 1398 /** The register name. */ 1399 const char *pszName; 1400 /** The size of the value in bytes. */ 1401 DBGFREGVALTYPE enmType; 1402 /** The register value. The valid view is indicated by enmType. */ 1403 DBGFREGVAL Val; 1404 } DBGFREGENTRYNM; 1405 /** Pointer to a named register entry in a batch operation. */ 1406 typedef DBGFREGENTRYNM *PDBGFREGENTRYNM; 1407 /** Pointer to a const named register entry in a batch operation. */ 1408 typedef DBGFREGENTRYNM const *PCDBGFREGENTRYNM; 1409 1410 VMMR3DECL(int) DBGFR3RegNmQueryU8( PVM pVM, VMCPUID idCpu, const char *pszReg, uint8_t *pu8); 1411 VMMR3DECL(int) DBGFR3RegNmQueryU16( PVM pVM, VMCPUID idCpu, const char *pszReg, uint16_t *pu16); 1412 VMMR3DECL(int) DBGFR3RegNmQueryU32( PVM pVM, VMCPUID idCpu, const char *pszReg, uint32_t *pu32); 1413 VMMR3DECL(int) DBGFR3RegNmQueryU64( PVM pVM, VMCPUID idCpu, const char *pszReg, uint64_t *pu64); 1414 VMMR3DECL(int) DBGFR3RegNmQueryU128(PVM pVM, VMCPUID idCpu, const char *pszReg, uint128_t *pu128); 1415 VMMR3DECL(int) DBGFR3RegNmQueryLrd( PVM pVM, VMCPUID idCpu, const char *pszReg, long double *plrd); 1416 VMMR3DECL(int) DBGFR3RegNmQueryXdtr(PVM pVM, VMCPUID idCpu, const char *pszReg, uint64_t *pu64Base, uint16_t *pu16Limit); 1417 VMMR3DECL(int) DBGFR3RegNmQueryBatch(PVM pVM,VMCPUID idCpu, DBGFREGENTRYNM paRegs, size_t cRegs); 1418 /** @todo VMMR3DECL(int) DBGFR3RegNmQueryAll( PVM pVM, VMCPUID idCpu, DBGFREGENTRYNM paRegs, size_t cRegs)? */ 1419 VMMR3DECL(int) DBGFR3RegNmPrintf( PVM pVM, VMCPUID idCpu, char pszBuf, size_t cbBuf, const char *pszFormat, ...); 1420 VMMR3DECL(int) DBGFR3RegNmPrintfV( PVM pVM, VMCPUID idCpu, char pszBuf, size_t cbBuf, const char *pszFormat, ...); 1421 1422 VMMR3DECL(int) DBGFR3RegNmSetU8( PVM pVM, VMCPUID idCpu, const char *pszReg, uint8_t u8); 1423 VMMR3DECL(int) DBGFR3RegNmSetU16( PVM pVM, VMCPUID idCpu, const char *pszReg, uint16_t u16); 1424 VMMR3DECL(int) DBGFR3RegNmSetU32( PVM pVM, VMCPUID idCpu, const char *pszReg, uint32_t u32); 1425 VMMR3DECL(int) DBGFR3RegNmSetU64( PVM pVM, VMCPUID idCpu, const char *pszReg, uint64_t u64); 1426 VMMR3DECL(int) DBGFR3RegNmSetU128( PVM pVM, VMCPUID idCpu, const char *pszReg, uint128_t u128); 1427 VMMR3DECL(int) DBGFR3RegNmSetLrd( PVM pVM, VMCPUID idCpu, const char *pszReg, long double lrd); 1428 VMMR3DECL(int) DBGFR3RegNmSetBatch( PVM pVM, VMCPUID idCpu, DBGFREGENTRYNM paRegs, size_t cRegs); 1429 1430 /** @todo add enumeration methods. */ 1304 1431 1305 1432 -
trunk/include/VBox/vmm/mm.h
r35361 r35410 68 68 MM_TAG_DBGF_MODULE, 69 69 MM_TAG_DBGF_OS, 70 MM_TAG_DBGF_REG, 70 71 MM_TAG_DBGF_STACK, 71 72 MM_TAG_DBGF_SYMBOL,
Note:
See TracChangeset
for help on using the changeset viewer.