- Timestamp:
- Jun 14, 2012 11:41:13 PM (13 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/Disasm.cpp
r41694 r41731 58 58 * @param pfnCallback The byte fetcher callback. 59 59 * @param pvUser The user argument (found in 60 * DISCPUSTATE:: apvUserData[0]).60 * DISCPUSTATE::pvUser). 61 61 * @param pCpu Where to return the disassembled instruction. 62 62 * @param pcbInstr Where to store the size of the instruction. NULL is -
trunk/src/VBox/Disassembler/DisasmCore.cpp
r41728 r41731 227 227 * @param enmCpuMode The CPU mode. DISCPUMODE_32BIT, DISCPUMODE_16BIT, or DISCPUMODE_64BIT. 228 228 * @param pfnReadBytes Callback for reading instruction bytes. 229 * @param pvUser User argument for the instruction reader. (Ends up in apvUserData[0].)229 * @param pvUser User argument for the instruction reader. (Ends up in pvUser.) 230 230 * @param pCpu Pointer to cpu structure. Will be initialized. 231 231 * @param pcbInstr Where to store the size of the instruction. … … 249 249 * @param enmCpuMode The CPU mode. DISCPUMODE_32BIT, DISCPUMODE_16BIT, or DISCPUMODE_64BIT. 250 250 * @param pfnReadBytes Callback for reading instruction bytes. 251 * @param pvUser User argument for the instruction reader. (Ends up in apvUserData[0].)251 * @param pvUser User argument for the instruction reader. (Ends up in pvUser.) 252 252 * @param pCpu Pointer to cpu structure. Will be initialized. 253 253 * @param pcbInstr Where to store the size of the instruction. … … 271 271 * @param pfnReadBytes Callback for reading instruction bytes. 272 272 * @param fFilter Instruction type filter. 273 * @param pvUser User argument for the instruction reader. (Ends up in apvUserData[0].)273 * @param pvUser User argument for the instruction reader. (Ends up in pvUser.) 274 274 * @param pCpu Pointer to CPU structure. With the exception of 275 * DISCPUSTATE::apvUserData[1] and 276 * DISCPUSTATE::apvUserData[2], the structure will be 275 * DISCPUSTATE::pvUser2, the structure will be 277 276 * completely initialized by this API, i.e. no input is 278 277 * taken from it. … … 288 287 /* 289 288 * Initialize the CPU state. 290 * Note! The RT_BZERO make ASSUMPTIONS about the placement of apvUserData.289 * Note! The RT_BZERO make ASSUMPTIONS about the placement of pvUser2. 291 290 */ 292 RT_BZERO(pCpu, RT_OFFSETOF(DISCPUSTATE, apvUserData));291 RT_BZERO(pCpu, RT_OFFSETOF(DISCPUSTATE, pvUser2)); 293 292 294 293 pCpu->mode = enmCpuMode; … … 312 311 pCpu->rc = VINF_SUCCESS; 313 312 pCpu->pfnReadBytes = pfnReadBytes ? pfnReadBytes : disReadBytesDefault; 314 pCpu-> apvUserData[0]= pvUser;313 pCpu->pvUser = pvUser; 315 314 316 315 return disInstrWorker(pCpu, uInstrAddr, paOneByteMap, pcbInstr); -
trunk/src/VBox/Runtime/testcase/tstLdr-3.cpp
r41692 r41731 149 149 static DECLCALLBACK(int) MyReadBytes(PDISCPUSTATE pDisState, uint8_t *pbDst, RTUINTPTR uSrcAddr, uint32_t cbToRead) 150 150 { 151 memcpy(pbDst, (uint8_t const *)((uintptr_t)uSrcAddr + (uintptr_t)pDisState-> apvUserData[0]), cbToRead);151 memcpy(pbDst, (uint8_t const *)((uintptr_t)uSrcAddr + (uintptr_t)pDisState->pvUser), cbToRead); 152 152 return VINF_SUCCESS; 153 153 } -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r41729 r41731 286 286 static DECLCALLBACK(int) emReadBytes(PDISCPUSTATE pDisState, uint8_t *pbDst, RTUINTPTR uSrcAddr, uint32_t cbToRead) 287 287 { 288 PEMDISSTATE pState = (PEMDISSTATE)pDisState-> apvUserData[0];288 PEMDISSTATE pState = (PEMDISSTATE)pDisState->pvUser; 289 289 # ifndef IN_RING0 290 290 PVM pVM = pState->pVM; -
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r41675 r41731 3529 3529 static DECLCALLBACK(int) cpumR3DisasInstrRead(PDISCPUSTATE pDisState, uint8_t *pbDst, RTUINTPTR uSrcAddr, uint32_t cbToRead) 3530 3530 { 3531 PCPUMDISASSTATE pState = (PCPUMDISASSTATE)pDisState-> apvUserData[0];3531 PCPUMDISASSTATE pState = (PCPUMDISASSTATE)pDisState->pvUser; 3532 3532 Assert(cbToRead > 0); 3533 3533 for (;;) -
trunk/src/VBox/VMM/VMMR3/CSAM.cpp
r41727 r41731 728 728 static DECLCALLBACK(int) CSAMR3ReadBytes(PDISCPUSTATE pDisState, uint8_t *pbDst, RTUINTPTR uSrcAddr, uint32_t cbToRead) 729 729 { 730 PVM pVM = (PVM)pDisState-> apvUserData[0];731 RTHCUINTPTR pInstrHC = (RTHCUINTPTR)pDisState-> apvUserData[1];730 PVM pVM = (PVM)pDisState->pvUser; 731 RTHCUINTPTR pInstrHC = (RTHCUINTPTR)pDisState->pvUser2; 732 732 RTGCUINTPTR32 pInstrGC = pDisState->uInstrAddr; 733 733 int orgsize = cbToRead; … … 764 764 PDISCPUSTATE pCpu, uint32_t *pcbInstr, char *pszOutput, size_t cbOutput) 765 765 { 766 (pCpu)->apvUserData[1]= InstrHC;766 pCpu->pvUser2 = InstrHC; 767 767 #ifdef DEBUG 768 768 return DISInstrToStrEx(InstrGC, enmCpuMode, CSAMR3ReadBytes, pVM, DISOPTYPE_ALL, -
trunk/src/VBox/VMM/VMMR3/PATM.cpp
r41727 r41731 536 536 DECLCALLBACK(int) patmReadBytes(PDISCPUSTATE pDisState, uint8_t *pbDst, RTUINTPTR uSrcAddr, uint32_t cbToRead) 537 537 { 538 PATMDISASM *pDisInfo = (PATMDISASM *)pDisState-> apvUserData[0];538 PATMDISASM *pDisInfo = (PATMDISASM *)pDisState->pvUser; 539 539 int orgsize = cbToRead; 540 540
Note:
See TracChangeset
for help on using the changeset viewer.