- Timestamp:
- May 10, 2013 12:13:23 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp
r45968 r45975 395 395 typedef RTDWARFABBREV const *PCRTDWARFABBREV; 396 396 397 /** 398 * Structure for gathering segment info. 399 */ 400 typedef struct RTDBGDWARFSEG 401 { 402 /** The highest offset in the segment. */ 403 uint64_t offHighest; 404 /** Calculated base address. */ 405 uint64_t uBaseAddr; 406 /** Estimated The segment size. */ 407 uint64_t cbSegment; 408 /** Segment number (RTLDRSEG::Sel16bit). */ 409 RTSEL uSegment; 410 } RTDBGDWARFSEG; 411 /** Pointer to segment info. */ 412 typedef RTDBGDWARFSEG *PRTDBGDWARFSEG; 413 397 414 398 415 /** … … 432 449 /** The list of compilation units (RTDWARFDIE). */ 433 450 RTLISTANCHOR CompileUnitList; 451 452 /** This is set to -1 if we're doing everything in one pass. 453 * Otherwise it's 1 or 2: 454 * - In pass 1, we collect segment info. 455 * - In pass 2, we add debug info to the container. 456 * The two pass parsing is necessary for watcom generated symbol files as 457 * these contains no information about the code and data segments in the 458 * image. So we have to figure out some approximate stuff based on the 459 * segments and offsets we encounter in the debug info. */ 460 int8_t iWatcomPass; 461 /** Segment index hint. */ 462 uint16_t iSegHint; 463 /** The number of segments in paSegs. 464 * (During segment copying, this is abused to count useful segments.) */ 465 uint32_t cSegs; 466 /** Pointer to segments if iWatcomPass isn't -1. */ 467 PRTDBGDWARFSEG paSegs; 434 468 } RTDBGMODDWARF; 435 469 /** Pointer to instance data of the DWARF reader. */ … … 487 521 uint32_t uIsa; 488 522 uint32_t uDiscriminator; 523 RTSEL uSegment; 489 524 } Regs; 490 525 /** @} */ … … 814 849 815 850 /** 851 * DW_TAG_label. 852 */ 853 typedef struct RTDWARFDIELABEL 854 { 855 /** The DIE core structure. */ 856 RTDWARFDIE Core; 857 /** The name. */ 858 const char *pszName; 859 /** The address of the first instruction. */ 860 RTDWARFADDR Address; 861 /** Segment number (watcom). */ 862 RTSEL uSegment; 863 /** Externally visible? */ 864 bool fExternal; 865 } RTDWARFDIELABEL; 866 /** Pointer to a DW_TAG_label DIE. */ 867 typedef RTDWARFDIELABEL *PRTDWARFDIELABEL; 868 /** Pointer to a const DW_TAG_label DIE. */ 869 typedef RTDWARFDIELABEL const *PCRTDWARFDIELABEL; 870 871 872 /** RTDWARFDIESUBPROGRAM attributes. */ 873 static const RTDWARFATTRDESC g_aLabelAttrs[] = 874 { 875 ATTR_ENTRY(DW_AT_name, RTDWARFDIELABEL, pszName, ATTR_INIT_ZERO, rtDwarfDecode_String), 876 ATTR_ENTRY(DW_AT_low_pc, RTDWARFDIELABEL, Address, ATTR_INIT_ZERO, rtDwarfDecode_Address), 877 ATTR_ENTRY(DW_AT_segment, RTDWARFDIELABEL, uSegment, ATTR_INIT_ZERO, rtDwarfDecode_SegmentLoc), 878 ATTR_ENTRY(DW_AT_external, RTDWARFDIELABEL, fExternal, ATTR_INIT_ZERO, rtDwarfDecode_Bool) 879 }; 880 881 /** RTDWARFDIESUBPROGRAM description. */ 882 static const RTDWARFDIEDESC g_LabelDesc = DIE_DESC_INIT(RTDWARFDIELABEL, g_aLabelAttrs); 883 884 885 /** 816 886 * Tag names and descriptors. 817 887 */ … … 839 909 TAGDESC_CORE(TAG_imported_declaration), /* 0x08 */ 840 910 TAGDESC_EMPTY(), 841 TAGDESC _CORE(TAG_label),911 TAGDESC(TAG_label, &g_LabelDesc), 842 912 TAGDESC_CORE(TAG_lexical_block), 843 913 TAGDESC_EMPTY(), /* 0x0c */ … … 1080 1150 1081 1151 /** @callback_method_impl{FNRTLDRENUMSEGS} */ 1082 static DECLCALLBACK(int) rtDbgMod HlpAddSegmentCallback(RTLDRMOD hLdrMod, PCRTLDRSEG pSeg, void *pvUser)1083 { 1084 PRTDBGMOD INT pMod = (PRTDBGMODINT)pvUser;1152 static DECLCALLBACK(int) rtDbgModDwarfScanSegmentsCallback(RTLDRMOD hLdrMod, PCRTLDRSEG pSeg, void *pvUser) 1153 { 1154 PRTDBGMODDWARF pThis = (PRTDBGMODDWARF)pvUser; 1085 1155 Log(("Segment %.*s: LinkAddress=%#llx RVA=%#llx cb=%#llx\n", 1086 1156 pSeg->cchName, pSeg->pchName, (uint64_t)pSeg->LinkAddress, (uint64_t)pSeg->RVA, pSeg->cb)); 1087 1157 NOREF(hLdrMod); 1088 1158 1159 /* Count relevant segments. */ 1160 if (pSeg->RVA != NIL_RTLDRADDR) 1161 pThis->cSegs++; 1162 1163 return VINF_SUCCESS; 1164 } 1165 1166 1167 /** @callback_method_impl{FNRTLDRENUMSEGS} */ 1168 static DECLCALLBACK(int) rtDbgModDwarfAddSegmentsCallback(RTLDRMOD hLdrMod, PCRTLDRSEG pSeg, void *pvUser) 1169 { 1170 PRTDBGMODDWARF pThis = (PRTDBGMODDWARF)pvUser; 1171 Log(("Segment %.*s: LinkAddress=%#llx RVA=%#llx cb=%#llx\n", 1172 pSeg->cchName, pSeg->pchName, (uint64_t)pSeg->LinkAddress, (uint64_t)pSeg->RVA, pSeg->cb)); 1173 NOREF(hLdrMod); 1174 AssertReturn(!pSeg->pchName[pSeg->cchName], VERR_DWARF_IPE); 1175 1089 1176 /* If the segment doesn't have a mapping, just add a dummy so the indexing 1090 1177 works out correctly (same as for the image). */ 1091 1178 if (pSeg->RVA == NIL_RTLDRADDR) 1092 return pMod->pDbgVt->pfnSegmentAdd(pMod, 0, 0, pSeg->pchName, pSeg->cchName, 0 /*fFlags*/, NULL);1179 return RTDbgModSegmentAdd(pThis->hCnt, 0, 0, pSeg->pchName, 0 /*fFlags*/, NULL); 1093 1180 1094 1181 RTLDRADDR cb = RT_MAX(pSeg->cb, pSeg->cbMapped); 1095 1182 #if 1 1096 return pMod->pDbgVt->pfnSegmentAdd(pMod, pSeg->RVA, cb, pSeg->pchName, pSeg->cchName, 0 /*fFlags*/, NULL);1183 return RTDbgModSegmentAdd(pThis->hCnt, pSeg->RVA, cb, pSeg->pchName, 0 /*fFlags*/, NULL); 1097 1184 #else 1098 return pMod->pDbgVt->pfnSegmentAdd(pMod, pSeg->LinkAddress, cb, pSeg->pchName, pSeg->cchName, 0 /*fFlags*/, NULL);1185 return RTDbgModSegmentAdd(pThis->hCnt, pSeg->LinkAddress, cb, pSeg->pchName, 0 /*fFlags*/, NULL); 1099 1186 #endif 1100 1187 } … … 1105 1192 * 1106 1193 * @returns IPRT status code. 1194 * @param pThis The DWARF instance. 1107 1195 * @param pMod The debug module. 1108 1196 */ 1109 DECLHIDDEN(int) rtDbgModHlpAddSegmentsFromImage(PRTDBGMODINT pMod)1197 static int rtDbgModDwarfAddSegmentsFromImage(PRTDBGMODDWARF pThis, PRTDBGMODINT pMod) 1110 1198 { 1111 1199 AssertReturn(pMod->pImgVt, VERR_INTERNAL_ERROR_2); 1112 return pMod->pImgVt->pfnEnumSegments(pMod, rtDbgModHlpAddSegmentCallback, pMod); 1113 } 1114 1115 1200 Assert(!pThis->cSegs); 1201 int rc = pMod->pImgVt->pfnEnumSegments(pMod, rtDbgModDwarfScanSegmentsCallback, pThis); 1202 if (RT_SUCCESS(rc)) 1203 { 1204 if (pThis->cSegs == 0) 1205 pThis->iWatcomPass = 1; 1206 else 1207 { 1208 pThis->cSegs = 0; 1209 pThis->iWatcomPass = -1; 1210 rc = pMod->pImgVt->pfnEnumSegments(pMod, rtDbgModDwarfAddSegmentsCallback, pThis); 1211 } 1212 } 1213 1214 return rc; 1215 } 1216 1217 1218 /** 1219 * Looks up a segment. 1220 * 1221 * @returns Pointer to the segment on success, NULL if not found. 1222 * @param pThis The DWARF instance. 1223 * @param uSeg The segment number / selector. 1224 */ 1225 static PRTDBGDWARFSEG rtDbgModDwarfFindSegment(PRTDBGMODDWARF pThis, RTSEL uSeg) 1226 { 1227 uint32_t cSegs = pThis->cSegs; 1228 uint32_t iSeg = pThis->iSegHint; 1229 PRTDBGDWARFSEG paSegs = pThis->paSegs; 1230 if ( iSeg < cSegs 1231 && paSegs[iSeg].uSegment == uSeg) 1232 return &paSegs[iSeg]; 1233 1234 for (iSeg = 0; iSeg < cSegs; iSeg++) 1235 if (uSeg == paSegs[iSeg].uSegment) 1236 { 1237 pThis->iSegHint = iSeg; 1238 return &paSegs[iSeg]; 1239 } 1240 1241 AssertFailed(); 1242 return NULL; 1243 } 1244 1245 1246 /** 1247 * Record a segment:offset during pass 1. 1248 * 1249 * @returns IPRT status code. 1250 * @param pThis The DWARF instance. 1251 * @param uSeg The segment number / selector. 1252 * @param offSeg The segment offset. 1253 */ 1254 static int rtDbgModDwarfRecordSegOffset(PRTDBGMODDWARF pThis, RTSEL uSeg, uint64_t offSeg) 1255 { 1256 /* Look up the segment. */ 1257 uint32_t cSegs = pThis->cSegs; 1258 uint32_t iSeg = pThis->iSegHint; 1259 PRTDBGDWARFSEG paSegs = pThis->paSegs; 1260 if ( iSeg >= cSegs 1261 || paSegs[iSeg].uSegment != uSeg) 1262 { 1263 for (iSeg = 0; iSeg < cSegs; iSeg++) 1264 if (uSeg <= paSegs[iSeg].uSegment) 1265 break; 1266 if ( iSeg >= cSegs 1267 || paSegs[iSeg].uSegment != uSeg) 1268 { 1269 /* Add */ 1270 void *pvNew = RTMemRealloc(paSegs, (pThis->cSegs + 1) * sizeof(paSegs[0])); 1271 if (!pvNew) 1272 return VERR_NO_MEMORY; 1273 pThis->paSegs = paSegs = (PRTDBGDWARFSEG)pvNew; 1274 if (iSeg != cSegs) 1275 memmove(&paSegs[iSeg + 1], &paSegs[iSeg], (cSegs - iSeg) * sizeof(paSegs[0])); 1276 paSegs[iSeg].offHighest = offSeg; 1277 paSegs[iSeg].uBaseAddr = 0; 1278 paSegs[iSeg].cbSegment = 0; 1279 paSegs[iSeg].uSegment = uSeg; 1280 pThis->cSegs++; 1281 } 1282 1283 pThis->iSegHint = iSeg; 1284 } 1285 1286 /* Increase it's range? */ 1287 if (paSegs[iSeg].offHighest < offSeg) 1288 { 1289 Log3(("rtDbgModDwarfRecordSegOffset: iSeg=%d uSeg=%#06x offSeg=%#llx\n", iSeg, uSeg, offSeg)); 1290 paSegs[iSeg].offHighest = offSeg; 1291 } 1292 1293 return VINF_SUCCESS; 1294 } 1295 1296 1297 /** 1298 * Calls pfnSegmentAdd for each segment in the executable image. 1299 * 1300 * @returns IPRT status code. 1301 * @param pThis The DWARF instance. 1302 */ 1303 static int rtDbgModDwarfAddSegmentsFromPass1(PRTDBGMODDWARF pThis) 1304 { 1305 AssertReturn(pThis->cSegs, VERR_DWARF_BAD_INFO); 1306 uint32_t const cSegs = pThis->cSegs; 1307 PRTDBGDWARFSEG paSegs = pThis->paSegs; 1308 1309 /* 1310 * Are the segments assigned more or less in numerical order? 1311 */ 1312 if ( paSegs[0].uSegment < 16U 1313 && paSegs[cSegs - 1].uSegment - paSegs[0].uSegment + 1U <= cSegs + 16U) 1314 { 1315 /** @todo heuristics, plase. */ 1316 AssertFailedReturn(VERR_DWARF_TODO); 1317 1318 } 1319 /* 1320 * Assume DOS segmentation. 1321 */ 1322 else 1323 { 1324 for (uint32_t iSeg = 0; iSeg < cSegs; iSeg++) 1325 paSegs[iSeg].uBaseAddr = (uint32_t)paSegs[iSeg].uSegment << 16; 1326 for (uint32_t iSeg = 0; iSeg < cSegs; iSeg++) 1327 paSegs[iSeg].cbSegment = paSegs[iSeg].offHighest; 1328 } 1329 1330 /* 1331 * Add them. 1332 */ 1333 for (uint32_t iSeg = 0; iSeg < cSegs; iSeg++) 1334 { 1335 Log3(("rtDbgModDwarfAddSegmentsFromPass1: Seg#%u: %#010llx LB %#llx uSegment=%#x\n", 1336 iSeg, paSegs[iSeg].uBaseAddr, paSegs[iSeg].cbSegment, paSegs[iSeg].uSegment)); 1337 char szName[32]; 1338 RTStrPrintf(szName, sizeof(szName), "seg-%#04xh", paSegs[iSeg].uSegment); 1339 int rc = RTDbgModSegmentAdd(pThis->hCnt, paSegs[iSeg].uBaseAddr, paSegs[iSeg].cbSegment, 1340 szName, 0 /*fFlags*/, NULL); 1341 if (RT_FAILURE(rc)) 1342 return rc; 1343 } 1344 1345 return VINF_SUCCESS; 1346 } 1116 1347 1117 1348 … … 1199 1430 * @returns IPRT status code. 1200 1431 * @param pThis The DWARF instance. 1432 * @param uSegment The segment, 0 if not applicable. 1201 1433 * @param LinkAddress The address to convert.. 1202 1434 * @param piSeg The segment index. 1203 1435 * @param poffSeg Where to return the segment offset. 1204 1436 */ 1205 static int rtDbgModDwarfLinkAddressToSegOffset(PRTDBGMODDWARF pThis, uint64_t LinkAddress,1437 static int rtDbgModDwarfLinkAddressToSegOffset(PRTDBGMODDWARF pThis, RTSEL uSegment, uint64_t LinkAddress, 1206 1438 PRTDBGSEGIDX piSeg, PRTLDRADDR poffSeg) 1207 1439 { 1440 if (pThis->paSegs) 1441 { 1442 PRTDBGDWARFSEG pSeg = rtDbgModDwarfFindSegment(pThis, uSegment); 1443 if (pSeg) 1444 { 1445 *piSeg = pSeg - pThis->paSegs; 1446 *poffSeg = LinkAddress; 1447 return VINF_SUCCESS; 1448 } 1449 } 1450 1208 1451 return pThis->pMod->pImgVt->pfnLinkAddressToSegOffset(pThis->pMod, LinkAddress, piSeg, poffSeg); 1209 1452 } … … 2054 2297 static int rtDwarfLine_AddLine(PRTDWARFLINESTATE pLnState, uint32_t offOpCode) 2055 2298 { 2056 const char *pszFile = pLnState->Regs.iFile < pLnState->cFileNames 2057 ? pLnState->papszFileNames[pLnState->Regs.iFile] 2058 : "<bad file name index>"; 2059 NOREF(offOpCode); 2060 2061 RTDBGSEGIDX iSeg; 2062 RTUINTPTR offSeg; 2063 int rc = rtDbgModDwarfLinkAddressToSegOffset(pLnState->pDwarfMod, pLnState->Regs.uAddress, &iSeg, &offSeg); 2064 if (RT_SUCCESS(rc)) 2065 { 2066 Log2(("rtDwarfLine_AddLine: %x:%08llx (%#llx) %s(%d) [offOpCode=%08x]\n", iSeg, offSeg, pLnState->Regs.uAddress, pszFile, pLnState->Regs.uLine, offOpCode)); 2067 rc = RTDbgModLineAdd(pLnState->pDwarfMod->hCnt, pszFile, pLnState->Regs.uLine, iSeg, offSeg, NULL); 2068 2069 /* Ignore address conflicts for now. */ 2070 if (rc == VERR_DBG_ADDRESS_CONFLICT) 2071 rc = VINF_SUCCESS; 2299 PRTDBGMODDWARF pThis = pLnState->pDwarfMod; 2300 int rc; 2301 if (pThis->iWatcomPass == 1) 2302 rc = rtDbgModDwarfRecordSegOffset(pThis, pLnState->Regs.uSegment, pLnState->Regs.uAddress + 1); 2303 else 2304 { 2305 const char *pszFile = pLnState->Regs.iFile < pLnState->cFileNames 2306 ? pLnState->papszFileNames[pLnState->Regs.iFile] 2307 : "<bad file name index>"; 2308 NOREF(offOpCode); 2309 2310 RTDBGSEGIDX iSeg; 2311 RTUINTPTR offSeg; 2312 rc = rtDbgModDwarfLinkAddressToSegOffset(pLnState->pDwarfMod, pLnState->Regs.uSegment, pLnState->Regs.uAddress, 2313 &iSeg, &offSeg); 2314 if (RT_SUCCESS(rc)) 2315 { 2316 Log2(("rtDwarfLine_AddLine: %x:%08llx (%#llx) %s(%d) [offOpCode=%08x]\n", iSeg, offSeg, pLnState->Regs.uAddress, pszFile, pLnState->Regs.uLine, offOpCode)); 2317 rc = RTDbgModLineAdd(pLnState->pDwarfMod->hCnt, pszFile, pLnState->Regs.uLine, iSeg, offSeg, NULL); 2318 2319 /* Ignore address conflicts for now. */ 2320 if (rc == VERR_DBG_ADDRESS_CONFLICT) 2321 rc = VINF_SUCCESS; 2322 } 2072 2323 } 2073 2324 … … 2099 2350 pLnState->Regs.uIsa = 0; 2100 2351 pLnState->Regs.uDiscriminator = 0; 2352 pLnState->Regs.uSegment = 0; 2101 2353 } 2102 2354 … … 2297 2549 uint64_t uSeg = rtDwarfCursor_GetVarSizedU(pCursor, cbInstr - 1, UINT64_MAX); 2298 2550 Log2(("%08x: DW_LNE_set_segment: %#llx, cbInstr=%#x - Watcom Extension\n", offOpCode, uSeg, cbInstr)); 2299 NOREF(uSeg);2300 /** @todo make use of this? */2551 pLnState->Regs.uSegment = (RTSEL)uSeg; 2552 AssertStmt(pLnState->Regs.uSegment == uSeg, rc = VERR_DWARF_BAD_INFO); 2301 2553 } 2302 2554 break; … … 3361 3613 { 3362 3614 if (LocSt.iTop >= 0) 3615 { 3363 3616 *(uint16_t *)pbMember = LocSt.auStack[LocSt.iTop]; 3364 else 3365 rc = VERR_DWARF_STACK_UNDERFLOW; 3617 Log4((" %-20s %#06llx [%s]\n", rtDwarfLog_AttrName(pDesc->uAttr), 3618 LocSt.auStack[LocSt.iTop], rtDwarfLog_FormName(uForm))); 3619 return VINF_SUCCESS; 3620 } 3621 rc = VERR_DWARF_STACK_UNDERFLOW; 3366 3622 } 3367 3623 } … … 3405 3661 && pSubProgram->PcRange.cAttrs == 2) 3406 3662 { 3407 RTDBGSEGIDX iSeg; 3408 RTUINTPTR offSeg; 3409 rc = rtDbgModDwarfLinkAddressToSegOffset(pThis, pSubProgram->PcRange.uLowAddress, 3410 &iSeg, &offSeg); 3411 if (RT_SUCCESS(rc)) 3412 rc = RTDbgModSymbolAdd(pThis->hCnt, pSubProgram->pszName, iSeg, offSeg, 3413 pSubProgram->PcRange.uHighAddress - pSubProgram->PcRange.uLowAddress, 3414 0 /*fFlags*/, NULL /*piOrdinal*/); 3663 if (pThis->iWatcomPass == 1) 3664 rc = rtDbgModDwarfRecordSegOffset(pThis, pSubProgram->uSegment, pSubProgram->PcRange.uHighAddress); 3415 3665 else 3416 Log5(("rtDbgModDwarfLinkAddressToSegOffset failed: %Rrc\n", rc)); 3666 { 3667 RTDBGSEGIDX iSeg; 3668 RTUINTPTR offSeg; 3669 rc = rtDbgModDwarfLinkAddressToSegOffset(pThis, pSubProgram->uSegment, 3670 pSubProgram->PcRange.uLowAddress, 3671 &iSeg, &offSeg); 3672 if (RT_SUCCESS(rc)) 3673 rc = RTDbgModSymbolAdd(pThis->hCnt, pSubProgram->pszName, iSeg, offSeg, 3674 pSubProgram->PcRange.uHighAddress - pSubProgram->PcRange.uLowAddress, 3675 0 /*fFlags*/, NULL /*piOrdinal*/); 3676 else 3677 Log5(("rtDbgModDwarfLinkAddressToSegOffset failed: %Rrc\n", rc)); 3678 } 3417 3679 } 3418 3680 } … … 3420 3682 else 3421 3683 Log5(("subprogram %s (%s) external\n", pSubProgram->pszName, pSubProgram->pszLinkageName)); 3684 break; 3685 } 3686 3687 case DW_TAG_label: 3688 { 3689 PCRTDWARFDIELABEL pLabel = (PCRTDWARFDIELABEL)pDie; 3690 if (pLabel->fExternal) 3691 { 3692 Log5(("label %s %#x:%#llx\n", pLabel->pszName, pLabel->uSegment, pLabel->Address.uAddress)); 3693 if (pThis->iWatcomPass == 1) 3694 rc = rtDbgModDwarfRecordSegOffset(pThis, pLabel->uSegment, pLabel->Address.uAddress); 3695 else 3696 { 3697 RTDBGSEGIDX iSeg; 3698 RTUINTPTR offSeg; 3699 rc = rtDbgModDwarfLinkAddressToSegOffset(pThis, pLabel->uSegment, pLabel->Address.uAddress, 3700 &iSeg, &offSeg); 3701 if (RT_SUCCESS(rc)) 3702 rc = RTDbgModSymbolAdd(pThis->hCnt, pLabel->pszName, iSeg, offSeg, 0 /*cb*/, 3703 0 /*fFlags*/, NULL /*piOrdinal*/); 3704 else 3705 Log5(("rtDbgModDwarfLinkAddressToSegOffset failed: %Rrc\n", rc)); 3706 } 3707 3708 } 3422 3709 break; 3423 3710 } … … 3662 3949 3663 3950 /* 3664 * Snoop eup symbols on the way out.3951 * Snoop up symbols on the way out. 3665 3952 */ 3666 3953 if (RT_SUCCESS(rc)) … … 3855 4142 RTDWARFCURSOR Cursor; 3856 4143 int rc = rtDwarfCursor_Init(&Cursor, pThis, krtDbgModDwarfSect_info); 3857 if (RT_FAILURE(rc)) 3858 return rc; 3859 3860 while ( !rtDwarfCursor_IsAtEnd(&Cursor) 3861 && RT_SUCCESS(rc)) 3862 rc = rtDwarfInfo_LoadUnit(pThis, &Cursor, false /* fKeepDies */); 3863 3864 return rtDwarfCursor_Delete(&Cursor, rc); 4144 if (RT_SUCCESS(rc)) 4145 { 4146 while ( !rtDwarfCursor_IsAtEnd(&Cursor) 4147 && RT_SUCCESS(rc)) 4148 rc = rtDwarfInfo_LoadUnit(pThis, &Cursor, false /* fKeepDies */); 4149 4150 rc = rtDwarfCursor_Delete(&Cursor, rc); 4151 } 4152 return rc; 3865 4153 } 3866 4154 … … 4123 4411 pMod->pvDbgPriv = pThis; 4124 4412 4125 rc = rtDbgMod HlpAddSegmentsFromImage(pMod);4413 rc = rtDbgModDwarfAddSegmentsFromImage(pThis, pMod); 4126 4414 if (RT_SUCCESS(rc)) 4127 4415 rc = rtDwarfInfo_LoadAll(pThis); 4128 4416 if (RT_SUCCESS(rc)) 4129 4417 rc = rtDwarfLine_ExplodeAll(pThis); 4418 if (RT_SUCCESS(rc) && pThis->iWatcomPass == 1) 4419 { 4420 rc = rtDbgModDwarfAddSegmentsFromPass1(pThis); 4421 pThis->iWatcomPass = 2; 4422 if (RT_SUCCESS(rc)) 4423 rc = rtDwarfInfo_LoadAll(pThis); 4424 if (RT_SUCCESS(rc)) 4425 rc = rtDwarfLine_ExplodeAll(pThis); 4426 } 4130 4427 if (RT_SUCCESS(rc)) 4131 4428 {
Note:
See TracChangeset
for help on using the changeset viewer.