VirtualBox

Ignore:
Timestamp:
Oct 11, 2013 1:06:28 AM (11 years ago)
Author:
vboxsync
Message:

Darwin guest OS digger hacking in progress. Adding symbol cache util to iprt and started on the Mach-O code that'll make use of it (RTDbgModCreateFromMachOImage++). Updates kStuff from 53 to 55 for UUID query and 64-bit kext loading.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/dbg/dbgmoddeferred.cpp

    r46281 r49044  
    439439 *
    440440 */
     441
     442/** @interface_method_impl{RTDBGMODVTIMG,pfnQueryProp} */
     443static DECLCALLBACK(int ) rtDbgModDeferredImg_QueryProp(PRTDBGMODINT pMod, RTLDRPROP enmProp, void *pvBuf, size_t cbBuf)
     444{
     445    int rc = rtDbgModDeferredDoIt(pMod, false /*fForceRetry*/);
     446    if (RT_SUCCESS(rc))
     447        rc = pMod->pImgVt->pfnQueryProp(pMod, enmProp, pvBuf, cbBuf);
     448    return rc;
     449}
    441450
    442451
     
    593602    /*.pfnGetFormat = */                rtDbgModDeferredImg_GetFormat,
    594603    /*.pfnGetArch = */                  rtDbgModDeferredImg_GetArch,
     604    /*.pfnQueryProp = */                rtDbgModDeferredImg_QueryProp,
    595605
    596606    /*.u32EndMagic = */                 RTDBGMODVTIMG_MAGIC
     
    608618 * @param   hDbgCfg             The debug config handle.  Can be NIL.  A
    609619 *                              reference will be retained.
     620 * @param   cbDeferred          The size of the deferred instance data, 0 if the
     621 *                              default structure is good enough.
    610622 * @param   ppDeferred          Where to return the instance data. Can be NULL.
    611623 */
    612624DECLHIDDEN(int) rtDbgModDeferredCreate(PRTDBGMODINT pDbgMod, PFNRTDBGMODDEFERRED pfnDeferred, RTUINTPTR cbImage,
    613                                        RTDBGCFG hDbgCfg, PRTDBGMODDEFERRED *ppDeferred)
     625                                       RTDBGCFG hDbgCfg, size_t cbDeferred, PRTDBGMODDEFERRED *ppDeferred)
    614626{
    615627    AssertReturn(!pDbgMod->pDbgVt, VERR_DBG_MOD_IPE);
    616628
    617     PRTDBGMODDEFERRED pDeferred = (PRTDBGMODDEFERRED)RTMemAllocZ(sizeof(*pDeferred));
     629    if (cbDeferred < sizeof(RTDBGMODDEFERRED))
     630        cbDeferred = sizeof(RTDBGMODDEFERRED);
     631    PRTDBGMODDEFERRED pDeferred = (PRTDBGMODDEFERRED)RTMemAllocZ(cbDeferred);
    618632    if (!pDeferred)
    619633        return VERR_NO_MEMORY;
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