VirtualBox

Changeset 64382 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 24, 2016 12:56:10 PM (8 years ago)
Author:
vboxsync
Message:

Debugger/Digger/FreeBSD: Alignment fixes for 32bit FreeBSD

File:
1 edited

Legend:

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

    r64381 r64382  
    320320     * All checked FreeBSD kernels so far have the following layout in the kernel:
    321321     *     [.interp] - contiains the /red/herring string we used for probing earlier
    322      *     [.hash]   - contains the hashes of the symbol names, 8 byte alignent
    323      *     [.dynsym] - contains the ELF symbol descriptors, 8 byte alignment
     322     *     [.hash]   - contains the hashes of the symbol names, 8 byte alignment on 64bit, 4 byte on 32bit
     323     *     [.dynsym] - contains the ELF symbol descriptors, 8 byte alignment, 4 byte on 32bit
    324324     *     [.dynstr] - contains the symbol names as a string table, 1 byte alignmnt
    325325     *     [.text]   - contains the executable code, 16 byte alignment.
     
    338338    DBGFADDRESS AddrHashStart = pThis->AddrKernelInterp;
    339339    DBGFR3AddrAdd(&AddrHashStart, sizeof(g_abNeedleInterp));
    340     AddrHashStart.FlatPtr = RT_ALIGN_GCPT(AddrHashStart.FlatPtr, 8, RTGCUINTPTR);
     340    AddrHashStart.FlatPtr = RT_ALIGN_GCPT(AddrHashStart.FlatPtr, pThis->f64Bit ? 8 : 4, RTGCUINTPTR);
    341341    uint32_t au32Counters[2];
    342342    int rc = DBGFR3MemRead(pUVM, 0 /*idCpu*/, &AddrHashStart, &au32Counters[0], sizeof(au32Counters));
     
    352352
    353353            DBGFR3AddrAdd(&AddrDynsymStart, cbHash);
    354             AddrDynsymStart.FlatPtr = RT_ALIGN_GCPT(AddrDynsymStart.FlatPtr, 8, RTGCUINTPTR);
     354            AddrDynsymStart.FlatPtr = RT_ALIGN_GCPT(AddrDynsymStart.FlatPtr, pThis->f64Bit ? 8 : 4, RTGCUINTPTR);
    355355
    356356            DBGFADDRESS AddrDynstrStart = AddrDynsymStart;
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