VirtualBox

Ignore:
Timestamp:
Dec 18, 2017 2:59:05 PM (7 years ago)
Author:
vboxsync
Message:

IPRT/dbgkrnlinfo-r0drv-nt.cpp: Copy & past bugfix (for r119709).

File:
1 edited

Legend:

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

    r70149 r70203  
    617617    RTR0DBG_NT_DEBUG_LOG(("RTR0DbgKrnlInfoQuerySymbol: pszModule=%s pszSymbol=%s\n", pszModule ? pszModule : "<null>", pszSymbol));
    618618
     619    void  *pvTmpSymbol = NULL;
     620    if (!ppvSymbol)
     621        ppvSymbol = &pvTmpSymbol;
     622
    619623    int rc;
    620     uintptr_t uValue = 0;
    621624    if (!pszModule)
    622625    {
    623626        /*
    624627         * Search both ntoskrnl and hal, may use MmGetSystemRoutineAddress as fallback.
     628         * Note! MmGetSystemRoutineAddress was buggy in before XP SP2 according to Geoff Chappell.
    625629         */
    626630        if (g_NtOsKrnlInfo.pbImageBase)
     
    632636            Assert(g_NtOsKrnlInfo.fOkay);
    633637            Assert(g_HalInfo.fOkay);
    634             RTR0DBG_NT_DEBUG_LOG(("RTR0DbgKrnlInfoQuerySymbol: Calling RTR0DbgKrnlInfoQuerySymbol on NT kernel...\n"));
     638            //RTR0DBG_NT_DEBUG_LOG(("RTR0DbgKrnlInfoQuerySymbol: Calling RTR0DbgKrnlInfoQuerySymbol on NT kernel...\n"));
    635639            rc = rtR0DbgKrnlInfoLookupSymbol(&g_NtOsKrnlInfo, pszSymbol, ppvSymbol);
    636640            if (RT_FAILURE(rc))
    637641            {
    638                 RTR0DBG_NT_DEBUG_LOG(("RTR0DbgKrnlInfoQuerySymbol: Calling RTR0DbgKrnlInfoQuerySymbol on HAL kernel...\n"));
     642                //RTR0DBG_NT_DEBUG_LOG(("RTR0DbgKrnlInfoQuerySymbol: Calling RTR0DbgKrnlInfoQuerySymbol on HAL kernel...\n"));
    639643                rc = rtR0DbgKrnlInfoLookupSymbol(&g_HalInfo, pszSymbol, ppvSymbol);
    640644            }
    641             RTR0DBG_NT_DEBUG_LOG(("RTR0DbgKrnlInfoQuerySymbol: returns %d\n", rc));
     645            RTR0DBG_NT_DEBUG_LOG(("RTR0DbgKrnlInfoQuerySymbol: #1 returns %d *ppvSymbol=%p\n", rc, *ppvSymbol));
    642646        }
    643647        else
     
    668672                        rc = VERR_SYMBOL_NOT_FOUND;
    669673                    RTUtf16Free(pwszSymbol);
     674                    RTR0DBG_NT_DEBUG_LOG(("RTR0DbgKrnlInfoQuerySymbol: #2 returns %d *ppvSymbol=%p\n", rc, *ppvSymbol));
    670675                }
    671676            }
     
    730735        }
    731736        if (pModInfo)
     737        {
    732738            rc = rtR0DbgKrnlInfoLookupSymbol(pModInfo, pszSymbol, ppvSymbol);
     739            RTR0DBG_NT_DEBUG_LOG(("RTR0DbgKrnlInfoQuerySymbol: #3 returns %d *ppvSymbol=%p\n", rc, *ppvSymbol));
     740        }
    733741    }
    734     if (ppvSymbol)
    735         *ppvSymbol = (void *)uValue;
    736742    return rc;
    737743}
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