[Lldb-commits] [PATCH] D67390: [LLDB][ELF] Load both, .symtab and .dynsym sections
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 17 08:43:06 PDT 2019
clayborg added a comment.
In D67390#1672254 <https://reviews.llvm.org/D67390#1672254>, @labath wrote:
> In D67390#1672210 <https://reviews.llvm.org/D67390#1672210>, @kwk wrote:
>
> > So my point of this whole question is: What makes a symbol unique in the sense that it shouldn't be added to the symtab if it is already there?
>
>
> A symbol name is not unique because you can have multiple (static) functions with the same (mangled) name in one module. An address is not unique as well because you can have symbol aliases, which will have the same address (and we want to keep both names to resolve name breakpoints correctly for instance).
>
> The name+address combination (my original suggestion) should be sufficiently unique for the purposes we care about. Theoretically, if you want, you could include some additional items in the uniqueness "key" like symbol type etc. (to rule out the perverse case of somebody setting a "file" symbol to conflict with some other function symbol), but I don't think that is really necessary.
We could track any extra data we need in the map if needed as Pavel suggests above. Not sure if it is needed, but we could do it if necessary.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67390/new/
https://reviews.llvm.org/D67390
More information about the lldb-commits
mailing list