[lld] [llvm] [Symbolizer] Support for Missing Line Numbers. (PR #82240)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 29 08:32:40 PDT 2024
================
@@ -1312,23 +1312,27 @@ uint32_t DWARFDebugLine::LineTable::findRowInSeq(
return RowPos - Rows.begin();
}
-uint32_t DWARFDebugLine::LineTable::lookupAddress(
- object::SectionedAddress Address) const {
+uint32_t
+DWARFDebugLine::LineTable::lookupAddress(object::SectionedAddress Address,
+ bool Approximate,
+ bool *IsApproximateLine) const {
// Search for relocatable addresses
- uint32_t Result = lookupAddressImpl(Address);
+ uint32_t Result = lookupAddressImpl(Address, Approximate, IsApproximateLine);
if (Result != UnknownRowIndex ||
Address.SectionIndex == object::SectionedAddress::UndefSection)
return Result;
// Search for absolute addresses
Address.SectionIndex = object::SectionedAddress::UndefSection;
- return lookupAddressImpl(Address);
+ return lookupAddressImpl(Address, Approximate, IsApproximateLine);
}
-uint32_t DWARFDebugLine::LineTable::lookupAddressImpl(
- object::SectionedAddress Address) const {
+uint32_t
+DWARFDebugLine::LineTable::lookupAddressImpl(object::SectionedAddress Address,
+ bool Approximate,
+ bool *IsApproximateLine) const {
----------------
dwblaikie wrote:
This should be one parameter rather than two, I think? (thought we discussed this before, though, so maybe there's a reason it can't be just one)
A non-null IsApproximateLine could be interpreted as a request for approximation, then whether or not approximation was used in the response would be provided via writing through the pointer (true or false as needed).
(the caller up in `getFileLineInfoForAddress` can do this:
```
uint32_t RowIndex =
lookupAddress(Address, Approximate ? &Result.IsApproximatedLine : nullptr);
```
https://github.com/llvm/llvm-project/pull/82240
More information about the llvm-commits
mailing list