clayborg added a comment.

In D136207#3866729 <https://reviews.llvm.org/D136207#3866729>, @jingham wrote:

> Seems reasonable that when resolving the start address of a line entry from 
> CU A we get back a line entry in CU B, then there's just something wrong in 
> the debug info.  Trying to recover whatever info is recoverable seems 
> worthwhile: essentially by falling back to a `resolve_scope` of 
> `eSymbolContextLineEntry`.
>
> However, that does produce a fairly odd SymbolContext.  Did we ever have a 
> case where you can have aSymbolContext with a valid CU & LineEntry that is in 
> no function and no block for realz?  I wouldn't be altogether surprised if we 
> had code that asks to resolve everything in ResolveSymbolContext and if we 
> get a CU & LineEntry back, assumes you must also have a block or function, 
> and uses them w/o checking.  I can't think of a good way to defend against 
> this except maybe saying explicitly in SymbolContext.h that because of 
> potential bad debug info you can't make any assumptions about which entities 
> will get filled in in a symbol context.
>
> I also found the first of the two comments you added confusing.

I didn't mean to leave the first comment it actually. When I first figured out 
the root cause I put that in there. Let me know if the current state of the 
comments makes more sense


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136207

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to