[llvm] r363724 - [PDB] Ignore .debug$S subsections with high bit set
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 18 12:41:25 PDT 2019
Author: rnk
Date: Tue Jun 18 12:41:25 2019
New Revision: 363724
URL: http://llvm.org/viewvc/llvm-project?rev=363724&view=rev
Log:
[PDB] Ignore .debug$S subsections with high bit set
Some versions of the Visual C++ 2015 runtime have line tables with the
subsection kind of 0x800000F2. In cvinfo.h, 0x80000000 is documented to
be DEBUG_S_IGNORE. This appears to implement the intended behavior.
Modified:
llvm/trunk/include/llvm/DebugInfo/CodeView/CodeView.h
llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/CodeView.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/CodeView.h?rev=363724&r1=363723&r2=363724&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/CodeView/CodeView.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/CodeView.h Tue Jun 18 12:41:25 2019
@@ -304,6 +304,9 @@ enum class ModifierOptions : uint16_t {
};
CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(ModifierOptions)
+// If the subsection kind has this bit set, then the linker should ignore it.
+enum : uint32_t { SubsectionIgnoreFlag = 0x80000000 };
+
enum class DebugSubsectionKind : uint32_t {
None = 0,
Symbols = 0xf1,
Modified: llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp?rev=363724&r1=363723&r2=363724&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/COFFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/COFFDumper.cpp Tue Jun 18 12:41:25 2019
@@ -961,6 +961,11 @@ void COFFDumper::printCodeViewSymbolSect
error(consume(Data, SubSectionSize));
ListScope S(W, "Subsection");
+ // Dump the subsection as normal even if the ignore bit is set.
+ if (SubType & SubsectionIgnoreFlag) {
+ W.printHex("IgnoredSubsectionKind", SubType);
+ SubType &= ~SubsectionIgnoreFlag;
+ }
W.printEnum("SubSectionType", SubType, makeArrayRef(SubSectionTypes));
W.printHex("SubSectionSize", SubSectionSize);
More information about the llvm-commits
mailing list