1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib/DebugInfo/PDB
Zachary Turner 5c0b0c6d4d [pdb] Fix reading of llvm-generated PDBs by cvdump.
If you dump a pdb to yaml, and then round-trip it back to a pdb,
and run cvdump -l <file> on the new pdb, cvdump will generate
output such as this.

*** LINES

** Module: "d:\src\llvm\test\DebugInfo\PDB\Inputs\empty.obj"

Error: Line number corrupted: invalid file id 0
  <Unknown> (MD5), 0001:00000010-0000001A, line/addr pairs = 3

        5 00000010      6 00000013      7 00000018

Note the error message about the corrupted line number.

It turns out that the problem is that cvdump cannot find the
/names stream (e.g. the global string table), and the reason it
can't find the /names stream is because it doesn't understand
the NameMap that we serialize which tells pdb consumers which
stream has the string table.

Some experimentation shows that if we add items to the hash
table in a specific order before serializing it, cvdump can read
it. This suggests that either we're using the wrong hash function,
or we're serializing something incorrectly, but it will take some
deeper investigation to figure out how / why.  For now, this at
least allows cvdump to read our line information (and incidentally,
produces an identical byte sequence to what Microsoft tools
produce when writing the named stream map).

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

llvm-svn: 306233
2017-06-25 03:51:42 +00:00
..
DIA Make IPDBSession::getGlobalScope a non-const method 2017-06-22 18:42:23 +00:00
Native [pdb] Fix reading of llvm-generated PDBs by cvdump. 2017-06-25 03:51:42 +00:00
CMakeLists.txt [PDB] Don't build the entire source file list up front. 2017-05-04 23:53:29 +00:00
GenericError.cpp Remove LLVM_NOEXCEPT and replace it with noexcept 2016-10-19 23:52:38 +00:00
IPDBSourceFile.cpp [DebugInfo] Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC). 2016-11-23 23:16:32 +00:00
LLVMBuild.txt [msf] Resubmit "Rename Msf -> MSF". 2016-07-29 20:56:36 +00:00
PDB.cpp NFC: Rename PDB_ReaderType::Raw to Native for consistency with the NativeSession rename. 2017-01-27 00:01:55 +00:00
PDBContext.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBExtras.cpp Properly parse the TypeServer2 record. 2017-02-03 21:22:27 +00:00
PDBInterfaceAnchors.cpp [DebugInfo] Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC). 2016-11-23 23:16:32 +00:00
PDBSymbol.cpp [llvm-pdbdump] Recursively dump class layout. 2017-04-13 21:11:00 +00:00
PDBSymbolAnnotation.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolBlock.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolCompiland.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolCompilandDetails.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolCompilandEnv.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolCustom.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolData.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolExe.cpp [llvm-pdbdump] More advanced class definition dumping. 2017-04-12 23:18:21 +00:00
PDBSymbolFunc.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolFuncDebugEnd.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolFuncDebugStart.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolLabel.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolPublicSymbol.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolThunk.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolTypeArray.cpp Improves pretty printing of variable types in llvm-pdbdump 2017-04-10 16:43:09 +00:00
PDBSymbolTypeBaseClass.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolTypeBuiltin.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolTypeCustom.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolTypeDimension.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolTypeEnum.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolTypeFriend.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolTypeFunctionArg.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolTypeFunctionSig.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolTypeManaged.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolTypePointer.cpp Improves pretty printing of variable types in llvm-pdbdump 2017-04-10 16:43:09 +00:00
PDBSymbolTypeTypedef.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolTypeUDT.cpp [llvm-pdbdump] More advanced class definition dumping. 2017-04-12 23:18:21 +00:00
PDBSymbolTypeVTable.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolTypeVTableShape.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolUnknown.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolUsingNamespace.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymDumper.cpp [DebugInfo] Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC). 2016-11-23 23:16:32 +00:00
UDTLayout.cpp Fix a null pointer dereference in llvm-pdbutil pretty. 2017-06-12 20:46:35 +00:00