[PATCH] D120660: [llvm-symbolizer] Add --approximate-missing-line-numbers Command Line Option

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 3 07:30:47 PST 2022


probinson added a comment.

The decrementing solution came up because in the cases where we see this in the wild, it's symbolizing a backtrace (or possibly just one return address) and the return address naturally doesn't point to the call instruction, it points one past the call instruction; the instruction after a call might have line 0 for various reasons, the most blatant being that it's a `noreturn` call.  But the call instruction itself nearly always will not have line 0.
So, _in practice_, we'll basically decrement once and be done.

Obviously there can be pathological cases and we should avoid those.  But a "try decrementing once only" solution seems like it would solve the practical problem, and avoid the pathological cases.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120660/new/

https://reviews.llvm.org/D120660



More information about the llvm-commits mailing list