Skip to content

Commit

Permalink
[BOLT][DWARF] Fix output ranges for deleted code
Browse files Browse the repository at this point in the history
Set range low_pc to 0 for DIEs that correspond to deleted code.

Fixes #73428
  • Loading branch information
maksfb committed Nov 29, 2023
1 parent f4a4e2f commit 0ffb626
Show file tree
Hide file tree
Showing 3 changed files with 917 additions and 2 deletions.
3 changes: 1 addition & 2 deletions bolt/lib/Rewrite/DWARFRewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -963,8 +963,7 @@ void DWARFRewriter::updateUnitDebugInfo(
std::move(OutputRanges), CachedRanges);
OutputRanges.clear();
} else if (OutputRanges.empty()) {
OutputRanges.push_back({RangesOrError.get().front().LowPC,
RangesOrError.get().front().HighPC});
OutputRanges.push_back({0, RangesOrError.get().front().HighPC});
}
} else if (!RangesOrError) {
consumeError(RangesOrError.takeError());
Expand Down
Loading

0 comments on commit 0ffb626

Please sign in to comment.