[all-commits] [llvm/llvm-project] 5b354d: [lldb] Make symbol list output from `image dump sy...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Thu Sep 3 01:28:11 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b354d204d0952a6dd39e41fb41b51414bff5f0b
      https://github.com/llvm/llvm-project/commit/5b354d204d0952a6dd39e41fb41b51414bff5f0b
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2020-09-03 (Thu, 03 Sep 2020)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
    M lldb/test/Shell/SymbolFile/Breakpad/symtab.test

  Log Message:
  -----------
  [lldb] Make symbol list output from `image dump symtab` not depend on internal ordering of DenseMap

`image dump symtab` seems to output the symbols in whatever order they appear in
the DenseMap that is used to filter out symbols with non-unique addresses. As
DenseMap is a hash map this order can change at any time so the output of this
command is pretty unstable. This also causes the `Breakpad/symtab.test` to fail
with enabled reverse iteration (which reverses the DenseMap order to find issues
like this).

This patch makes the DenseMap a std::vector and uses a separate DenseSet to do
the address filtering. The output order is now dependent on the order in which
the symbols are read (which should be deterministic). It might also avoid a bit
of work as all the work for creating the Symbol constructor parameters is only
done when we can actually emplace a new Symbol.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D87036




More information about the All-commits mailing list