- Timestamp:
- May 17, 2013 5:21:23 PM (12 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/dbg/dbgmodcontainer.cpp
r46134 r46149 488 488 if ( uRva <= uCurRvaLast 489 489 && uRvaLast >= uCurRva 490 && (cb != 0 || pThis->paSegs[iSeg].cb != 0)) /* HACK ALERT! Allow empty segments to share space (bios/watcom). */ 490 && ( /* HACK ALERT! Allow empty segments to share space (bios/watcom, elf). */ 491 (cb != 0 && pThis->paSegs[iSeg].cb != 0) 492 || ( cb == 0 493 && uRva != uCurRva 494 && uRva != uCurRvaLast) 495 || ( pThis->paSegs[iSeg].cb == 0 496 && uCurRva != uRva 497 && uCurRva != uRvaLast) 498 ) 499 ) 491 500 AssertMsgFailedReturn(("uRva=%RTptr uRvaLast=%RTptr (cb=%RTptr) \"%s\";\n" 492 501 "uRva=%RTptr uRvaLast=%RTptr (cb=%RTptr) \"%s\" iSeg=%#x\n", … … 600 609 else 601 610 { 602 /* between iSeg and iLast. */611 /* between iSeg and iLast. paSeg[iSeg].cb == 0 ends up here too. */ 603 612 if (iSeg == iLast) 604 613 break; -
trunk/src/VBox/Runtime/common/dbg/dbgmoddeferred.cpp
r46115 r46149 451 451 452 452 /** @interface_method_impl{RTDBGMODVTIMG,pfnMapPart} */ 453 static DECLCALLBACK(int) rtDbgModDeferredImg_MapPart(PRTDBGMODINT pMod, RTFOFF off, size_t cb, void const **ppvMap)454 { 455 int rc = rtDbgModDeferredDoIt(pMod, false /*fForceRetry*/); 456 if (RT_SUCCESS(rc)) 457 rc = pMod->pImgVt->pfnMapPart(pMod, off, cb, ppvMap);453 static DECLCALLBACK(int) rtDbgModDeferredImg_MapPart(PRTDBGMODINT pMod, uint32_t iDbgInfo, RTFOFF off, size_t cb, void const **ppvMap) 454 { 455 int rc = rtDbgModDeferredDoIt(pMod, false /*fForceRetry*/); 456 if (RT_SUCCESS(rc)) 457 rc = pMod->pImgVt->pfnMapPart(pMod, iDbgInfo, off, cb, ppvMap); 458 458 return rc; 459 459 } … … 465 465 PRTDBGMODDEFERRED pThis = (PRTDBGMODDEFERRED)pMod->pvImgPriv; 466 466 return pThis->cbImage; 467 } 468 469 470 /** @interface_method_impl{RTDBGMODVTIMG,pfnRvaToSegOffset} */ 471 static DECLCALLBACK(int) rtDbgModDeferredImg_RvaToSegOffset(PRTDBGMODINT pMod, RTLDRADDR uRva, 472 PRTDBGSEGIDX piSeg, PRTLDRADDR poffSeg) 473 { 474 int rc = rtDbgModDeferredDoIt(pMod, false /*fForceRetry*/); 475 if (RT_SUCCESS(rc)) 476 rc = pMod->pImgVt->pfnRvaToSegOffset(pMod, uRva, piSeg, poffSeg); 477 return rc; 467 478 } 468 479 … … 538 549 /*.pfnGetLoadedSize = */ rtDbgModDeferredImg_ImageSize, 539 550 /*.pfnLinkAddressToSegOffset = */ rtDbgModDeferredImg_LinkAddressToSegOffset, 551 /*.pfnRvaToSegOffset = */ rtDbgModDeferredImg_RvaToSegOffset, 540 552 /*.pfnMapPart = */ rtDbgModDeferredImg_MapPart, 541 553 /*.pfnUnmapPart = */ rtDbgModDeferredImg_UnmapPart, -
trunk/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp
r45994 r46149 434 434 /** Set if present. */ 435 435 bool fPresent; 436 /** The debug info ordinal number in the image file. */ 437 uint32_t iDbgInfo; 436 438 } aSections[krtDbgModDwarfSect_End]; 437 439 … … 750 752 RTDWARFADDRRANGE PcRange; 751 753 /** The language name. */ 752 uint 8_tuLanguage;754 uint16_t uLanguage; 753 755 /** The identifier case. */ 754 756 uint8_t uIdentifierCase; … … 1179 1181 return RTDbgModSegmentAdd(pThis->hCnt, 0, 0, pSeg->pchName, 0 /*fFlags*/, NULL); 1180 1182 1183 /* The link address is 0 for all segments in a relocatable ELF image. */ 1181 1184 RTLDRADDR cb = RT_MAX(pSeg->cb, pSeg->cbMapped); 1182 #if 11183 1185 return RTDbgModSegmentAdd(pThis->hCnt, pSeg->RVA, cb, pSeg->pchName, 0 /*fFlags*/, NULL); 1184 #else1185 return RTDbgModSegmentAdd(pThis->hCnt, pSeg->LinkAddress, cb, pSeg->pchName, 0 /*fFlags*/, NULL);1186 #endif1187 1186 } 1188 1187 … … 1383 1382 * Do the job. 1384 1383 */ 1385 return pThis->pMod->pImgVt->pfnMapPart(pThis->pMod, pThis->aSections[enmSect].offFile, pThis->aSections[enmSect].cb, 1384 return pThis->pMod->pImgVt->pfnMapPart(pThis->pMod, 1385 pThis->aSections[enmSect].iDbgInfo, 1386 pThis->aSections[enmSect].offFile, 1387 pThis->aSections[enmSect].cb, 1386 1388 &pThis->aSections[enmSect].pv); 1387 1389 } … … 1449 1451 } 1450 1452 1451 return pThis->pMod->pImgVt->pfnLinkAddressToSegOffset(pThis->pMod, LinkAddress, piSeg, poffSeg); 1453 return pThis->pMod->pImgVt->pfnRvaToSegOffset(pThis->pMod, LinkAddress, piSeg, poffSeg); 1454 //return pThis->pMod->pImgVt->pfnLinkAddressToSegOffset(pThis->pMod, LinkAddress, piSeg, poffSeg); 1452 1455 } 1453 1456 … … 2011 2014 if (offRet != off) 2012 2015 { 2016 AssertFailed(); 2013 2017 pCursor->rc = VERR_OUT_OF_RANGE; 2014 2018 offRet = UINT32_MAX; … … 2311 2315 RTUINTPTR offSeg; 2312 2316 rc = rtDbgModDwarfLinkAddressToSegOffset(pLnState->pDwarfMod, pLnState->Regs.uSegment, pLnState->Regs.uAddress, 2313 &iSeg, &offSeg); 2317 &iSeg, &offSeg); AssertRC(rc); 2314 2318 if (RT_SUCCESS(rc)) 2315 2319 { … … 3134 3138 { 3135 3139 AssertReturn(ATTR_GET_SIZE(pDesc) == sizeof(RTDWARFADDRRANGE), VERR_INTERNAL_ERROR_3); 3136 AssertReturn(pDesc->uAttr == DW_AT_ low_pc || pDesc->uAttr == DW_AT_high_pc, VERR_INTERNAL_ERROR_3);3140 AssertReturn(pDesc->uAttr == DW_AT_ranges, VERR_INTERNAL_ERROR_3); 3137 3141 NOREF(pDie); 3138 3142 … … 3280 3284 /* Watcom generates offset past the end of the section, increasing the 3281 3285 offset by one for each compile unit. So, just fudge it. */ 3282 Log(("rtDwarfDecode_SectOff: bad off=%#llx, attr %#x (%s), enmSect=%d cb=%#llx; Assuming watcom .\n", off,3286 Log(("rtDwarfDecode_SectOff: bad off=%#llx, attr %#x (%s), enmSect=%d cb=%#llx; Assuming watcom/gcc.\n", off, 3283 3287 pDesc->uAttr, rtDwarfLog_AttrName(pDesc->uAttr), enmSect, cbSect)); 3284 3288 off = cbSect; … … 3346 3350 *pbMember = (uint8_t)u64Val; 3347 3351 if (*pbMember != u64Val) 3352 { 3353 AssertFailed(); 3348 3354 return VERR_OUT_OF_RANGE; 3355 } 3349 3356 break; 3350 3357 … … 3352 3359 *(uint16_t *)pbMember = (uint16_t)u64Val; 3353 3360 if (*(uint16_t *)pbMember != u64Val) 3361 { 3362 AssertFailed(); 3354 3363 return VERR_OUT_OF_RANGE; 3364 } 3355 3365 break; 3356 3366 … … 3358 3368 *(uint32_t *)pbMember = (uint32_t)u64Val; 3359 3369 if (*(uint32_t *)pbMember != u64Val) 3370 { 3371 AssertFailed(); 3360 3372 return VERR_OUT_OF_RANGE; 3373 } 3361 3374 break; 3362 3375 … … 3364 3377 *(uint64_t *)pbMember = (uint64_t)u64Val; 3365 3378 if (*(uint64_t *)pbMember != u64Val) 3379 { 3380 AssertFailed(); 3366 3381 return VERR_OUT_OF_RANGE; 3382 } 3367 3383 break; 3368 3384 … … 3670 3686 pSubProgram->PcRange.uLowAddress, 3671 3687 &iSeg, &offSeg); 3688 AssertRC(rc); 3672 3689 if (RT_SUCCESS(rc)) 3690 { 3673 3691 rc = RTDbgModSymbolAdd(pThis->hCnt, pSubProgram->pszName, iSeg, offSeg, 3674 3692 pSubProgram->PcRange.uHighAddress - pSubProgram->PcRange.uLowAddress, 3675 3693 0 /*fFlags*/, NULL /*piOrdinal*/); 3694 AssertRC(rc); 3695 } 3676 3696 else 3677 3697 Log5(("rtDbgModDwarfLinkAddressToSegOffset failed: %Rrc\n", rc)); … … 3699 3719 rc = rtDbgModDwarfLinkAddressToSegOffset(pThis, pLabel->uSegment, pLabel->Address.uAddress, 3700 3720 &iSeg, &offSeg); 3721 AssertRC(rc); 3701 3722 if (RT_SUCCESS(rc)) 3723 { 3702 3724 rc = RTDbgModSymbolAdd(pThis->hCnt, pLabel->pszName, iSeg, offSeg, 0 /*cb*/, 3703 3725 0 /*fFlags*/, NULL /*piOrdinal*/); 3726 AssertRC(rc); 3727 } 3704 3728 else 3705 3729 Log5(("rtDbgModDwarfLinkAddressToSegOffset failed: %Rrc\n", rc)); … … 4369 4393 pThis->aSections[enmSect].pv = NULL; 4370 4394 pThis->aSections[enmSect].cb = (size_t)pDbgInfo->cb; 4395 pThis->aSections[enmSect].iDbgInfo = pDbgInfo->iDbgInfo; 4371 4396 if (pThis->aSections[enmSect].cb != pDbgInfo->cb) 4372 4397 pThis->aSections[enmSect].cb = ~(size_t)0; -
trunk/src/VBox/Runtime/common/dbg/dbgmodldr.cpp
r46113 r46149 71 71 72 72 /** @interface_method_impl{RTDBGMODVTIMG,pfnMapPart} */ 73 static DECLCALLBACK(int) rtDbgModLdr_MapPart(PRTDBGMODINT pMod, RTFOFF off, size_t cb, void const **ppvMap)73 static DECLCALLBACK(int) rtDbgModLdr_MapPart(PRTDBGMODINT pMod, uint32_t iDbgInfo, RTFOFF off, size_t cb, void const **ppvMap) 74 74 { 75 75 PRTDBGMODLDR pThis = (PRTDBGMODLDR)pMod->pvImgPriv; … … 79 79 return VERR_NO_MEMORY; 80 80 81 int rc = rtLdrReadAt(pThis->hLdrMod, pvMap, off, cb);81 int rc = rtLdrReadAt(pThis->hLdrMod, pvMap, iDbgInfo, off, cb); 82 82 if (RT_SUCCESS(rc)) 83 83 *ppvMap = pvMap; … … 96 96 PRTDBGMODLDR pThis = (PRTDBGMODLDR)pMod->pvImgPriv; 97 97 return RTLdrSize(pThis->hLdrMod); 98 } 99 100 101 /** @interface_method_impl{RTDBGMODVTIMG,pfnRvaToSegOffset} */ 102 static DECLCALLBACK(int) rtDbgModLdr_RvaToSegOffset(PRTDBGMODINT pMod, RTLDRADDR uRva, 103 PRTDBGSEGIDX piSeg, PRTLDRADDR poffSeg) 104 { 105 PRTDBGMODLDR pThis = (PRTDBGMODLDR)pMod->pvImgPriv; 106 return RTLdrRvaToSegOffset(pThis->hLdrMod, uRva, piSeg, poffSeg); 98 107 } 99 108 … … 176 185 /*.pfnGetLoadedSize = */ rtDbgModLdr_GetLoadedSize, 177 186 /*.pfnLinkAddressToSegOffset = */ rtDbgModLdr_LinkAddressToSegOffset, 187 /*.pfnRvaToSegOffset= */ rtDbgModLdr_RvaToSegOffset, 178 188 /*.pfnMapPart = */ rtDbgModLdr_MapPart, 179 189 /*.pfnUnmapPart = */ rtDbgModLdr_UnmapPart, -
trunk/src/VBox/Runtime/common/ldr/ldrELFRelocatable.cpp.h
r46083 r46149 759 759 RT_ZERO(DbgInfo.u); 760 760 DbgInfo.enmType = RTLDRDBGINFOTYPE_DWARF; 761 DbgInfo.pszExtFile = NULL; 761 762 DbgInfo.offFile = paShdrs[iShdr].sh_offset; 762 763 DbgInfo.cb = paShdrs[iShdr].sh_size; … … 888 889 while (cLeft-- > 0) 889 890 { 890 pShdr--;891 891 if (pShdr->sh_flags & SHF_ALLOC) 892 892 { … … 901 901 pShdrEnd = pShdr; 902 902 } 903 pShdr--; 903 904 } 904 905 … … 922 923 int rc = RTLDRELF_NAME(LinkAddressToSegOffset)(pMod, LinkAddress, &iSeg, &offSeg); 923 924 if (RT_SUCCESS(rc)) 924 *pRva = pModElf->paShdrs[iSeg ].sh_addr + offSeg;925 *pRva = pModElf->paShdrs[iSeg + 1].sh_addr + offSeg; 925 926 return rc; 926 927 } … … 964 965 while (cLeft-- > 0) 965 966 { 966 pShdr--;967 967 if (pShdr->sh_flags & SHF_ALLOC) 968 968 { … … 977 977 PrevAddr = pShdr->sh_addr; 978 978 } 979 pShdr--; 979 980 } 980 981 981 982 return VERR_LDR_INVALID_RVA; 983 } 984 985 986 /** @callback_method_impl{FNRTLDRIMPORT, Stub used by ReadDbgInfo.} */ 987 static DECLCALLBACK(int) RTLDRELF_NAME(GetImportStubCallback)(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, 988 unsigned uSymbol, PRTLDRADDR pValue, void *pvUser) 989 { 990 return VERR_SYMBOL_NOT_FOUND; 991 } 992 993 994 /** @copydoc RTLDROPS::pfnRvaToSegOffset. */ 995 static DECLCALLBACK(int) RTLDRELF_NAME(ReadDbgInfo)(PRTLDRMODINTERNAL pMod, uint32_t iDbgInfo, RTFOFF off, 996 size_t cb, void *pvBuf) 997 { 998 PRTLDRMODELF pThis = (PRTLDRMODELF)pMod; 999 1000 /* 1001 * Input validation. 1002 */ 1003 AssertReturn(iDbgInfo < pThis->Ehdr.e_shnum && iDbgInfo + 1 < pThis->Ehdr.e_shnum, VERR_INVALID_PARAMETER); 1004 iDbgInfo++; 1005 AssertReturn(!(pThis->paShdrs[iDbgInfo].sh_flags & SHF_ALLOC), VERR_INVALID_PARAMETER); 1006 AssertReturn(pThis->paShdrs[iDbgInfo].sh_type == SHT_PROGBITS, VERR_INVALID_PARAMETER); 1007 AssertReturn(pThis->paShdrs[iDbgInfo].sh_offset == (uint64_t)off, VERR_INVALID_PARAMETER); 1008 AssertReturn(pThis->paShdrs[iDbgInfo].sh_size == cb, VERR_INVALID_PARAMETER); 1009 RTFOFF cbRawImage = pThis->Core.pReader->pfnSize(pThis->Core.pReader); 1010 AssertReturn(cbRawImage >= 0, VERR_INVALID_PARAMETER); 1011 AssertReturn(off >= 0 && cb <= (uint64_t)cbRawImage && off + cb <= (uint64_t)cbRawImage, VERR_INVALID_PARAMETER); 1012 1013 /* 1014 * Read it from the file and look for fixup sections. 1015 */ 1016 int rc; 1017 if (pThis->pvBits) 1018 memcpy(pvBuf, (const uint8_t *)pThis->pvBits + (size_t)off, cb); 1019 else 1020 { 1021 rc = pThis->Core.pReader->pfnRead(pThis->Core.pReader, pvBuf, cb, off); 1022 if (RT_FAILURE(rc)) 1023 return rc; 1024 } 1025 1026 uint32_t iRelocs = iDbgInfo + 1; 1027 if ( iRelocs >= pThis->Ehdr.e_shnum 1028 || pThis->paShdrs[iRelocs].sh_info != iDbgInfo 1029 || ( pThis->paShdrs[iRelocs].sh_type != SHT_REL 1030 && pThis->paShdrs[iRelocs].sh_type != SHT_RELA) ) 1031 { 1032 iRelocs = 0; 1033 while ( iRelocs < pThis->Ehdr.e_shnum 1034 && ( pThis->paShdrs[iRelocs].sh_info != iDbgInfo 1035 || pThis->paShdrs[iRelocs].sh_type != SHT_REL 1036 || pThis->paShdrs[iRelocs].sh_type != SHT_RELA)) 1037 iRelocs++; 1038 } 1039 if ( iRelocs < pThis->Ehdr.e_shnum 1040 && pThis->paShdrs[iRelocs].sh_size > 0) 1041 { 1042 /* 1043 * Load the relocations. 1044 */ 1045 uint8_t *pbRelocsBuf = NULL; 1046 const uint8_t *pbRelocs; 1047 if (pThis->pvBits) 1048 pbRelocs = (const uint8_t *)pThis->pvBits + pThis->paShdrs[iRelocs].sh_offset; 1049 else 1050 { 1051 pbRelocs = pbRelocsBuf = (uint8_t *)RTMemTmpAlloc(pThis->paShdrs[iRelocs].sh_size); 1052 if (!pbRelocsBuf) 1053 return VERR_NO_TMP_MEMORY; 1054 rc = pThis->Core.pReader->pfnRead(pThis->Core.pReader, pbRelocsBuf, 1055 pThis->paShdrs[iRelocs].sh_size, 1056 pThis->paShdrs[iRelocs].sh_offset); 1057 if (RT_FAILURE(rc)) 1058 { 1059 RTMemTmpFree(pbRelocsBuf); 1060 return rc; 1061 } 1062 } 1063 1064 /* 1065 * Apply the relocations. 1066 */ 1067 rc = RTLDRELF_NAME(RelocateSection)(pThis, 0 /*BaseAddress*/, 1068 RTLDRELF_NAME(GetImportStubCallback), NULL /*pvUser*/, 1069 pThis->paShdrs[iDbgInfo].sh_addr, 1070 pThis->paShdrs[iDbgInfo].sh_size, 1071 (const uint8_t *)pvBuf, 1072 (uint8_t *)pvBuf, 1073 pbRelocs, 1074 pThis->paShdrs[iRelocs].sh_size); 1075 RTMemTmpFree(pbRelocsBuf); 1076 } 1077 else 1078 rc = VINF_SUCCESS; 1079 return rc; 982 1080 } 983 1081 … … 1009 1107 RTLDRELF_NAME(SegOffsetToRva), 1010 1108 RTLDRELF_NAME(RvaToSegOffset), 1109 RTLDRELF_NAME(ReadDbgInfo), 1011 1110 42 1012 1111 }; … … 1327 1426 const char *pszLogName = pReader->pfnLogName(pReader); 1328 1427 RTFOFF cbRawImage = pReader->pfnSize(pReader); 1329 AssertReturn(!fFlags, VERR_INVALID_PARAMETER);1330 1428 1331 1429 /* -
trunk/src/VBox/Runtime/common/ldr/ldrEx.cpp
r46083 r46149 547 547 * read from. 548 548 * @param pvBuf The output buffer. 549 * @param iDbgInfo The debug info ordinal number if the request 550 * corresponds exactly to a debug info part from 551 * pfnEnumDbgInfo. Otherwise, pass UINT32_MAX. 549 552 * @param off Where in the executable file to start reading. 550 553 * @param cb The number of bytes to read. 551 */ 552 DECLHIDDEN(int) rtLdrReadAt(RTLDRMOD hLdrMod, void *pvBuf, RTFOFF off, size_t cb) 553 { 554 AssertMsgReturn(rtldrIsValid(hLdrMod), ("hLdrMod=%p\n", hLdrMod), VERR_INVALID_HANDLE); 555 PRTLDRMODINTERNAL pMod = (PRTLDRMODINTERNAL)hLdrMod; 556 AssertReturn(pMod->pReader, VERR_INVALID_HANDLE); 557 554 * 555 * @remarks Fixups will only be applied if @a iDbgInfo is specified. 556 */ 557 DECLHIDDEN(int) rtLdrReadAt(RTLDRMOD hLdrMod, void *pvBuf, uint32_t iDbgInfo, RTFOFF off, size_t cb) 558 { 559 AssertMsgReturn(rtldrIsValid(hLdrMod), ("hLdrMod=%p\n", hLdrMod), VERR_INVALID_HANDLE); 560 PRTLDRMODINTERNAL pMod = (PRTLDRMODINTERNAL)hLdrMod; 561 562 if (iDbgInfo != UINT32_MAX) 563 { 564 AssertReturn(pMod->pOps->pfnReadDbgInfo, VERR_NOT_SUPPORTED); 565 return pMod->pOps->pfnReadDbgInfo(pMod, iDbgInfo, off, cb, pvBuf); 566 } 567 568 AssertReturn(pMod->pReader, VERR_NOT_SUPPORTED); 558 569 return pMod->pReader->pfnRead(pMod->pReader, pvBuf, cb, off); 559 570 } -
trunk/src/VBox/Runtime/common/ldr/ldrNative.cpp
r46083 r46149 71 71 rtldrNativeEnumSymbols, 72 72 /* ext: */ 73 NULL, 73 74 NULL, 74 75 NULL, -
trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp
r46133 r46149 1527 1527 rtldrPE_SegOffsetToRva, 1528 1528 rtldrPE_RvaToSegOffset, 1529 NULL, 1529 1530 42 1530 1531 }, … … 1556 1557 rtldrPE_SegOffsetToRva, 1557 1558 rtldrPE_RvaToSegOffset, 1559 NULL, 1558 1560 42 1559 1561 }, -
trunk/src/VBox/Runtime/common/ldr/ldrkStuff.cpp
r46083 r46149 828 828 rtkldr_SegOffsetToRva, 829 829 rtkldr_RvaToSegOffset, 830 NULL, 830 831 42 831 832 }; -
trunk/src/VBox/Runtime/include/internal/dbgmod.h
r46134 r46149 156 156 157 157 /** 158 * Converts an image relative virtual address to a segment:offset. 159 * 160 * @returns IPRT status code. 161 * 162 * @param pMod Pointer to the loader module structure. 163 * @param Rva The RVA to convert. 164 * @param piSeg The segment index. 165 * @param poffSeg Where to return the segment offset. 166 */ 167 DECLCALLBACKMEMBER(int, pfnRvaToSegOffset)(PRTDBGMODINT pMod, RTLDRADDR Rva, uint32_t *piSeg, PRTLDRADDR poffSeg); 168 169 /** 158 170 * Creates a read-only mapping of a part of the image file. 159 171 * … … 161 173 * 162 174 * @param pMod Pointer to the module structure. 175 * @param iDbgInfo The debug info ordinal number if the request 176 * corresponds exactly to a debug info part from 177 * pfnEnumDbgInfo. Otherwise, pass UINT32_MAX. 163 178 * @param off The offset into the image file. 164 179 * @param cb The number of bytes to map. 165 180 * @param ppvMap Where to return the mapping address on success. 166 */ 167 DECLCALLBACKMEMBER(int, pfnMapPart)(PRTDBGMODINT pMod, RTFOFF off, size_t cb, void const **ppvMap); 181 * 182 * @remarks Fixups will only be applied if @a iDbgInfo is specified. 183 */ 184 DECLCALLBACKMEMBER(int, pfnMapPart)(PRTDBGMODINT pMod, uint32_t iDbgInfo, RTFOFF off, size_t cb, void const **ppvMap); 168 185 169 186 /** -
trunk/src/VBox/Runtime/include/internal/ldr.h
r46083 r46149 297 297 * 298 298 * @param pMod Pointer to the loader module structure. 299 * @param iSeg The segment index.300 * @param offSeg The segment offset.301 * @param p Rva Where to return the RVA.299 * @param Rva The RVA to convert. 300 * @param piSeg Where to return the segment index. 301 * @param poffSeg Where to return the segment offset. 302 302 * @remark This is an optional entry point that can be NULL. 303 303 */ 304 304 DECLCALLBACKMEMBER(int, pfnRvaToSegOffset)(PRTLDRMODINTERNAL pMod, RTLDRADDR Rva, uint32_t *piSeg, PRTLDRADDR poffSeg); 305 306 /** 307 * Reads a debug info part (section) from the image. 308 * 309 * This is primarily needed for getting DWARF sections in ELF image with fixups 310 * applied and won't be required by most other loader backends. 311 * 312 * @returns IPRT status code. 313 * 314 * @param pvBuf The buffer to read into. 315 * @param iDbgInfo The debug info ordinal number if the request 316 * corresponds exactly to a debug info part from 317 * pfnEnumDbgInfo. Otherwise, pass UINT32_MAX. 318 * @param off The offset into the image file. 319 * @param cb The number of bytes to read. 320 * @param pMod Pointer to the loader module structure. 321 */ 322 DECLCALLBACKMEMBER(int, pfnReadDbgInfo)(PRTLDRMODINTERNAL pMod, uint32_t iDbgInfo, RTFOFF off, size_t cb, void *pvBuf); 305 323 306 324 /** Dummy entry to make sure we've initialized it all. */ … … 458 476 459 477 460 DECLHIDDEN(int) rtLdrReadAt(RTLDRMOD hLdrMod, void *pvBuf, RTFOFF off, size_t cb);478 DECLHIDDEN(int) rtLdrReadAt(RTLDRMOD hLdrMod, void *pvBuf, uint32_t iDbgInfo, RTFOFF off, size_t cb); 461 479 462 480 RT_C_DECLS_END
Note:
See TracChangeset
for help on using the changeset viewer.