VirtualBox

Changeset 85969 in vbox


Ignore:
Timestamp:
Aug 31, 2020 11:50:11 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
140164
Message:

VMM/DBGFR3ModInMem.cpp: Don't call RTDbgModCreateFromMachOImage unless we've got a loader handle, it'll just assert and return VERR_INVALID_PARAMETER.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/DBGFR3ModInMem.cpp

    r83085 r85969  
    509509                rc = dbgfModInMemCommon_Init(pThis, pUVM, pImageAddr, puBuf->aMappings, cMappings,
    510510                                             pszName, enmArch, &hLdrMod, pErrInfo);
    511                 if (RT_FAILURE(rc))
     511                if (RT_SUCCESS(rc)) /* Don't bother if we don't have a handle. */
     512                {
     513                    RTDBGMOD hMod;
     514                    rc = RTDbgModCreateFromMachOImage(&hMod, pszFilename ? pszFilename : pszName, pszName, enmArch,
     515                                                      &hLdrMod, 0 /*cbImage*/, 0, NULL, &Uuid, DBGFR3AsGetConfig(pUVM), fFlags);
     516                    if (RT_SUCCESS(rc))
     517                        *phDbgMod = hMod;
     518                }
     519                else
    512520                    hLdrMod = NIL_RTLDRMOD;
    513521
    514                 RTDBGMOD hMod;
    515                 rc = RTDbgModCreateFromMachOImage(&hMod, pszFilename ? pszFilename : pszName, pszName, enmArch,
    516                                                   &hLdrMod, 0 /*cbImage*/, 0, NULL, &Uuid, DBGFR3AsGetConfig(pUVM), fFlags);
    517                 if (RT_SUCCESS(rc))
    518                     *phDbgMod = hMod;
    519522#if 0 /** @todo later */
    520                 else if (!(fFlags & DBGFMODINMEM_F_NO_CONTAINER_FALLBACK))
     523                if (RT_FAILURE(rc) && !(fFlags & DBGFMODINMEM_F_NO_CONTAINER_FALLBACK))
    521524                {
    522525                    /*
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