@@ -1364,47 +1364,6 @@ void getRangeAttrData(DWARFDie DIE, Optional<AttrInfo> &LowPCVal,
1364
1364
1365
1365
} // namespace
1366
1366
1367
- void DWARFRewriter::patchLowHigh (DWARFDie DIE, DebugAddressRange Range,
1368
- SimpleBinaryPatcher &DebugInfoPatcher,
1369
- Optional<uint64_t > DWOId) {
1370
- Optional<AttrInfo> LowPCVal = None;
1371
- Optional<AttrInfo> HighPCVal = None;
1372
- getRangeAttrData (DIE, LowPCVal, HighPCVal);
1373
- uint64_t LowPCOffset = LowPCVal->Offset ;
1374
- uint64_t HighPCOffset = HighPCVal->Offset ;
1375
- auto *TempDebugPatcher = &DebugInfoPatcher;
1376
- if (LowPCVal->V .getForm () == dwarf::DW_FORM_GNU_addr_index) {
1377
- uint32_t AddressIndex =
1378
- AddrWriter->getIndexFromAddress (Range.LowPC , *DWOId);
1379
- TempDebugPatcher = getBinaryDWODebugInfoPatcher (*DWOId);
1380
- TempDebugPatcher->addUDataPatch (LowPCOffset, AddressIndex, LowPCVal->Size );
1381
- // 2.17.2
1382
- // If the value of the DW_AT_high_pc is of class address, it is the
1383
- // relocated address of the first location past the last instruction
1384
- // associated with the entity; if it is of class constant, the value is
1385
- // an unsigned integer offset which when added to the low PC gives the
1386
- // address of the first location past the last instruction associated
1387
- // with the entity.
1388
- if (!HighPCVal->V .isFormClass (DWARFFormValue::FC_Constant)) {
1389
- AddressIndex = AddrWriter->getIndexFromAddress (Range.HighPC , *DWOId);
1390
- TempDebugPatcher->addUDataPatch (HighPCOffset, AddressIndex,
1391
- HighPCVal->Size );
1392
- }
1393
- } else {
1394
- TempDebugPatcher->addLE64Patch (LowPCOffset, Range.LowPC );
1395
- }
1396
-
1397
- uint64_t HighPC = Range.HighPC ;
1398
- // The DW_FORM_data* is delta between high and low pc
1399
- if (HighPCVal->V .getForm () != dwarf::Form::DW_FORM_addr)
1400
- HighPC -= Range.LowPC ;
1401
-
1402
- if (isHighPcFormEightBytes (HighPCVal->V .getForm ()))
1403
- TempDebugPatcher->addLE64Patch (HighPCOffset, HighPC);
1404
- else
1405
- TempDebugPatcher->addLE32Patch (HighPCOffset, HighPC);
1406
- }
1407
-
1408
1367
void DWARFRewriter::convertToRangesPatchAbbrev (
1409
1368
const DWARFUnit &Unit, const DWARFAbbreviationDeclaration *Abbrev,
1410
1369
DebugAbbrevWriter &AbbrevWriter, Optional<uint64_t > RangesBase) {
0 commit comments