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

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 00:05:26 PDT 2024


jh7370 wrote:

> > > A further thought: Would it be reasonable for this option to change how the line table is parsed from its input? It could ignore the line zero entries in the line table entirely? That would support "backwards" it maybe a simpler way? (I could be open to arguments that that's philosophically problematic - modifying the line table itself, rather than only how it's queried - @jh7370 ?)
> > 
> > 
> > From llvm-symbolizer's point of view, it could make sense to skip line 0 entries, since those entries don't provide any symbolization information.
> 
> I disagree here - I thin kit does provide value to not claim a given instruction comes from a line we don't know it came from, by default at least/without some user opt-in and/or without telling the user that's what we're doing in some particular output.
> 
> > However, in more general terms, we can't change the line table parser to ignore them: consider the simple case where somebody wants to dump the raw line table, for example.
> 
> _nod_ I didn't mean to change it always, but to change it opt-in via a flag (like the one being discussed in this patch).
> 
> And I think that'd provide the simplest implementation, and easier to explain - though I still think it's pretty error prone/likely to produce confusion for users (which is why I have misgivings about implementing any support for this, to be honest).

Yeah, I see your point, and that does sound a bit more natural. I've also reached out to our internal binutils team to see if they have any particular preferences as to any approach taken.

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


More information about the llvm-commits mailing list