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/ldr/ldrEx.cpp

    r48935 r49044  
    55
    66/*
    7  * Copyright (C) 2006-2011 Oracle Corporation
     7 * Copyright (C) 2006-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    540540
    541541
     542RTDECL(int) RTLdrQueryProp(RTLDRMOD hLdrMod, RTLDRPROP enmProp, void *pvBuf, size_t cbBuf)
     543{
     544    AssertMsgReturn(rtldrIsValid(hLdrMod), ("hLdrMod=%p\n", hLdrMod), RTLDRENDIAN_INVALID);
     545    PRTLDRMODINTERNAL pMod = (PRTLDRMODINTERNAL)hLdrMod;
     546
     547    /*
     548     * Do some pre screening of the input
     549     */
     550    switch (enmProp)
     551    {
     552        case RTLDRPROP_UUID:
     553            AssertReturn(cbBuf == sizeof(RTUUID), VERR_INVALID_PARAMETER);
     554            break;
     555        case RTLDRPROP_TIMESTAMP_SECONDS:
     556            AssertReturn(cbBuf == sizeof(int32_t) || cbBuf == sizeof(int64_t), VERR_INVALID_PARAMETER);
     557            break;
     558        default:
     559            AssertFailedReturn(VERR_INVALID_FUNCTION);
     560    }
     561    AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
     562
     563    /*
     564     * Call the image specific worker, if there is one.
     565     */
     566    if (!pMod->pOps->pfnQueryProp)
     567        return VERR_NOT_SUPPORTED;
     568    return pMod->pOps->pfnQueryProp(pMod, enmProp, pvBuf, cbBuf);
     569}
     570RT_EXPORT_SYMBOL(RTLdrQueryProp);
     571
     572
    542573/**
    543574 * Internal method used by the IPRT debug bits.
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