]> granicus.if.org Git - llvm/commit
[llvm-pdbdump] More advanced class definition dumping.
authorZachary Turner <zturner@google.com>
Wed, 12 Apr 2017 23:18:21 +0000 (23:18 +0000)
committerZachary Turner <zturner@google.com>
Wed, 12 Apr 2017 23:18:21 +0000 (23:18 +0000)
commit7724dc63a78d409d486c2a1a7273ddbbbcba6299
tree9a2732f2acfdd3d0847f743666daf470001b95a5
parent69dba78684045a1bcf7804b38054f473a2f076eb
[llvm-pdbdump] More advanced class definition dumping.

Previously the dumping of class definitions was very primitive,
and it made it hard to do more than the most trivial of output
formats when dumping.  As such, we would only dump one line for
each field, and then dump non-layout items like nested types
and enums.

With this patch, we do a complete analysis of the object
hierarchy including aggregate types, bases, virtual bases,
vftable analysis, etc.  The only immediately visible effects
of this are that a) we can now dump a line for the vfptr where
before we would treat that as padding, and b) we now don't
treat virtual bases that come at the end of a class as padding
since we have a more detailed analysis of the class's storage
usage.

In subsequent patches, we should be able to use this analysis
to display a complete graphical view of a class's layout including
recursing arbitrarily deep into an object's base class / aggregate
member hierarchy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300133 91177308-0d34-0410-b5e6-96231b3b80d8
39 files changed:
include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h
include/llvm/DebugInfo/PDB/DIA/DIASession.h
include/llvm/DebugInfo/PDB/IPDBRawSymbol.h
include/llvm/DebugInfo/PDB/IPDBSession.h
include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h
include/llvm/DebugInfo/PDB/Native/NativeSession.h
include/llvm/DebugInfo/PDB/PDBSymbol.h
include/llvm/DebugInfo/PDB/PDBSymbolExe.h
include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h
include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h
include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h
include/llvm/DebugInfo/PDB/UDTLayout.h [new file with mode: 0644]
include/llvm/Support/Casting.h
lib/DebugInfo/PDB/CMakeLists.txt
lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
lib/DebugInfo/PDB/DIA/DIASession.cpp
lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp
lib/DebugInfo/PDB/Native/NativeSession.cpp
lib/DebugInfo/PDB/PDBSymbol.cpp
lib/DebugInfo/PDB/PDBSymbolExe.cpp
lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp
lib/DebugInfo/PDB/UDTLayout.cpp [new file with mode: 0644]
test/DebugInfo/PDB/DIA/pdbdump-symbol-format.test
test/DebugInfo/PDB/Inputs/symbolformat.pdb
test/tools/llvm-pdbdump/Inputs/SimplePaddingTest.cpp [new file with mode: 0644]
test/tools/llvm-pdbdump/Inputs/SimplePaddingTest.pdb [new file with mode: 0644]
test/tools/llvm-pdbdump/class-layout.test
test/tools/llvm-pdbdump/enum-layout.test
test/tools/llvm-pdbdump/simple-padding.test [new file with mode: 0644]
tools/llvm-pdbdump/PrettyClassDefinitionDumper.cpp
tools/llvm-pdbdump/PrettyClassDefinitionDumper.h
tools/llvm-pdbdump/PrettyFunctionDumper.cpp
tools/llvm-pdbdump/PrettyTypeDumper.cpp
tools/llvm-pdbdump/PrettyTypedefDumper.cpp
tools/llvm-pdbdump/PrettyVariableDumper.cpp
tools/llvm-pdbdump/PrettyVariableDumper.h
tools/llvm-pdbdump/llvm-pdbdump.cpp
tools/llvm-pdbdump/llvm-pdbdump.h
unittests/DebugInfo/PDB/PDBApiTest.cpp