summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/PDB
Commit message (Collapse)AuthorAgeFilesLines
...
* Use ScopedPrinter in llvm-pdbdumpZachary Turner2016-05-041-1000/+1235
| | | | | | | | | | | | | | | | When printing raw PDB file fields, streams, and records, use the ScopedPrinter class so we have consistency with llvm-readobj's output format. For the most part this is pretty mechanical, but I had to fix up the test file to conform to the new YAMLesque output format. i added a few additional helper functions to the ScopedPrinter such as one to print a dotted version, etc. Differential Revision: http://reviews.llvm.org/D19897 Reviewed By: rnk llvm-svn: 268506
* Parse the TPI (type information) stream of PDB files.Zachary Turner2016-05-031-0/+9
| | | | | | | | | | | | | | | This parses the TPI stream (stream 2) from the PDB file. This stream contains some header information followed by a series of codeview records. There is some additional complexity here in that alongside this stream of codeview records is a serialized hash table in order to efficiently query the types. We parse the necessary bookkeeping information to allow us to reconstruct the hash table, but we do not actually construct it yet as there are still a few things that need to be understood first. Differential Revision: http://reviews.llvm.org/D19840 Reviewed By: ruiu, rnk llvm-svn: 268343
* Parse PDB Name Hash TableZachary Turner2016-05-021-0/+15
| | | | | | | | | | | | | PDB has a lot of similar data structures. We already have code for parsing a Name Map, but PDB seems to have a different but very similar structure that is a hash table. This is the beginning of code needed in order to parse the name hash table, but it is not yet complete. It parses the basic metadata of the hash table, the bucket array, and the names buffer, but doesn't use any of these fields yet as the data structure requires a non-trivial amount of work to understand. llvm-svn: 268268
* [llvm-pdbdump] Restore error messages, handle bad block sizesDavid Majnemer2016-04-282-0/+5
| | | | | | | We lost the ability to report errors, bring it back. Also, correctly validate the block size. llvm-svn: 267955
* [llvm-pdbdump] Correctly read data larger than a blockDavid Majnemer2016-04-282-57/+979
| | | | | | | | | A bug was introduced when the code was refactored which resulted in a bad memory access. This fixes PR27565. llvm-svn: 267953
* Read the rest of the DBI substreams, and parse source info.Zachary Turner2016-04-281-0/+3
| | | | | | | | | | | | | We now read out the rest of the substreams from the DBI streams. One of these substreams, the FileInfo substream, contains information about which source files contribute to each module (aka compiland). This patch additionally parses out the file information from that substream, and dumps it in llvm-pdbdump. Differential Revision: http://reviews.llvm.org/D19634 Reviewed by: ruiu llvm-svn: 267928
* Parse module information from DBI stream.Zachary Turner2016-04-271-0/+24
| | | | | | | | | | | | This gets more data out of the DBI strema of the PDB. In particular it extracts the metadata for the list of modules (compilands) that this PDB contains info about, and adds support for dumping these fields to llvm-pdbdump. Differential Revision: http://reviews.llvm.org/D19570 Reviewed By: ruiu llvm-svn: 267818
* Parse and dump PDB DBI Stream Header InformationZachary Turner2016-04-261-0/+10
| | | | | | | | | | | | | | | | | | The DBI stream contains a lot of bookkeeping information for other streams. In particular it contains information about section contributions and linked modules. This patch is a first attempt at parsing some of the information out of the DBI stream. It currently only parses and dumps the headers of the DBI stream, so none of the module data or section contribution data is pulled out. This is just a proof of concept that we understand the basic properties of the DBI stream's metadata, and followup patches will try to extract more detailed information out. Differential Revision: http://reviews.llvm.org/D19500 Reviewed By: majnemer, ruiu llvm-svn: 267585
* Refactor some more PDB reading code into DebugInfoPDB.Zachary Turner2016-04-261-17/+0
| | | | | | | Differential Revision: http://reviews.llvm.org/D19445 Reviewed By: David Majnemer llvm-svn: 267564
* Resubmit "Refactor raw pdb dumper into library"Zachary Turner2016-04-251-1/+1
| | | | | | | This fixes a number of endianness issues as well as an ODR violation that hopefully causes everything to be happy. llvm-svn: 267431
* Revert r267049, r26706[16789], r267071 - Refactor raw pdb dumper into libraryDaniel Sanders2016-04-221-1/+1
| | | | | | r267049 broke multiple buildbots (e.g. clang-cmake-mips, and clang-x86_64-linux-selfhost-modules) which the follow-ups have not yet resolved and this is preventing subsequent committers from being notified about additional failures on the affected buildbots. llvm-svn: 267148
* Fix pdbdump-headers.test after guid format change.Zachary Turner2016-04-211-1/+1
| | | | llvm-svn: 267067
* Fix some display bugs in llvm-pdbdump.Zachary Turner2016-04-111-3/+3
| | | | | | | | | | | | | | | | | | We were incorrectly reporting all non-64 bit integers as int64s. This is most evident when trying to print the "short" type, but in theory could happen with chars too (although usually chars use a different builtin type). Additionally, we were using the wrong check when deciding whether to print an enum definition as a global enum. We were checking whether or not the enum was "nested", and if so saving it until we print the class definition that it was nested in. But this is not correct in rare situations where the enum is nested, but the class that it's nested in does not have type information in the PDB. So instead we check if there is a class definition for the parent in the PDB. If so we save it for later, otherwise we print it. llvm-svn: 265993
* [llvm-pdbdump] Dump line table information.Zachary Turner2016-03-081-0/+12
| | | | | | | This patch adds the -lines command line option which will dump source/line information for each compiland and source file. llvm-svn: 262962
* [llvm-pdbdump] Start to decode some streamsDavid Majnemer2016-02-121-0/+25
| | | | | | We can decode a little bit of the first stream now. llvm-svn: 260754
* [pdbdump] Fix test for different type ordering with DIA 2015Reid Kleckner2016-02-101-23/+30
| | | | llvm-svn: 260396
* s/NumFiles/NumStreams/David Majnemer2015-10-151-1/+1
| | | | llvm-svn: 250357
* [llvm-pdbdump] Provide a mechanism to dump the raw contents of a PDBDavid Majnemer2015-10-154-7/+19
| | | | | | | | | A PDB can be thought of as a very simple file system. It is occasionally illuminating to see the contents of the underlying files. Differential Revision: http://reviews.llvm.org/D13674 llvm-svn: 250356
* [llvm-pdbdump] Display full enum definitions.Zachary Turner2015-03-041-28/+22
| | | | | | | | | | | This will now display enum definitions both at the global scope as well as nested inside of classes. Additionally, it will no longer display enums at the global scope if the enum is nested. Instead, it will omit the definition of the enum globally and instead emit it in the corresponding class definition. llvm-svn: 231215
* [llvm-pdbdump] Many minor fixes and improvementsZachary Turner2015-03-021-2/+2
| | | | | | | | | | | | | | | | | A short list of some of the improvements: 1) Now supports -all command line argument, which implies many other command line arguments to simplify usage. 2) Now supports -no-compiler-generated command line argument to exclude compiler generated types. 3) Prints base class list. 4) -class-definitions implies -types. 5) Proper display of bitfields. 6) Can now distinguish between struct/class/interface/union. And a few other minor tweaks. llvm-svn: 230933
* [llvm-pdbdump] Add support for dumping global variables.Zachary Turner2015-02-274-25/+34
| | | | llvm-svn: 230744
* [llvm-pdbdump] Fix dumping of function pointers and basic types.Zachary Turner2015-02-263-17/+46
| | | | | | | | | | | | Function pointers were not correctly handled by the dumper, and they would print as "* name". They now print as "int (__cdecl *name)(int arg1, int arg2)" as they should. Also, doubles were being printed as floats. This fixes that bug as well, and adds tests for all builtin types. as well as a test for function pointers. llvm-svn: 230703
* [llvm-pdbdump] Add an option to dump full class definitions.Zachary Turner2015-02-233-17/+68
| | | | | | | | | | | This adds the --class-definitions flag. If specified, when dumping types, instead of "class Foo" you will see the full class definition, with member functions, constructors, access specifiers. NOTE: Using this option can be very slow, as generating a full class definition requires accessing many different parts of the PDB. llvm-svn: 230203
* [llvm-pdbdump] Rewrite dumper using visitor pattern.Zachary Turner2015-02-221-9/+9
| | | | | | | | | | This increases the flexibility of how to dump different symbol types -- necessary for context-sensitive formatting of symbol types -- and also improves the modularity by allowing the dumping to be implemented in the actual dumper, as opposed to in the PDB library. llvm-svn: 230184
* [llvm-pdbdump] Simplify options and output.Zachary Turner2015-02-222-27/+58
| | | | | | | | | This removes a wealth of options, and instead now only provides three options. -symbols, -types, and -compilands. This greatly simplifies use of the tool, and makes it easier to understand what you're going to see when you run the tool. llvm-svn: 230182
* Remove log statements from config scripts.Zachary Turner2015-02-221-1/+0
| | | | | | The bots seem to be happy now. llvm-svn: 230164
* [llvm-pdbdump] Resubmit "Add some tests for llvm-pdbdump".Zachary Turner2015-02-228-0/+67
| | | | | | | | | | | | | NOTE: This patch intentionally breaks the build. It attempts to resubmit r230083, but with some debug logging in the CMake and lit config files to determine why certain bots do not correctly disable the DIA tests when DIA is not available. After a sufficient number of bots fail, this patch will either be reverted or, if the cause of the failure becomes obvious, a fix submitted with the log statements removed. llvm-svn: 230161
* Revert "[llvm-pdbdump] Add some tests for llvm-pdbdump."Zachary Turner2015-02-208-66/+0
| | | | | | | It is not correctly detecting the situations where the test is unsupported. Reverting until we can figure it out. llvm-svn: 230085
* [llvm-pdbdump] Add some tests for llvm-pdbdump.Zachary Turner2015-02-208-0/+66
This adds only a very basic set of tests that dump a few functions and object files. Differential Revision: http://reviews.llvm.org/D7656 Reviewed By: David Blaikie llvm-svn: 230083
OpenPOWER on IntegriCloud