DBGFReg.cpp revision 8deff8528b8bc4b5c7c7cbbaae04f5112a88777c
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync * DBGF - Debugger Facility, Register Methods.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * Copyright (C) 2010-2011 Oracle Corporation
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync * available from http://www.virtualbox.org. This file is free software;
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync * you can redistribute it and/or modify it under the terms of the GNU
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync * General Public License (GPL) as published by the Free Software
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync/*******************************************************************************
85c594c1140f082dd862abde9dc7825137a3d51avboxsync* Header Files *
85c594c1140f082dd862abde9dc7825137a3d51avboxsync*******************************************************************************/
b29e03c9044019d9c77222336e8f8616052824f5vboxsync/*******************************************************************************
87b2fb3f8283472ba7010aedbf2b4dc12302155cvboxsync* Defined Constants And Macros *
87b2fb3f8283472ba7010aedbf2b4dc12302155cvboxsync*******************************************************************************/
11a862be79fe123488bccca60c06e92cdbfec6e8vboxsync/** Locks the register database for writing. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync int rcSem = RTSemRWRequestWrite((pVM)->dbgf.s.hRegDbLock, RT_INDEFINITE_WAIT); \
85c594c1140f082dd862abde9dc7825137a3d51avboxsync } while (0)
463d00559e51c6e08ccc9f5a77d2ee6d122b6e8cvboxsync/** Unlocks the register database after writing. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync int rcSem = RTSemRWReleaseWrite((pVM)->dbgf.s.hRegDbLock); \
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync } while (0)
463d00559e51c6e08ccc9f5a77d2ee6d122b6e8cvboxsync/** Locks the register database for reading. */
463d00559e51c6e08ccc9f5a77d2ee6d122b6e8cvboxsync int rcSem = RTSemRWRequestRead((pVM)->dbgf.s.hRegDbLock, RT_INDEFINITE_WAIT); \
8ab60c04baaf509b2aaae2a260adaf1281aaac03vboxsync } while (0)
8ab60c04baaf509b2aaae2a260adaf1281aaac03vboxsync/** Unlocks the register database after reading. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync int rcSem = RTSemRWReleaseRead((pVM)->dbgf.s.hRegDbLock); \
85c594c1140f082dd862abde9dc7825137a3d51avboxsync } while (0)
34822e8b7d00c04a0bc98c0d1a565a00d9bb1fd9vboxsync/** The max length of a set, register or sub-field name. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync/*******************************************************************************
34822e8b7d00c04a0bc98c0d1a565a00d9bb1fd9vboxsync* Structures and Typedefs *
507ebf9b3b77c84000a55645867db6617b5324bcvboxsync*******************************************************************************/
34822e8b7d00c04a0bc98c0d1a565a00d9bb1fd9vboxsync * Register set registration record type.
507ebf9b3b77c84000a55645867db6617b5324bcvboxsync /** Invalid zero value. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync /** CPU record. */
34822e8b7d00c04a0bc98c0d1a565a00d9bb1fd9vboxsync /** Device record. */
34822e8b7d00c04a0bc98c0d1a565a00d9bb1fd9vboxsync /** End of valid record types. */
507ebf9b3b77c84000a55645867db6617b5324bcvboxsync * Register set registration record.
507ebf9b3b77c84000a55645867db6617b5324bcvboxsynctypedef struct DBGFREGSET
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync /** String space core. */
507ebf9b3b77c84000a55645867db6617b5324bcvboxsync /** The registration record type. */
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync /** The user argument for the callbacks. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync /** The CPU view. */
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync /** The device view. */
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync /** The general view. */
fde449f361029c75f9bf28f145bd1ba7b36a9c77vboxsync /** The register descriptors. */
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync /** The number of register descriptors. */
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync /** Array of lookup records. */
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync /** The number of lookup records. */
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync /** The register name prefix. */
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync/** Pointer to a register registration record. */
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync/** Pointer to a const register registration record. */
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync * Register lookup record.
85c594c1140f082dd862abde9dc7825137a3d51avboxsync /** The string space core. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync /** Pointer to the set. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync /** Pointer to the register descriptor. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync /** If an alias this points to the alias descriptor, NULL if not. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync /** If a sub-field this points to the sub-field descriptor, NULL if not. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync/** Pointer to a register lookup record. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync/** Pointer to a const register lookup record. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync * Initializes the register database.
85c594c1140f082dd862abde9dc7825137a3d51avboxsync * @returns VBox status code.
85c594c1140f082dd862abde9dc7825137a3d51avboxsync * @param pVM The VM handle.
85c594c1140f082dd862abde9dc7825137a3d51avboxsync * Terminates the register database.
85c594c1140f082dd862abde9dc7825137a3d51avboxsync * @param pVM The VM handle.
85c594c1140f082dd862abde9dc7825137a3d51avboxsync * Validates a register name.
85c594c1140f082dd862abde9dc7825137a3d51avboxsync * This is used for prefixes, aliases and field names.
85c594c1140f082dd862abde9dc7825137a3d51avboxsync * @returns true if valid, false if not.
999b9efb1c9a95fee642550c525ca0cf7c6f07b5vboxsync * @param pszName The register name to validate.
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsyncstatic bool dbgfR3RegIsNameValid(const char *pszName)
eb5d68001efb9346c3341aa46f2871b973b47107vboxsync return false;
999b9efb1c9a95fee642550c525ca0cf7c6f07b5vboxsync return false;
eb5d68001efb9346c3341aa46f2871b973b47107vboxsync return false;
999b9efb1c9a95fee642550c525ca0cf7c6f07b5vboxsync return true;
999b9efb1c9a95fee642550c525ca0cf7c6f07b5vboxsync * Common worker for registering a register set.
eb5d68001efb9346c3341aa46f2871b973b47107vboxsync * @returns VBox status code.
999b9efb1c9a95fee642550c525ca0cf7c6f07b5vboxsync * @param pVM The VM handle.
999b9efb1c9a95fee642550c525ca0cf7c6f07b5vboxsync * @param paRegisters The register descriptors.
eb5d68001efb9346c3341aa46f2871b973b47107vboxsync * @param enmType The set type.
999b9efb1c9a95fee642550c525ca0cf7c6f07b5vboxsync * @param pvUserArg The user argument for the callbacks.
999b9efb1c9a95fee642550c525ca0cf7c6f07b5vboxsync * @param pszPrefix The name prefix.
eb5d68001efb9346c3341aa46f2871b973b47107vboxsync * @param iInstance The instance number to be appended to @a
999b9efb1c9a95fee642550c525ca0cf7c6f07b5vboxsync * pszPrefix when creating the set name.
eb5d68001efb9346c3341aa46f2871b973b47107vboxsyncstatic int dbgfR3RegRegisterCommon(PVM pVM, PCDBGFREGDESC paRegisters, DBGFREGSETTYPE enmType, void *pvUserArg, const char *pszPrefix, uint32_t iInstance)
eb5d68001efb9346c3341aa46f2871b973b47107vboxsync * Validate input.
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync /* The name components. */
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync AssertMsgReturn(dbgfR3RegIsNameValid(pszPrefix), ("%s\n", pszPrefix), VERR_INVALID_NAME);
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync bool const fNeedUnderscore = RT_C_IS_DIGIT(psz[-1]);
fde449f361029c75f9bf28f145bd1ba7b36a9c77vboxsync size_t const cchPrefix = psz - pszPrefix + fNeedUnderscore;
6edb4183bc898fddcd0987b6c5c3903b8246fe45vboxsync AssertMsgReturn(cchPrefix < RT_SIZEOFMEMB(DBGFREGSET, szPrefix) - 4 - 1, ("%s\n", pszPrefix), VERR_INVALID_NAME);
fde449f361029c75f9bf28f145bd1ba7b36a9c77vboxsync AssertMsgReturn(iInstance <= 9999, ("%d\n", iInstance), VERR_INVALID_NAME);
6edb4183bc898fddcd0987b6c5c3903b8246fe45vboxsync /* The descriptors. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync for (iDesc = 0; paRegisters[iDesc].pszName != NULL; iDesc++)
e38719852d98638514dba23fbacf53ad11361d6avboxsync AssertMsgReturn(dbgfR3RegIsNameValid(paRegisters[iDesc].pszName), ("%s (#%u)\n", paRegisters[iDesc].pszName, iDesc), VERR_INVALID_NAME);
eb5d68001efb9346c3341aa46f2871b973b47107vboxsync AssertMsgReturn((unsigned)paRegisters[iDesc].enmReg == iDesc && iDesc < (unsigned)DBGFREG_END,
eb5d68001efb9346c3341aa46f2871b973b47107vboxsync ("%d iDesc=%d\n", paRegisters[iDesc].enmReg, iDesc),
eb5d68001efb9346c3341aa46f2871b973b47107vboxsync AssertReturn(paRegisters[iDesc].enmReg == DBGFREG_END, VERR_INVALID_PARAMETER);
eb5d68001efb9346c3341aa46f2871b973b47107vboxsync AssertReturn( paRegisters[iDesc].enmType > DBGFREGVALTYPE_INVALID
eb5d68001efb9346c3341aa46f2871b973b47107vboxsync && paRegisters[iDesc].enmType < DBGFREGVALTYPE_END, VERR_INVALID_PARAMETER);
3598f07e0e71a448a04d478320a9ca6314160ff6vboxsync AssertMsgReturn(paRegisters[iDesc].fFlags & ~DBGFREG_FLAGS_READ_ONLY,
3598f07e0e71a448a04d478320a9ca6314160ff6vboxsync AssertPtrReturn(paRegisters[iDesc].pfnGet, VERR_INVALID_PARAMETER);
85c594c1140f082dd862abde9dc7825137a3d51avboxsync AssertPtrReturn(paRegisters[iDesc].pfnSet, VERR_INVALID_PARAMETER);
85c594c1140f082dd862abde9dc7825137a3d51avboxsync PCDBGFREGALIAS paAliases = paRegisters[iDesc].paAliases;
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync AssertPtrReturn(paAliases, VERR_INVALID_PARAMETER);
34822e8b7d00c04a0bc98c0d1a565a00d9bb1fd9vboxsync AssertMsgReturn(dbgfR3RegIsNameValid(paAliases[iAlias].pszName), ("%s (%s)\n", paAliases[iAlias].pszName, paRegisters[iDesc].pszName), VERR_INVALID_NAME);
34822e8b7d00c04a0bc98c0d1a565a00d9bb1fd9vboxsync AssertReturn( paAliases[iAlias].enmType > DBGFREGVALTYPE_INVALID
34822e8b7d00c04a0bc98c0d1a565a00d9bb1fd9vboxsync && paAliases[iAlias].enmType < DBGFREGVALTYPE_END, VERR_INVALID_PARAMETER);
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync PCDBGFREGSUBFIELD paSubFields = paRegisters[iDesc].paSubFields;
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync AssertPtrReturn(paSubFields, VERR_INVALID_PARAMETER);
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync for (; paSubFields[iSubField].pszName; iSubField++)
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync AssertMsgReturn(dbgfR3RegIsNameValid(paSubFields[iSubField].pszName), ("%s (%s)\n", paSubFields[iSubField].pszName, paRegisters[iDesc].pszName), VERR_INVALID_NAME);
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync AssertReturn(paSubFields[iSubField].iFirstBit + paSubFields[iSubField].cBits <= 128, VERR_INVALID_PARAMETER);
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync AssertReturn(paSubFields[iSubField].cBits + paSubFields[iSubField].cShift <= 128, VERR_INVALID_PARAMETER);
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync AssertPtrNullReturn(paSubFields[iSubField].pfnGet, VERR_INVALID_POINTER);
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync AssertPtrNullReturn(paSubFields[iSubField].pfnSet, VERR_INVALID_POINTER);
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync /* Check the instance number of the CPUs. */
85c594c1140f082dd862abde9dc7825137a3d51avboxsync AssertReturn(enmType != DBGFREGSETTYPE_CPU || iInstance < pVM->cCpus, VERR_INVALID_CPU_ID);
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync * Allocate a new record and all associated lookup records.
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync size_t cbRegSet = RT_OFFSETOF(DBGFREGSET, szPrefix[cchPrefix + 4 + 1]);
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync PDBGFREGSET pRegSet = (PDBGFREGSET)MMR3HeapAllocZ(pVM, MM_TAG_DBGF_REG, cbRegSet);
85c594c1140f082dd862abde9dc7825137a3d51avboxsync * Initialize the new record.
e38719852d98638514dba23fbacf53ad11361d6avboxsync pRegSet->paLookupRecs = (PDBGFREGLOOKUP)((uintptr_t)pRegSet + offLookupRecArray);
e38719852d98638514dba23fbacf53ad11361d6avboxsync RTStrPrintf(pRegSet->szPrefix, cchPrefix + 4 + 1, "%s_%u", pszPrefix, iInstance);
85c594c1140f082dd862abde9dc7825137a3d51avboxsync RTStrPrintf(pRegSet->szPrefix, cchPrefix + 4 + 1, "%s%u", pszPrefix, iInstance);
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync * Initialize the lookup records.
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync PDBGFREGLOOKUP pLookupRec = &pRegSet->paLookupRecs[0];
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync for (iDesc = 0; paRegisters[iDesc].pszName != NULL && RT_SUCCESS(rc); iDesc++)
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync PCDBGFREGALIAS pNextAlias = paRegisters[iDesc].paAliases;
f6b7aa2d424718f1bf8ca45a37b219b986f1024bvboxsync const char *pszRegName = paRegisters[iDesc].pszName;
85c594c1140f082dd862abde9dc7825137a3d51avboxsync size_t cchReg = strlen(paRegisters[iDesc].pszName);
e38719852d98638514dba23fbacf53ad11361d6avboxsync memcpy(pszReg, paRegisters[iDesc].pszName, cchReg + 1);
85c594c1140f082dd862abde9dc7825137a3d51avboxsync pLookupRec->Core.pszString = MMR3HeapStrDup(pVM, MM_TAG_DBGF_REG, szName);
1c8130d3c423590046a8ed4f3059de38ac5dcc14vboxsync PCDBGFREGSUBFIELD paSubFields = paRegisters[iDesc].paSubFields;
11a862be79fe123488bccca60c06e92cdbfec6e8vboxsync for (uint32_t iSubField = 0; paSubFields[iSubField].pszName && RT_SUCCESS(rc); iSubField++)
1c8130d3c423590046a8ed4f3059de38ac5dcc14vboxsync pLookupRec->Core.pszString = MMR3HeapStrDup(pVM, MM_TAG_DBGF_REG, szName);
85c594c1140f082dd862abde9dc7825137a3d51avboxsync * Insert the record into the register set string space and optionally into
85c594c1140f082dd862abde9dc7825137a3d51avboxsync * the CPU register set cache.
if (fInserted)
while (iLookupRec-- > 0)
return VINF_SUCCESS;
return rc;
return dbgfR3RegRegisterCommon(pVCpu->pVMR3, paRegisters, DBGFREGSETTYPE_CPU, pVCpu, "cpu", pVCpu->idCpu);
VMMR3DECL(int) DBGFR3RegRegisterDevice(PVM pVM, PCDBGFREGDESC paRegisters, PPDMDEVINS pDevIns, const char *pszPrefix, uint32_t iInstance)
return dbgfR3RegRegisterCommon(pVM, paRegisters, DBGFREGSETTYPE_DEVICE, pDevIns, pszPrefix, iInstance);
static int dbgfR3RegValCast(PDBGFREGVAL pValue, DBGFREGVALTYPE enmFromType, DBGFREGVALTYPE enmToType)
switch (enmFromType)
case DBGFREGVALTYPE_U8:
switch (enmToType)
case DBGFREGVALTYPE_END:
case DBGFREGVALTYPE_INVALID:
case DBGFREGVALTYPE_U16:
switch (enmToType)
case DBGFREGVALTYPE_END:
case DBGFREGVALTYPE_INVALID:
case DBGFREGVALTYPE_U32:
switch (enmToType)
case DBGFREGVALTYPE_END:
case DBGFREGVALTYPE_INVALID:
case DBGFREGVALTYPE_U64:
switch (enmToType)
case DBGFREGVALTYPE_END:
case DBGFREGVALTYPE_INVALID:
case DBGFREGVALTYPE_U128:
switch (enmToType)
case DBGFREGVALTYPE_END:
case DBGFREGVALTYPE_INVALID:
case DBGFREGVALTYPE_LRD:
switch (enmToType)
case DBGFREGVALTYPE_U128:
return VINF_DBGF_TRUNCATED_REGISTER;
case DBGFREGVALTYPE_END:
case DBGFREGVALTYPE_INVALID:
case DBGFREGVALTYPE_DTR:
switch (enmToType)
case DBGFREGVALTYPE_U128: pValue->u128.s.Lo = InVal.dtr.u64Base; return VINF_DBGF_TRUNCATED_REGISTER;
case DBGFREGVALTYPE_END:
case DBGFREGVALTYPE_INVALID:
case DBGFREGVALTYPE_INVALID:
case DBGFREGVALTYPE_END:
return VERR_DBGF_UNSUPPORTED_CAST;
static DECLCALLBACK(int) dbgfR3RegCpuQueryWorker(PVM pVM, VMCPUID idCpu, DBGFREG enmReg, DBGFREGVALTYPE enmType, PDBGFREGVAL pValue)
return rc;
int rc = VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3RegCpuQueryWorker, 5, pVM, idCpu, enmReg, DBGFREGVALTYPE_U8, &Value);
*pu8 = 0;
return rc;
int rc = VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3RegCpuQueryWorker, 5, pVM, idCpu, enmReg, DBGFREGVALTYPE_U16, &Value);
*pu16 = 0;
return rc;
int rc = VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3RegCpuQueryWorker, 5, pVM, idCpu, enmReg, DBGFREGVALTYPE_U32, &Value);
*pu32 = 0;
return rc;
int rc = VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3RegCpuQueryWorker, 5, pVM, idCpu, enmReg, DBGFREGVALTYPE_U64, &Value);
*pu64 = 0;
return rc;
static DECLCALLBACK(int) dbgfR3RegCpuQueryBatchWorker(PVM pVM, VMCPUID idCpu, PDBGFREGENTRY paRegs, size_t cRegs)
while (cRegs-- > 0)
pReg++;
AssertMsgReturn(enmReg >= 0 && enmReg <= DBGFREG_END, ("%d (%#x)\n", enmReg, enmReg), VERR_DBGF_REGISTER_NOT_FOUND);
case DBGFREGVALTYPE_U128:
case DBGFREGVALTYPE_LRD:
return rc;
return VINF_SUCCESS;
return VERR_NOT_IMPLEMENTED;
if (!cRegs)
return VINF_SUCCESS;
while (iReg-- > 0)
AssertMsgReturn(enmReg < DBGFREG_END && enmReg >= DBGFREG_AL, ("%d (%#x)", enmReg, enmReg), VERR_DBGF_REGISTER_NOT_FOUND);
return VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3RegCpuQueryBatchWorker, 4, pVM, idCpu, paRegs, cRegs);
if (!cRegs)
return VINF_SUCCESS;
unsigned iReg = 0;
iReg++;
return VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3RegCpuQueryBatchWorker, 4, pVM, idCpu, paRegs, cRegs);
return NULL;
if ( pAlias
pAlias++;
char ch;
cbDst--;
return cchFolded;
if (!pLookupRec)
ssize_t cchFolded = dbgfR3RegCopyToLower(pszReg, RTSTR_MAX, szName, sizeof(szName) - DBGF_REG_MAX_NAME);
if (cchFolded > 0)
if ( !pLookupRec
&& cchFolded >= 0
return pLookupRec;
if (cBits >= 0)
return pVal;
return pVal;
static DECLCALLBACK(int) dbgfR3RegNmQueryWorkerOnCpu(PVM pVM, PCDBGFREGLOOKUP pLookupRec, DBGFREGVALTYPE enmType,
int rc;
if (!pSubField)
if (penmType)
if (penmType)
return rc;
static DECLCALLBACK(int) dbgfR3RegNmQueryWorker(PVM pVM, VMCPUID idDefCpu, const char *pszReg, DBGFREGVALTYPE enmType,
if (pLookupRec)
return VMR3ReqCallWait(pVM, idDefCpu, (PFNRT)dbgfR3RegNmQueryWorkerOnCpu, 5, pVM, pLookupRec, enmType, pValue, penmType);
return VERR_DBGF_REGISTER_NOT_FOUND;
VMMR3DECL(int) DBGFR3RegNmQuery(PVM pVM, VMCPUID idDefCpu, const char *pszReg, PDBGFREGVAL pValue, PDBGFREGVALTYPE penmType)
*pu8 = 0;
return rc;
*pu16 = 0;
return rc;
*pu32 = 0;
return rc;
*pu64 = 0;
return rc;
VMMR3DECL(int) DBGFR3RegNmQueryU128(PVM pVM, VMCPUID idDefCpu, const char *pszReg, PRTUINT128U pu128)
return rc;
VMMR3DECL(int) DBGFR3RegNmQueryLrd(PVM pVM, VMCPUID idDefCpu, const char *pszReg, long double *plrd)
*plrd = 0;
return rc;
VMMR3DECL(int) DBGFR3RegNmQueryXdtr(PVM pVM, VMCPUID idDefCpu, const char *pszReg, uint64_t *pu64Base, uint32_t *pu32Limit)
*pu64Base = 0;
*pu32Limit = 0;
return rc;
/// @todo VMMR3DECL(int) DBGFR3RegNmQueryBatch(PVM pVM,VMCPUID idDefCpu, DBGFREGENTRYNM paRegs, size_t cRegs);
return VINF_SUCCESS;
return VERR_NOT_IMPLEMENTED;
/// @todo VMMR3DECL(int) DBGFR3RegNmPrintf(PVM pVM, VMCPUID idDefCpu, char pszBuf, size_t cbBuf, const char *pszFormat, ...);