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

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 09:07:52 PST 2024


gbreynoo wrote:

Hi @ampandey-1995, I'm glad to see this come up again. 

There was some discussion in the previous PR that we didn't get to the bottom of, so I'll state it here: 
@jh7370 mentioned the potential different methods of "Use of the last address before the current one with a non-zero line value" vs "The last line table entry before the one for the specified address, with a non-zero line value". See https://github.com/llvm/llvm-project/pull/71032#issuecomment-1801303252. 

I think the llvm-symbolizer command guide should clearly specify the method used to derive the line number estimation. Maybe the help output as well.

There is also the question of would it be useful to have both methods available to the user, as outlined by @jh7370 in https://github.com/llvm/llvm-project/pull/71032#issuecomment-1798014589. I'm torn as although I see the value in giving the user the option, in most cases just outputting the previous entry in the line table would probably be good enough for an estimate and save making this too complicated.

I also think it should be clearer in the output of llvm-symbolizer when it is an approximate output value. You can input multiple addresses into llvm-symbolizer in one invocation so it would be useful to see which outputs required an estimate vs which are accurate.

https://github.com/llvm/llvm-project/pull/82240


More information about the llvm-commits mailing list