[llvm] r329326 - [llvm-pdbutil] Display types from MSVC precompiled header object files.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 5 11:18:12 PDT 2018
Author: zturner
Date: Thu Apr 5 11:18:12 2018
New Revision: 329326
URL: http://llvm.org/viewvc/llvm-project?rev=329326&view=rev
Log:
[llvm-pdbutil] Display types from MSVC precompiled header object files.
These appear in a .debug$P section, which is exactly the same in
format as a .debug$T section. So we shouldn't ignore these when
dumping types.
Modified:
llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp
llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
Modified: llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp?rev=329326&r1=329325&r2=329326&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp (original)
+++ llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp Thu Apr 5 11:18:12 2018
@@ -1058,8 +1058,15 @@ Error DumpOutputStyle::dumpTypesFromObje
if (auto EC = S.getName(SectionName))
return errorCodeToError(EC);
- if (SectionName != ".debug$T")
+ // .debug$T is a standard CodeView type section, while .debug$P is the same
+ // format but used for MSVC precompiled header object files.
+ if (SectionName == ".debug$T")
+ printHeader(P, "Types (.debug$T)");
+ else if (SectionName == ".debug$P")
+ printHeader(P, "Precompiled Types (.debug$P)");
+ else
continue;
+
StringRef Contents;
if (auto EC = S.getContents(Contents))
return errorCodeToError(EC);
Modified: llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp?rev=329326&r1=329325&r2=329326&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/COFFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/COFFDumper.cpp Thu Apr 5 11:18:12 2018
@@ -902,7 +902,9 @@ void COFFDumper::printCodeViewDebugInfo(
for (const SectionRef &S : Obj->sections()) {
StringRef SectionName;
error(S.getName(SectionName));
- if (SectionName == ".debug$T")
+ // .debug$T is a standard CodeView type section, while .debug$P is the same
+ // format but used for MSVC precompiled header object files.
+ if (SectionName == ".debug$T" || SectionName == ".debug$P")
printCodeViewTypeSection(SectionName, S);
}
for (const SectionRef &S : Obj->sections()) {
More information about the llvm-commits
mailing list