1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[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.

llvm-svn: 363724
This commit is contained in:
Reid Kleckner 2019-06-18 19:41:25 +00:00
parent 834d092fc5
commit 4260bafcbb
2 changed files with 8 additions and 0 deletions

View File

@ -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,

View File

@ -961,6 +961,11 @@ void COFFDumper::printCodeViewSymbolSection(StringRef SectionName,
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);