VirtualBox

Changeset 9704 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 16, 2008 9:08:21 AM (17 years ago)
Author:
vboxsync
Message:

No limit checks in 64 bits mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/DBGFDisas.cpp

    r9700 r9704  
    7575    /** Whether the PageMapLock is valid or not. */
    7676    bool            fLocked;
     77    /** 64 bits mode or not. */
     78    bool            f64Bits;
    7779} DBGFDISASSTATE, *PDBGFDISASSTATE;
    7880
     
    99101    pState->pVM             = pVM;
    100102    pState->fLocked         = false;
     103    pState->f64Bits         = enmMode >= PGMMODE_AMD64 && pSelInfo->Raw.Gen.u1Long;
    101104    Assert((uintptr_t)GCPtr == GCPtr);
    102105    uint32_t cbInstr;
    103106    int rc = DISCoreOneEx(GCPtr,
    104                           enmMode >= PGMMODE_AMD64 && pSelInfo->Raw.Gen.u1Long
     107                          pState->f64Bits
    105108                          ? CPUMODE_64BIT
    106109                          : pSelInfo->Raw.Gen.u1DefBig
     
    215218
    216219        /* check the segemnt limit */
    217         if (PtrSrc > pState->cbSegLimit)
     220        if (!pState->f64Bits && PtrSrc > pState->cbSegLimit)
    218221            return VERR_OUT_OF_SELECTOR_BOUNDS;
    219222
    220223        /* calc how much we can read */
    221224        uint32_t cb = PAGE_SIZE - (GCPtr & PAGE_OFFSET_MASK);
    222         RTGCUINTPTR cbSeg = pState->GCPtrSegEnd - GCPtr;
    223         if (cb > cbSeg && cbSeg)
    224             cb = cbSeg;
     225        if (!pState->f64Bits)
     226        {
     227            RTGCUINTPTR cbSeg = pState->GCPtrSegEnd - GCPtr;
     228            if (cb > cbSeg && cbSeg)
     229                cb = cbSeg;
     230        }
    225231        if (cb > cbRead)
    226232            cb = cbRead;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette