[NativePDB] Rewrite the PdbSymUid to use our own custom namespacing scheme.
authorZachary Turner <zturner@google.com>
Fri, 16 Nov 2018 02:42:32 +0000 (02:42 +0000)
committerZachary Turner <zturner@google.com>
Fri, 16 Nov 2018 02:42:32 +0000 (02:42 +0000)
commit6284aee9f811d596b941e44b30dee5befbc22f20
tree479104d0244245dadeb614f36a02ec44c44f1553
parentab73426c68747fb5221f7ef818de1f71d873dca8
[NativePDB] Rewrite the PdbSymUid to use our own custom namespacing scheme.

Originally we created our 64-bit UID scheme by using the first byte as
sort of a "tag" to represent what kind of symbol this was, and we
re-used the PDB_SymType enumeration for this.  For native pdb support,
this is not really the right abstraction layer, because what we really
want is something that tells us *how* to find the symbol.  This means,
specifically, is in the globals stream / public stream / module stream /
TPI stream / etc, and for whichever one it is in, where is it within
that stream?

A good example of why the old namespacing scheme was insufficient is
that it is more or less impossible to create a uid for a field list
member of a class/struction/union/enum that tells you how to locate
the original record.

With this new scheme, the first byte is no longer a PDB_SymType enum
but a new enum created specifically to identify where in the PDB
this record lives.  This gives us much better flexibility in
what kinds of symbols the uids can identify.

llvm-svn: 347018
14 files changed:
lldb/source/Plugins/SymbolFile/NativePDB/CMakeLists.txt
lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.cpp
lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.h
lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp
lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.h
lldb/source/Plugins/SymbolFile/NativePDB/PdbSymUid.cpp [new file with mode: 0644]
lldb/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h
lldb/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp
lldb/source/Plugins/SymbolFile/NativePDB/PdbUtil.h
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp
lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.h
llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h