summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbdump/PrettyClassDefinitionDumper.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename llvm-pdbdump -> llvm-pdbutil.Zachary Turner2017-06-091-108/+0
| | | | | | | | | | This is to reflect the evolving nature of the tool as being useful for more than just dumping PDBs, as it can do many other things. Differential Revision: https://reviews.llvm.org/D34062 llvm-svn: 305106
* [llvm-pdbdump] Allow sorting / filtering by immediate paddingZachary Turner2017-04-251-0/+8
| | | | llvm-svn: 301358
* [llvm-pdbdump] Merge functionality of graphical and text dumpers.Zachary Turner2017-04-241-16/+2
| | | | | | | | | | | | | | The *real* difference between these two was that a) The "graphical" dumper could recurse, while the text one could not. b) The "text" dumper could display nested types and functions, while the graphical one could not. Merge these two so that there is only one dumper that can recurse arbitrarily deep and optionally display nested types or not. llvm-svn: 301204
* [llvm-pdbdump] Re-write the record layout code to be more resilient.Zachary Turner2017-04-241-26/+15
| | | | | | | | This reworks the way virtual bases are handled, and also the way padding is detected across multiple levels of aggregates, producing a much more accurate result. llvm-svn: 301203
* [llvm-pdbdump] Recursively dump class layout.Zachary Turner2017-04-131-16/+28
| | | | llvm-svn: 300258
* [llvm-pdbdump] Minor prepatory refactor of Class Def Dumper.Zachary Turner2017-04-121-110/+41
| | | | | | | | | | | | | | | | | In a followup patch I intend to introduce an additional dumping mode which dumps a graphical representation of a class's layout. In preparation for this, the text-based layout printer needs to be split out from the graphical layout printer, and both need to be able to use the same code for printing the intro and outro of a class's definition (e.g. base class list, etc). This patch does so, and in the process introduces a skeleton definition for the graphical printer, while currently making the graphical printer just print nothing. NFC llvm-svn: 300134
* [llvm-pdbdump] More advanced class definition dumping.Zachary Turner2017-04-121-79/+52
| | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 300133
* [llvm-pdbdump] Display padding bytes on record layoutZachary Turner2017-04-101-17/+81
| | | | | | | | | | | | | | | When dumping classes, show where padding occurs, and at the end of the class print statistics about how many bytes total of padding exist in a class. Since PDB doesn't specifically contain information about padding, we have to mimic this by sort of reversing a small portion of the record layout algorithm (e.g. looking at offsets and sizes and trying to determine whether something is part of the same field or a new field). Differential Revision: https://reviews.llvm.org/D31800 llvm-svn: 299869
* General usability improvements to generic PDB library.Zachary Turner2017-04-101-6/+4
| | | | | | | | | | | | | | | | | | | | 1. Added some asserts to make sure concrete symbol types don't get constructed with RawSymbols that have an incompatible SymTag enum value. 2. Added new forwarding macros that auto-define an Id/Sym method pair whenever there is a method that returns a SymIndexId. Previously we would just provide one method that returned only the SymIndexId and it was up to the caller to use the Session object to get a pointer to the symbol. Now we automatically get both the method that returns the Id, as well as a method that returns the pointer directly with just one macro. 3. Added some methods for dumping straight to stdout that can be used from inside the debugger for diagnostics during a debug session. 4. Added a clone() method and a cast<T>() method to PDBSymbol that can shorten some usage patterns. llvm-svn: 299831
* Allow specification of what kinds of class members to dump.Zachary Turner2017-04-061-76/+31
| | | | | | | | | | | | | | Previously when dumping class definitions, there were only two modes - on or off. But it's useful to sometimes get a little more fine-grained. For example, you might only want to see the record layout (for example to look for extraneous padding). This patch adds a third mode, layout mode, which does exactly that. Only this-relative data members are displayed in this mode. Differential Revision: https://reviews.llvm.org/D31794 llvm-svn: 299733
* [CodeView/PDB] Rename a bunch of files.Zachary Turner2017-01-111-0/+192
We were starting to get some name clashes between llvm-pdbdump and the common CodeView framework, so I took this opportunity to rename a bunch of files to more accurately describe their usage. This also helps in llvm-pdbdump to distinguish between different files and whether they are used for pretty dump mode or raw dump mode. llvm-svn: 291627
OpenPOWER on IntegriCloud