Changeset 20947 in vbox for trunk/src/VBox
- Timestamp:
- Jun 25, 2009 3:37:20 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMDbg.cpp
r19334 r20947 487 487 * bother to match across ranges. 488 488 */ 489 pgmLock(pVM); 489 490 for (PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRanges); 490 491 pRam; … … 534 535 { 535 536 *pGCPhysHit = (GCPhys & ~(RTGCPHYS)PAGE_OFFSET_MASK) + offPage; 537 pgmUnlock(pVM); 536 538 return VINF_SUCCESS; 537 539 } … … 546 548 GCPhys |= PAGE_OFFSET_MASK; 547 549 if (GCPhys++ >= GCPhysLast) 550 { 551 pgmUnlock(pVM); 548 552 return VERR_DBGF_MEM_NOT_FOUND; 553 } 549 554 } 550 555 } 551 556 } 557 pgmUnlock(pVM); 552 558 return VERR_DBGF_MEM_NOT_FOUND; 553 559 } … … 597 603 * Search the memory - ignore MMIO, zero and not-present pages. 598 604 */ 605 PGMMODE enmMode = PGMGetGuestMode(pVCpu); 606 RTGCPTR GCPtrMask = PGMMODE_IS_LONG_MODE(enmMode) ? UINT64_MAX : UINT32_MAX; 599 607 uint8_t abPrev[MAX_NEEDLE_SIZE]; 600 size_t cbPrev = 0;608 size_t cbPrev = 0; 601 609 const RTGCPTR GCPtrLast = GCPtr + cbRange - 1 >= GCPtr 602 ? GCPtr + cbRange - 1603 : ~(RTGCPTR)0;604 RTGCPTR cPages = (((GCPtrLast - GCPtr) + (GCPtr & PAGE_OFFSET_MASK)) >> PAGE_SHIFT) + 1;610 ? (GCPtr + cbRange - 1) & GCPtrMask 611 : GCPtrMask; 612 RTGCPTR cPages = (((GCPtrLast - GCPtr) + (GCPtr & PAGE_OFFSET_MASK)) >> PAGE_SHIFT) + 1; 605 613 while (cPages-- > 0) 606 614 { … … 611 619 PPGMPAGE pPage = pgmPhysGetPage(&pVM->pgm.s, GCPhys); 612 620 if ( pPage 613 ///@todo && !PGM_PAGE_IS_ZERO(pPage) 621 && !PGM_PAGE_IS_ZERO(pPage) /** @todo handle all zero needle. */ 614 622 && !PGM_PAGE_IS_MMIO(pPage)) 615 623 { … … 644 652 GCPtr |= PAGE_OFFSET_MASK; 645 653 GCPtr++; 654 GCPtr &= GCPtrMask; 646 655 } 647 656 return VERR_DBGF_MEM_NOT_FOUND;
Note:
See TracChangeset
for help on using the changeset viewer.