[lld] [llvm] [Symbolizer] Support for Missing Line Numbers. (PR #82240)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 2 10:55:20 PDT 2024
================
@@ -1312,23 +1312,25 @@ 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 *IsApproximateLine) const {
// Search for relocatable addresses
- uint32_t Result = lookupAddressImpl(Address);
+ uint32_t Result = lookupAddressImpl(Address, 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, IsApproximateLine);
}
-uint32_t DWARFDebugLine::LineTable::lookupAddressImpl(
- object::SectionedAddress Address) const {
+uint32_t
+DWARFDebugLine::LineTable::lookupAddressImpl(object::SectionedAddress Address,
+ bool *IsApproximateLine) const {
// First, find an instruction sequence containing the given address.
----------------
dwblaikie wrote:
Could you add an assertion, something like:
```
assert(!IsApproximateLine || !*IsApproximateLine && "Make sure IsApproximateLine is appropriately initialized, if provided");
```
Since the rest of the code I guess assumes that if the pointer is non-null it points to something that starts off `false`?
https://github.com/llvm/llvm-project/pull/82240
More information about the llvm-commits
mailing list