VirtualBox

Changeset 75275 in vbox


Ignore:
Timestamp:
Nov 6, 2018 11:17:30 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126377
Message:

IPRT/dbgkrnlinfo-r0drv-nt.cpp: Must manually initialize g_pfnMmGetSystemRoutineAddress according to the linker.

File:
1 edited

Legend:

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

    r73097 r75275  
    144144/** Pointer to MmGetSystemRoutineAddress.
    145145 * @note Added in NT v5.0. */
    146 #ifdef IPRT_TARGET_NT4
    147146static decltype(MmGetSystemRoutineAddress) *g_pfnMmGetSystemRoutineAddress = NULL;
    148 #else
    149 static decltype(MmGetSystemRoutineAddress) *g_pfnMmGetSystemRoutineAddress = MmGetSystemRoutineAddress;
    150 #endif
    151147/** Info about the ntoskrnl.exe mapping. */
    152148static RTDBGNTKRNLMODINFO   g_NtOsKrnlInfo = { "ntoskrnl.exe", NULL, NULL, false, 0, 0, 0, 0, 0, NULL, 0, 0, NULL, NULL };
     
    348344{
    349345    RTR0DBG_NT_DEBUG_LOG(("rtR0DbgKrnlNtInit: pModInfo=%p\n", pModInfo));
     346
     347#ifndef IPRT_TARGET_NT4
     348    /*
     349     * Must manually initialize g_pfnMmGetSystemRoutineAddress, otherwise compiler
     350     * generates its own dynamic init code that might not necessarily be called.
     351     */
     352    g_pfnMmGetSystemRoutineAddress = MmGetSystemRoutineAddress;
     353#endif
    350354
    351355    /*
Note: See TracChangeset for help on using the changeset viewer.

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