labath added a comment.

In D63540#1550858 <https://reviews.llvm.org/D63540#1550858>, @clayborg wrote:

> So I am fine with symbols having zero size being in the symbol table. I would 
> be fine not changing anything in the sorting and leaving some symbols with 
> zero size, we just need to fix:
>
>   Symbol *Symtab::FindSymbolAtFileAddress(addr_t file_addr);
>
>
> To ignore zero sized symbols when it finds them _if_ there is another symbol 
> that has a size for that address. Wouldn't that fix the issue here?


You are assuming here that the symbols have size zero at the time we are 
performing the lookup. If I understand correctly what is going on, the problem 
here is that the code munging the symbol table (InitAddressIndexes), will set 
these symbols to have non-zero size. This is what this patch is trying to avoid.

The reason we are fiddling with the size of the symbols is because there are 
valid instances of symbols not having a size (usually coming from hand-written 
assembly, where one just doesn't bother to add the .size directive). However, 
it certainly seems like we shouldn't be doing that if there is another symbol 
at the same address, and this symbol has the size set correctly...


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D63540



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

Reply via email to