Changeset 41760 in vbox for trunk/src/VBox/VMM/VMMAll/EMAll.cpp
- Timestamp:
- Jun 15, 2012 3:56:20 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 78577
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r41744 r41760 284 284 * @callback_method_impl{FNDISREADBYTES} 285 285 */ 286 static DECLCALLBACK(int) emReadBytes(PDISCPUSTATE pDis State, uint8_t *pbDst, RTUINTPTR uSrcAddr, uint32_t cbToRead)287 { 288 PEMDISSTATE pState = (PEMDISSTATE)pDis State->pvUser;286 static DECLCALLBACK(int) emReadBytes(PDISCPUSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead) 287 { 288 PEMDISSTATE pState = (PEMDISSTATE)pDis->pvUser; 289 289 # ifndef IN_RING0 290 290 PVM pVM = pState->pVM; 291 291 # endif 292 292 PVMCPU pVCpu = pState->pVCpu; 293 /** @todo Rewrite this to make full use of the abInstr buffer and drop our extra 294 * caching buffer. Just playing safe at first... */ 295 uint8_t *pbDst = &pDis->abInstr[offInstr]; 296 RTUINTPTR uSrcAddr = pDis->uInstrAddr + offInstr; 297 size_t cbToRead = cbMinRead; 293 298 294 299 # ifdef IN_RING0 295 int rc;300 int rc; 296 301 297 302 if ( pState->GCPtr … … 303 308 for (unsigned i = 0; i < cbToRead; i++) 304 309 pbDst[i] = pState->aOpcode[offset + i]; 310 pDis->cbCachedInstr = offInstr + cbToRead; 305 311 return VINF_SUCCESS; 306 312 } … … 308 314 rc = PGMPhysSimpleReadGCPtr(pVCpu, pbDst, uSrcAddr, cbToRead); 309 315 AssertMsgRC(rc, ("PGMPhysSimpleReadGCPtr failed for uSrcAddr=%RTptr cbToRead=%x rc=%d\n", uSrcAddr, cbToRead, rc)); 316 310 317 # elif defined(IN_RING3) 311 318 if (!PATMIsPatchGCAddr(pVM, uSrcAddr)) … … 332 339 333 340 # endif /* IN_RING3 */ 341 pDis->cbCachedInstr = offInstr + cbToRead; 334 342 return VINF_SUCCESS; 335 343 }
Note:
See TracChangeset
for help on using the changeset viewer.