Changeset 83084 in vbox for trunk/src/VBox/Runtime/common/dbg
- Timestamp:
- Feb 15, 2020 3:16:11 PM (5 years ago)
- Location:
- trunk/src/VBox/Runtime/common/dbg
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/dbg/dbgmod.cpp
r82968 r83084 329 329 AssertPtrReturn(pszName, VERR_INVALID_POINTER); 330 330 AssertReturn(*pszName, VERR_INVALID_PARAMETER); 331 AssertReturn(fFlags == 0 || fFlags == RTDBGMOD_F_NOT_DEFERRED, VERR_INVALID_ PARAMETER);331 AssertReturn(fFlags == 0 || fFlags == RTDBGMOD_F_NOT_DEFERRED, VERR_INVALID_FLAGS); 332 332 333 333 int rc = rtDbgModLazyInit(); … … 842 842 pDbgMod->pvImgPriv = NULL; 843 843 /** @todo need to specify some arch stuff here. */ 844 rc = pImg->pVt->pfnTryOpen(pDbgMod, enmArch );844 rc = pImg->pVt->pfnTryOpen(pDbgMod, enmArch, 0 /*fLdrFlags*/); 845 845 if (RT_SUCCESS(rc)) 846 846 { … … 980 980 pDbgMod->pImgVt = pImg->pVt; 981 981 pDbgMod->pvImgPriv = NULL; 982 int rc2 = pImg->pVt->pfnTryOpen(pDbgMod, RTLDRARCH_WHATEVER );982 int rc2 = pImg->pVt->pfnTryOpen(pDbgMod, RTLDRARCH_WHATEVER, 0 /*fLdrFlags*/); 983 983 if (RT_SUCCESS(rc2)) 984 984 { … … 1159 1159 { 1160 1160 PRTDBGMODDEFERRED pDeferred; 1161 rc = rtDbgModDeferredCreate(pDbgMod, rtDbgModFromPeImageDeferredCallback, cbImage, hDbgCfg, 0,1162 &pDeferred);1161 rc = rtDbgModDeferredCreate(pDbgMod, rtDbgModFromPeImageDeferredCallback, cbImage, hDbgCfg, 1162 0 /*cbDeferred*/, 0 /*fFlags*/, &pDeferred); 1163 1163 if (RT_SUCCESS(rc)) 1164 1164 pDeferred->u.PeImage.uTimestamp = uTimestamp; … … 1217 1217 /** For use more internal use in file locator callbacks. */ 1218 1218 bool fOpenImage; 1219 /** RTDBGMOD_F_XXX. */ 1220 uint32_t fFlags; 1219 1221 } RTDBGMODMACHOARGS; 1220 1222 /** Pointer to a const segment package. */ … … 1259 1261 pDbgMod->pImgVt = pImg->pVt; 1260 1262 pDbgMod->pvImgPriv = NULL; 1261 int rc2 = pImg->pVt->pfnTryOpen(pDbgMod, pArgs->enmArch); 1263 int rc2 = pImg->pVt->pfnTryOpen(pDbgMod, pArgs->enmArch, 1264 pArgs->fFlags & RTDBGMOD_F_MACHO_LOAD_LINKEDIT ? RTLDR_O_MACHO_LOAD_LINKEDIT : 0); 1262 1265 if (RT_SUCCESS(rc2)) 1263 1266 { … … 1350 1353 1351 1354 static int rtDbgModFromMachOImageWorker(PRTDBGMODINT pDbgMod, RTLDRARCH enmArch, uint32_t cbImage, 1352 uint32_t cSegs, PCRTDBGSEGMENT paSegs, PCRTUUID pUuid, RTDBGCFG hDbgCfg )1355 uint32_t cSegs, PCRTDBGSEGMENT paSegs, PCRTUUID pUuid, RTDBGCFG hDbgCfg, uint32_t fFlags) 1353 1356 { 1354 1357 RT_NOREF_PV(cbImage); RT_NOREF_PV(cSegs); RT_NOREF_PV(paSegs); … … 1358 1361 Args.pUuid = pUuid && RTUuidIsNull(pUuid) ? pUuid : NULL; 1359 1362 Args.fOpenImage = false; 1363 Args.fFlags = fFlags; 1360 1364 1361 1365 /* … … 1382 1386 return rtDbgModFromMachOImageWorker(pDbgMod, pDeferred->u.MachO.enmArch, pDeferred->cbImage, 1383 1387 pDeferred->u.MachO.cSegs, pDeferred->u.MachO.aSegs, 1384 &pDeferred->u.MachO.Uuid, pDeferred->hDbgCfg );1388 &pDeferred->u.MachO.Uuid, pDeferred->hDbgCfg, pDeferred->fFlags); 1385 1389 } 1386 1390 … … 1408 1412 AssertReturn(cbImage || cSegs, VERR_INVALID_PARAMETER); 1409 1413 AssertPtrNullReturn(pUuid, VERR_INVALID_POINTER); 1410 AssertReturn(!(fFlags & ~ (RTDBGMOD_F_NOT_DEFERRED)), VERR_INVALID_PARAMETER);1414 AssertReturn(!(fFlags & ~RTDBGMOD_F_VALID_MASK), VERR_INVALID_FLAGS); 1411 1415 1412 1416 int rc = rtDbgModLazyInit(); … … 1448 1452 || (!cbImage && !cSegs) 1449 1453 || (fFlags & RTDBGMOD_F_NOT_DEFERRED) ) 1450 rc = rtDbgModFromMachOImageWorker(pDbgMod, enmArch, cbImage, cSegs, paSegs, pUuid, hDbgCfg );1454 rc = rtDbgModFromMachOImageWorker(pDbgMod, enmArch, cbImage, cSegs, paSegs, pUuid, hDbgCfg, fFlags); 1451 1455 else 1452 1456 { … … 1457 1461 rc = rtDbgModDeferredCreate(pDbgMod, rtDbgModFromMachOImageDeferredCallback, cbImage, hDbgCfg, 1458 1462 RT_UOFFSETOF_DYN(RTDBGMODDEFERRED, u.MachO.aSegs[cSegs]), 1459 &pDeferred);1463 0 /*fFlags*/, &pDeferred); 1460 1464 if (RT_SUCCESS(rc)) 1461 1465 { -
trunk/src/VBox/Runtime/common/dbg/dbgmoddeferred.cpp
r82968 r83084 636 636 637 637 /** @interface_method_impl{RTDBGMODVTIMG,pfnTryOpen} */ 638 static DECLCALLBACK(int) rtDbgModDeferredImg_TryOpen(PRTDBGMODINT pMod, RTLDRARCH enmArch )639 { 640 NOREF(enmArch);638 static DECLCALLBACK(int) rtDbgModDeferredImg_TryOpen(PRTDBGMODINT pMod, RTLDRARCH enmArch, uint32_t fLdrFlags) 639 { 640 RT_NOREF(enmArch, fLdrFlags); 641 641 return rtDbgModDeferredDoIt(pMod, true /*fForceRetry*/); 642 642 } … … 681 681 * @param cbDeferred The size of the deferred instance data, 0 if the 682 682 * default structure is good enough. 683 * @param fFlags RTDBGMOD_F_XXX. 683 684 * @param ppDeferred Where to return the instance data. Can be NULL. 684 685 */ 685 686 DECLHIDDEN(int) rtDbgModDeferredCreate(PRTDBGMODINT pDbgMod, PFNRTDBGMODDEFERRED pfnDeferred, RTUINTPTR cbImage, 686 RTDBGCFG hDbgCfg, size_t cbDeferred, PRTDBGMODDEFERRED *ppDeferred)687 RTDBGCFG hDbgCfg, size_t cbDeferred, uint32_t fFlags, PRTDBGMODDEFERRED *ppDeferred) 687 688 { 688 689 AssertReturn(!pDbgMod->pDbgVt, VERR_DBG_MOD_IPE); … … 701 702 pDeferred->hDbgCfg = hDbgCfg; 702 703 pDeferred->pfnDeferred = pfnDeferred; 704 pDeferred->fFlags = fFlags; 703 705 704 706 pDbgMod->pDbgVt = &g_rtDbgModVtDbgDeferred; -
trunk/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp
r82968 r83084 6077 6077 pDbgInfoMod->pszName = pDbgMod->pszName; 6078 6078 pDbgInfoMod->pImgVt = &g_rtDbgModVtImgLdr; 6079 rc = pDbgInfoMod->pImgVt->pfnTryOpen(pDbgInfoMod, enmArch );6079 rc = pDbgInfoMod->pImgVt->pfnTryOpen(pDbgInfoMod, enmArch, 0 /*fLdrFlags*/); 6080 6080 if (RT_SUCCESS(rc)) 6081 6081 { -
trunk/src/VBox/Runtime/common/dbg/dbgmodldr.cpp
r82968 r83084 216 216 217 217 /** @interface_method_impl{RTDBGMODVTIMG,pfnTryOpen} */ 218 static DECLCALLBACK(int) rtDbgModLdr_TryOpen(PRTDBGMODINT pMod, RTLDRARCH enmArch )218 static DECLCALLBACK(int) rtDbgModLdr_TryOpen(PRTDBGMODINT pMod, RTLDRARCH enmArch, uint32_t fLdrFlags) 219 219 { 220 220 RTLDRMOD hLdrMod; 221 int rc = RTLdrOpen(pMod->pszImgFile, RTLDR_O_FOR_DEBUG , enmArch, &hLdrMod);221 int rc = RTLdrOpen(pMod->pszImgFile, RTLDR_O_FOR_DEBUG | fLdrFlags, enmArch, &hLdrMod); 222 222 if (RT_SUCCESS(rc)) 223 223 {
Note:
See TracChangeset
for help on using the changeset viewer.