VirtualBox

Changeset 45983 in vbox


Ignore:
Timestamp:
May 10, 2013 2:19:01 PM (12 years ago)
Author:
vboxsync
Message:

DbgPlugInWinNt.cpp: Made it work with NT4.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/DBGPlugInWinNt.cpp

    r44528 r45983  
    308308    typedef union NTHDRSU
    309309    {
    310         IMAGE_NT_HEADERS64  vX_32;
     310        IMAGE_NT_HEADERS32  vX_32;
    311311        IMAGE_NT_HEADERS64  vX_64;
    312312    } NTHDRS;
     
    361361        return;
    362362    }
    363     if (WINNT_UNION(pThis, pHdrs, OptionalHeader.SizeOfImage) != cbImage)
     363    if (RT_ALIGN(WINNT_UNION(pThis, pHdrs, OptionalHeader.SizeOfImage), _4K) != RT_ALIGN(cbImage, _4K))
    364364    {
    365365        Log(("DigWinNt: %s: Invalid OH.SizeOfImage: %#x, expected %#x\n", pszName, WINNT_UNION(pThis, pHdrs, OptionalHeader.SizeOfImage), cbImage));
     
    368368    if (WINNT_UNION(pThis, pHdrs, OptionalHeader.NumberOfRvaAndSizes) != IMAGE_NUMBEROF_DIRECTORY_ENTRIES)
    369369    {
    370         Log(("DigWinNt: %s: Invalid OH.SizeOfImage: %#x\n", pszName, WINNT_UNION(pThis, pHdrs, OptionalHeader.NumberOfRvaAndSizes)));
     370        Log(("DigWinNt: %s: Invalid OH.NumberOfRvaAndSizes: %#x\n", pszName, WINNT_UNION(pThis, pHdrs, OptionalHeader.NumberOfRvaAndSizes)));
    371371        return;
    372372    }
     
    658658
    659659    /*
    660      * Look for the MISYSPTE section name that seems to be a part of all kernels.
     660     * Look for the PAGELK section name that seems to be a part of all kernels.
    661661     * Then try find the module table entry for it.  Since it's the first entry
    662662     * in the PsLoadedModuleList we can easily validate the list head and report
     
    676676        {
    677677            int rc = DBGFR3MemScan(pUVM, 0 /*idCpu*/, &KernelAddr, UINT32_C(0xffff0000) - KernelAddr.FlatPtr,
    678                                    1, "MISYSPTE", sizeof("MISYSPTE") - 1, &KernelAddr);
     678                                   1, "PAGELK\0", sizeof("PAGELK\0"), &KernelAddr);
    679679            if (RT_FAILURE(rc))
    680680                break;
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