VirtualBox

Ignore:
Timestamp:
Oct 8, 2021 8:42:00 AM (3 years ago)
Author:
vboxsync
Message:

IPRT/dbg.h,dbgkrnlinfo-r0drv-nt.cpp: Added a few pseudo symbols to the NT kernel debug info provider to expose some basic module info (simpler than adding dedicated APIs for each of them). bugref:10118

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/nt/dbgkrnlinfo-r0drv-nt.cpp

    r85906 r91633  
    170170    if (pModInfo->fOkay)
    171171    {
     172        /*
     173         * Pseudo symbols:
     174         */
     175        if (   pszSymbol[0] == '_'
     176            && pszSymbol[1] == '_'
     177            && pszSymbol[2] == 'I')
     178        {
     179            if (strcmp(pszSymbol, "__ImageBase") == 0)
     180            {
     181                *ppvSymbol = (void *)pModInfo->pbImageBase;
     182                return VINF_SUCCESS;
     183            }
     184            if (strcmp(pszSymbol, "__ImageSize") == 0)
     185            {
     186                *ppvSymbol = (void *)(uintptr_t)pModInfo->cbImage;
     187                return VINF_SUCCESS;
     188            }
     189            if (strcmp(pszSymbol, "__ImageNtHdrs") == 0)
     190            {
     191                *ppvSymbol = pModInfo->pNtHdrs;
     192                return VINF_SUCCESS;
     193            }
     194        }
     195
    172196        /*
    173197         * Binary search.
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