VirtualBox

Changeset 86159 in vbox for trunk/src/VBox/Debugger


Ignore:
Timestamp:
Sep 17, 2020 5:09:30 PM (4 years ago)
Author:
vboxsync
Message:

DBGF,DBGPlugInWinNt: Extract NtBuildNumber and make it available through the query versions callback

File:
1 edited

Legend:

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

    r86111 r86159  
    140140    uint32_t        TimeZoneId;
    141141    uint32_t        LargePageMinimum;
    142     uint32_t        Reserved2[7];
     142    uint32_t        Reserved2[6];
     143    uint32_t        NtBuildNumber;
    143144    uint32_t        NtProductType;
    144145    uint8_t         ProductTypeIsValid;
     
    215216    /** NTKUSERSHAREDDATA::NtMinorVersion */
    216217    uint32_t            NtMinorVersion;
     218    /** NTKUSERSHAREDDATA::NtBuildNumber */
     219    uint32_t            NtBuildNumber;
    217220
    218221    /** The address of the ntoskrnl.exe image. */
     
    510513 */
    511514static DECLCALLBACK(int) dbgDiggerWinNtIWinNt_QueryVersion(struct DBGFOSIWINNT *pThis, PUVM pUVM,
    512                                                            uint32_t *puVersMajor, uint32_t *puVersMinor)
     515                                                           uint32_t *puVersMajor, uint32_t *puVersMinor,
     516                                                           uint32_t *puBuildNumber, bool *pf32Bit)
    513517{
    514518    RT_NOREF(pUVM);
    515519    PDBGDIGGERWINNT pData = RT_FROM_MEMBER(pThis, DBGDIGGERWINNT, IWinNt);
    516520
    517     *puVersMajor = pData->NtMajorVersion;
    518     *puVersMinor = pData->NtMinorVersion;
     521    if (puVersMajor)
     522        *puVersMajor = pData->NtMajorVersion;
     523    if (puVersMinor)
     524        *puVersMinor = pData->NtMinorVersion;
     525    if (puBuildNumber)
     526        *puBuildNumber = pData->NtBuildNumber;
     527    if (pf32Bit)
     528        *pf32Bit = pData->f32Bit;
    519529    return VINF_SUCCESS;
    520530}
     
    749759        default:                        pszNtProductType = "";              break;
    750760    }
    751     RTStrPrintf(pszVersion, cchVersion, "%u.%u-%s%s", pThis->NtMajorVersion, pThis->NtMinorVersion,
    752                 pThis->f32Bit ? "x86" : "AMD64", pszNtProductType);
     761    RTStrPrintf(pszVersion, cchVersion, "%u.%u-%s%s (BuildNumber %u)", pThis->NtMajorVersion, pThis->NtMinorVersion,
     762                pThis->f32Bit ? "x86" : "AMD64", pszNtProductType, pThis->NtBuildNumber);
    753763    return VINF_SUCCESS;
    754764}
     
    846856        pThis->NtMajorVersion = u.UserSharedData.NtMajorVersion;
    847857        pThis->NtMinorVersion = u.UserSharedData.NtMinorVersion;
     858        pThis->NtBuildNumber  = u.UserSharedData.NtBuildNumber;
    848859    }
    849860    else if (pThis->fNt31)
     
    852863        pThis->NtMajorVersion = 3;
    853864        pThis->NtMinorVersion = 1;
     865        pThis->NtBuildNumber  = 0;
    854866    }
    855867    else
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