VirtualBox

Changeset 16436 in vbox


Ignore:
Timestamp:
Jan 31, 2009 1:18:12 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
42303
Message:

tstLdr-3: fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/VBox/Runtime/testcase/tstLdr-3.cpp

    r14831 r16436  
    7878static DECLCALLBACK(int) testGetImport(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, unsigned uSymbol, RTUINTPTR *pValue, void *pvUser)
    7979{
    80     /* check the name format and only permit certain names */
    81     *pValue = 0xf0f0f0f0;
     80    RTUINTPTR BaseAddr = *(PCRTUINTPTR)pvUser;
     81    *pValue = BaseAddr + UINT32_C(0x604020f0);
    8282    return VINF_SUCCESS;
    8383}
     
    192192
    193193    void *pvBits = RTMemAlloc(RTLdrSize(hLdrMod));
    194     rc = RTLdrGetBits(hLdrMod, pvBits, LoadAddr, testGetImport, NULL);
     194    rc = RTLdrGetBits(hLdrMod, pvBits, LoadAddr, testGetImport, &LoadAddr);
    195195    if (RT_SUCCESS(rc))
    196196    {
     
    214214                        DISCPUSTATE Cpu;
    215215                        memset(&Cpu, 0, sizeof(Cpu));
     216#if 1
    216217                        Cpu.mode = CPUMODE_32BIT;
     218#else
     219                        Cpu.mode = CPUMODE_64BIT;
     220#endif
    217221                        uint8_t *pbCode = (uint8_t *)pvBits + (NearSym.aSyms[0].Value - LoadAddr);
    218222                        MyDisBlock(&Cpu, (uintptr_t)pbCode,
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