1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/lib/DebugInfo/CodeView
Zachary Turner ae9d9f3bb3 [PDB] Fix linking of function symbols and local variables.
The compiler outputs PROC32_ID symbols into the object files
for functions, and these symbols have an embedded type index
which, when copied to the PDB, refer to the IPI stream.  However,
the symbols themselves are also converted into regular symbols
(e.g. S_GPROC32_ID -> S_GPROC32), and type indices in the regular
symbol records refer to the TPI stream.  So this patch applies
two fixes to function records.
  1. It converts ID symbols to the proper non-ID record type.
  2. After remapping the type index from the object file's index
     space to the PDB file/IPI stream's index space, it then
     remaps that index to the TPI stream's index space by.

Besides functions, during the remapping process we were also
discarding symbol record types which we did not recognize.
In particular, we were discarding S_BPREL32 records, which is
what MSVC uses to describe local variables on the stack.  So
this patch fixes that as well by copying them to the PDB.

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

llvm-svn: 310394
2017-08-08 18:34:44 +00:00
..
CMakeLists.txt Delete TypeDatabase. 2017-06-18 20:52:45 +00:00
CodeViewError.cpp
CodeViewRecordIO.cpp [codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueId 2017-07-17 23:59:44 +00:00
CVSymbolVisitor.cpp [llvm-pdbutil] Output the symbol offset when dumping. 2017-06-30 21:35:00 +00:00
CVTypeVisitor.cpp [codeview] Remove TypeServerHandler and PDBTypeServerHandler 2017-07-17 20:28:06 +00:00
DebugChecksumsSubsection.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
DebugCrossExSubsection.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
DebugCrossImpSubsection.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
DebugFrameDataSubsection.cpp [CodeView] Add more DebugSubsection implementations. 2017-05-30 17:13:33 +00:00
DebugInlineeLinesSubsection.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
DebugLinesSubsection.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
DebugStringTableSubsection.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
DebugSubsection.cpp [CodeView] Rename ModuleDebugFragment -> DebugSubsection. 2017-05-30 16:36:15 +00:00
DebugSubsectionRecord.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
DebugSubsectionVisitor.cpp Resubmit "[codeview] Make obj2yaml/yaml2obj support .debug$S..." 2017-06-14 15:59:27 +00:00
DebugSymbolRVASubsection.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
DebugSymbolsSubsection.cpp [CodeView] Add more DebugSubsection implementations. 2017-05-30 17:13:33 +00:00
EnumTables.cpp [codeview] Emit 'D' as the cv source language for D code 2017-07-24 16:16:42 +00:00
Formatters.cpp [codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueId 2017-07-17 23:59:44 +00:00
LazyRandomTypeCollection.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
Line.cpp
LLVMBuild.txt
RecordSerialization.cpp [PDB] Improve GSI hash table dumping for publics and globals 2017-07-26 00:40:36 +00:00
StringsAndChecksums.cpp [CodeView, PDB] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-06-30 23:06:03 +00:00
SymbolDumper.cpp [CodeView] Dump BuildInfoSym and ProcSym type indices 2017-07-15 18:10:39 +00:00
SymbolRecordMapping.cpp [CodeView] Fix dumping of public symbol record flags 2017-06-19 16:54:51 +00:00
SymbolSerializer.cpp [CodeView, PDB] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-06-30 23:06:03 +00:00
TypeDumpVisitor.cpp [codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueId 2017-07-17 23:59:44 +00:00
TypeIndex.cpp Resubmit "[llvm-pdbutil] rewrite the "raw" output style." 2017-06-15 22:24:24 +00:00
TypeIndexDiscovery.cpp [PDB] Fix linking of function symbols and local variables. 2017-08-08 18:34:44 +00:00
TypeName.cpp [CodeView] Fix random access of type names. 2017-06-16 23:42:44 +00:00
TypeRecordMapping.cpp [codeview] Add support for label type records 2017-04-03 21:25:20 +00:00
TypeSerializer.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
TypeStreamMerger.cpp [codeview] Don't use the type visitor to merge types 2017-07-17 20:31:38 +00:00
TypeTableCollection.cpp Delete TypeDatabase. 2017-06-18 20:52:45 +00:00