[lld] [llvm] [Symbolizer] Support for Missing Line Numbers. (PR #82240)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 11:41:16 PDT 2024


================
@@ -1477,10 +1494,10 @@ bool DWARFDebugLine::Prologue::getFileNameByIndex(
 }
 
 bool DWARFDebugLine::LineTable::getFileLineInfoForAddress(
-    object::SectionedAddress Address, const char *CompDir,
-    FileLineInfoKind Kind, DILineInfo &Result) const {
+    object::SectionedAddress Address, DWARFDebugLine::Approximate Approximation,
----------------
dwblaikie wrote:

Oh, Approximation here is input-only, then the output is via `Result`? All the more reason not to have the Approximation structure - it'd be confusing to callers to have it with both its input and output bool members, but only the input one is relevant on this API.

So this API (`getFileLineInfoForAddress`) should take a bool by value, whether to enable approximation, then it should pass a distinct bool by pointer to `lookupAddress`.

Something like this:

```
bool DWARFDebugLine::getFileLineInfoForAddress(..., bool Approximate, ...) {
  Result.IsApproximatedLine = false;
  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