[Lldb-commits] [PATCH] D76758: Augment lldb's symbol table with external symbols in Mach-O's dyld trie
Jason Molenda via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 25 23:58:19 PDT 2020
jasonmolenda marked 11 inline comments as done.
jasonmolenda added inline comments.
================
Comment at: lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:4499
+ std::sort(external_sym_trie_entries.begin(),
+ external_sym_trie_entries.end(), sort_by_address);
+ for (uint32_t i = 0; i < sym_idx; i++) {
----------------
aprantl wrote:
> Do we need llvm::stable_sort here to have reproducible behavior or does it not matter?
The dyld trie should not have multiple exported symbols with the same address, so sorting the vector by address should be fine. If that were to happen, we'd probably only clear the first one from the trie and we would eventually add the second one when we iterate over the table. I don't that's something I'll check in the code tho, it doesn't make much sense.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76758/new/
https://reviews.llvm.org/D76758
More information about the lldb-commits
mailing list