SymbolVendor: Move locking into the Symbol Files
authorPavel Labath <pavel@labath.sk>
Tue, 30 Jul 2019 08:20:05 +0000 (08:20 +0000)
committerPavel Labath <pavel@labath.sk>
Tue, 30 Jul 2019 08:20:05 +0000 (08:20 +0000)
commit656ddeb2b7c1a4a824446829e5b88b38307e1e08
tree7dcf6dc4d9750f6a1aec5a87daab0fd9ee620fed
parente3a4a13fcc0d23101f2dc71ffd0b9cedbc25c80c
SymbolVendor: Move locking into the Symbol Files

Summary:
The last bit of functionality in SymbolVendor passthrough functions is
the locking the module mutex. While it may be nice doing the locking in
a central place, we weren't really succesful in doing that right now,
because some SymbolFile function could still be called without going
through the SymbolVendor. This meant in SymbolFileDWARF (the only
battle-tested symbol file implementation) roughly a half of the
functions was taking additional locks and another half was asserting
that the lock is already held. By making the SymbolFile responsible for
locking, we can at least make the situation in SymbolFileDWARF more
consistent.

Reviewers: clayborg, JDevlieghere, jingham, jdoerfert

Subscribers: aprantl, lldb-commits

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

llvm-svn: 367298
lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
lldb/source/Symbol/SymbolFile.cpp
lldb/source/Symbol/SymbolVendor.cpp