summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-pdbdump] Rework command line options.Zachary Turner2016-05-242-3/+29
| | | | | | | | | When dumping huge PDB files, too many of the options were grouped together so you would get neverending spew of output. This patch introduces more granular display options so you can only dump the fields you actually care about. llvm-svn: 270607
* Add FIXMEs to all derived classes of std::error_category.Peter Collingbourne2016-05-243-0/+9
| | | | | | | | This helps make clear that we're moving away from std::error_code. Differential Revision: http://reviews.llvm.org/D20592 llvm-svn: 270604
* [codeview, pdb] Dump symbol records in publics streamZachary Turner2016-05-243-61/+39
| | | | | | | Differential Revision: http://reviews.llvm.org/D20580 Reviewed By: ruiu llvm-svn: 270597
* Fix build errorsZachary Turner2016-05-241-2/+2
| | | | llvm-svn: 270587
* Dump symbol record details in llvm-pdbdumpZachary Turner2016-05-242-8/+15
| | | | | | | | | | | | | This makes use of the newly introduced `CVSymbolVisitor` to dump details of each type of symbol record in the symbol streams. Future patches will bring this visitor based dumping to the publics stream, as well as creating a `SymbolDumpDelegate` to print more information about relocations etc. Differential Revision: http://reviews.llvm.org/D20545 Reviewed By: ruiu llvm-svn: 270585
* Recommit r270547 ([llvm-dwarfdump] - Teach dwarfdump to decompress debug ↵George Rimar2016-05-241-15/+53
| | | | | | | | | | | | | | | | | | | | | | | sections in zlib style.) Fix was: 1) Had to regenerate dwarfdump-test-zlib.elf-x86-64, dwarfdump-test-zlib-gnu.elf-x86-64 (because llvm-symbolizer-zlib.test uses that inputs for its purposes and failed). 2) Updated llvm-symbolizer-zlib.test (updated used call function address to match new files + added one more check for newly created dwarfdump-test-zlib-gnu.elf-x86-64 binary input). 3) Updated comment in dwarfdump-test-zlib.cc. Original commit message: [llvm-dwarfdump] - Teach dwarfdump to decompress debug sections in zlib style. Before this llvm-dwarfdump only recognized zlib-gnu compression style of headers, this patch adds support for zlib style. It looks reasonable to support both styles for dumping, even if we are not going to suport generating of deprecated gnu one. Differential revision: http://reviews.llvm.org/D20470 llvm-svn: 270557
* Revert r270543 ("Recommit r270540")George Rimar2016-05-241-53/+15
| | | | | | | | Failed build bot in another test. I am sorry for noise. http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/23679/testReport/junit/LLVM/DebugInfo/llvm_symbolizer_zlib_test/ llvm-svn: 270547
* Recommit r270540George Rimar2016-05-241-15/+53
| | | | | | | | | | | | | | | | fix: forgot to commit the updated dwarfdump-test-zlib.elf-x86-64 Original commit message: [llvm-dwarfdump] - Teach dwarfdump to decompress debug sections in zlib style. Before this llvm-dwarfdump only recognized zlib-gnu compression style of headers, this patch adds support for zlib style. It looks reasonable to support both styles for dumping, even if we are not going to suport generating of deprecated gnu one. Differential revision: http://reviews.llvm.org/D20470 llvm-svn: 270543
* Revert r270540 "[llvm-dwarfdump] - Teach dwarfdump to decompress debug ↵George Rimar2016-05-241-53/+15
| | | | | | | | | sections in zlib style." it broked bot: http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/5036 llvm-svn: 270541
* [llvm-dwarfdump] - Teach dwarfdump to decompress debug sections in zlib style.George Rimar2016-05-241-15/+53
| | | | | | | | | | | Before this llvm-dwarfdump only recognized zlib-gnu compression style of headers, this patch adds support for zlib style. It looks reasonable to support both styles for dumping, even if we are not going to suport generating of deprecated gnu one. Differential revision: http://reviews.llvm.org/D20470 llvm-svn: 270540
* Remove unused variable.Zachary Turner2016-05-241-11/+6
| | | | llvm-svn: 270516
* Make a symbol visitor and use it to dump CV symbols.Zachary Turner2016-05-233-1/+672
| | | | | | | Differential Revision: http://reviews.llvm.org/D20534 Reviewed By: rnk llvm-svn: 270511
* Fix struct member names and simplify. NFC.Rui Ueyama2016-05-201-6/+4
| | | | llvm-svn: 270289
* pdbdump: print out symbol names referred by publics stream.Rui Ueyama2016-05-204-9/+129
| | | | | | | | | | | | | | | | | | DBI stream contains a stream number of the symbol record stream. Symbol record streams is an array of length-type-value members. Each member represents one symbol. Publics stream contains offsets to the symbol record stream. This patch is to print out all symbols that are referenced by the publics stream. Note that even with this patch, llvm-pdbdump cannot dump all the information in a publics stream since it contains more information than symbol names. I'll improve it in followup patches. Differential Revision: http://reviews.llvm.org/D20480 llvm-svn: 270262
* Fix -Wmicrosoft-enum-value warningReid Kleckner2016-05-191-2/+2
| | | | llvm-svn: 270110
* pdbdump: Rename NumberOfSymbols -> SymbolRecordStreamIndex.Rui Ueyama2016-05-191-4/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D20441 llvm-svn: 270088
* pdbdump: Print out section offsets in the publics stream.Rui Ueyama2016-05-181-2/+6
| | | | llvm-svn: 269955
* Try again to fix pdbdump-headers.test on big-endian hosts after r269861.Daniel Sanders2016-05-181-5/+9
| | | | | | | r269898 fixed the problem with HashBuckets but the same issue occurred with AddressMap and ThunkMap too. llvm-svn: 269913
* Attempt to fix pdbdump-headers.test on big-endian hosts after r269861.Daniel Sanders2016-05-181-2/+6
| | | | llvm-svn: 269898
* pdbdump: Print out more strcutures.Rui Ueyama2016-05-171-3/+39
| | | | | | | | | | I don't yet fully understand the meaning of these data strcutures, but at least it seems that their sizes and types are correct. With this change, we can read publics streams till end. Differential Revision: http://reviews.llvm.org/D20343 llvm-svn: 269861
* [codeview] Test serialization of all known type recordsReid Kleckner2016-05-171-2/+2
| | | | | | | | | | | This just checks that we emit all type records once, and then after merging the type stream with no other type streams, we still emit every kind of type record. We could test the dumper output more closely, but that would make the test very brittle. Currently we're just getting coverage. llvm-svn: 269778
* Move helper classes into anonymous namespaces. NFC.Benjamin Kramer2016-05-152-0/+4
| | | | llvm-svn: 269591
* [codeview] Add type stream merging prototypeReid Kleckner2016-05-147-88/+504
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This code is intended to be used as part of LLD's PDB writing. Until that exists, this is exposed via llvm-readobj for testing purposes. Type stream merging uses the following algorithm: - Begin with a new empty stream, and a new empty hash table that maps from type record contents to new type index. - For each new type stream, maintain a map from source type index to destination type index. - For each record, copy it and rewrite its type indices to be valid in the destination type stream. - If the new type record is not already present in the destination stream hash table, append it to the destination type stream, assign it the next type index, and update the two hash tables. - If the type record already exists in the destination stream, discard it and update the type index map to forward the source type index to the existing destination type index. Reviewers: zturner, ruiu Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20122 llvm-svn: 269521
* pdbdump: Print "Publics" stream.Rui Ueyama2016-05-134-11/+163
| | | | | | | | | | | | | | | | Publics stream seems to contain information as to public symbols. It actually contains a serialized hash table along with fixed-sized headers. This patch is not complete. It scans only till the end of the stream and dump the header information. I'll write code to de-serialize the hash table later. Reviewers: zturner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20256 llvm-svn: 269484
* [codeview] Align class and print names of typesReid Kleckner2016-05-135-86/+80
| | | | | | | | | | | | Summary: This way we can get rid of one of the fields in the .def file. Reviewers: llvm-commits Subscribers: zturner Differential Revision: http://reviews.llvm.org/D20251 llvm-svn: 269461
* [codeview] Dump the type index on the first line of each recordReid Kleckner2016-05-131-2/+2
| | | | | | This will make it easier to write FileCheck tests. llvm-svn: 269444
* [codeview] Try to handle errors better in record iteratorReid Kleckner2016-05-121-2/+2
| | | | llvm-svn: 269381
* Get rid of CVLeafTypes.def and combine with TypeRecords.defZachary Turner2016-05-121-26/+17
| | | | | | | | | | This merges the functionality of the macros in `CVLeafTypes.def` and the macros in `TypeRecords.def` into a single set of macros. Differential Revision: http://reviews.llvm.org/D20190 Reviewed By: rnk, amccarth llvm-svn: 269316
* Make CodeView record serialization more generic.Zachary Turner2016-05-123-98/+158
| | | | | | | | | | | This introduces a variadic template and some helper macros to safely and correctly deserialize many types of common record fields while maintaining error checking. Differential Revision: http://reviews.llvm.org/D20183 Reviewed By: rnk, amccarth llvm-svn: 269315
* Fix build breakage in DebugInfoCodeviewZachary Turner2016-05-111-1/+1
| | | | llvm-svn: 269217
* Refactor CodeView type records to use common code.Zachary Turner2016-05-114-373/+267
| | | | | | | Differential Revision: http://reviews.llvm.org/D20138 Reviewed By: rnk llvm-svn: 269216
* Fix some Clang-tidy modernize-deprecated-headers and Include What You Use ↵Eugene Zelenko2016-05-092-4/+16
| | | | | | | | warnings; other minor fixes. Differential revision: http://reviews.llvm.org/D20042 llvm-svn: 268989
* [pdb] Parse the module info stream for each module.Zachary Turner2016-05-093-14/+66
| | | | | | | Differential Revision: http://reviews.llvm.org/D20026 Reviewed By: rnk llvm-svn: 268942
* Make TypeIterator generic so it can iterate symbols too.Zachary Turner2016-05-091-1/+1
| | | | | | | Reviewed By: amccarth Differential Revision: http://reviews.llvm.org/D20038 llvm-svn: 268941
* Drop error when trying to fallback from PDB to DWARF.Zachary Turner2016-05-061-0/+4
| | | | llvm-svn: 268813
* Make llvm-pdbdump print CV type recordsZachary Turner2016-05-062-1/+7
| | | | | | | | | | This reuses the CVTypeDumper from libcodeview to dump full information about type records within a PDB file. Differential Revision: http://reviews.llvm.org/D20022 Reviewed By: rnk llvm-svn: 268808
* Add missing include.Zachary Turner2016-05-061-0/+1
| | | | llvm-svn: 268792
* Port DebugInfoPDB over to using llvm::Error.Zachary Turner2016-05-0617-224/+475
| | | | | | | Differential Revision: http://reviews.llvm.org/D19940 Reviewed By: rnk llvm-svn: 268791
* [codeview] Improve some commentsReid Kleckner2016-05-051-1/+0
| | | | | | | This FIXME was already fixed, and these LF_* enum names were inconsistent. llvm-svn: 268683
* Fix CVTypeDumperImpl formatting after class renameReid Kleckner2016-05-051-39/+49
| | | | llvm-svn: 268678
* [codeview] Move dumper into lib/DebugInfo/CodeViewReid Kleckner2016-05-053-0/+852
| | | | | | So that we can call it from llvm-pdbdump. llvm-svn: 268580
* Move pdb code into pdb namespace.Zachary Turner2016-05-0448-26/+81
| | | | llvm-svn: 268544
* [codeview] Add a type visitor to help abstract away type stream handlingReid Kleckner2016-05-041-1/+1
| | | | | | | | | | | | | | | | | | Summary: Port the dumper in llvm-readobj over to it. I'm planning to use this visitor to power type stream merging. While we're at it, try to switch from StringRef to ArrayRef<uint8_t> in some places. Reviewers: zturner, amccarth Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19899 llvm-svn: 268535
* Remove unused variable.Zachary Turner2016-05-031-2/+0
| | | | llvm-svn: 268455
* Move CodeViewTypeStream to DebugInfo/CodeViewZachary Turner2016-05-031-23/+2
| | | | | | | | | | | | | Ability to parse codeview type streams is also needed by DebugInfoPDB for parsing PDBs, so moving this into a library gives us this option. Since DebugInfoPDB had already hand rolled some code to do this, that code is now convereted over to using this common abstraction. Differential Revision: http://reviews.llvm.org/D19887 Reviewed By: dblaikie, amccarth llvm-svn: 268454
* Change operation_not_supported to not_supported.Zachary Turner2016-05-031-1/+1
| | | | | | Apparently operation_not_supported is... not supported everywhere. llvm-svn: 268348
* Parse the TPI (type information) stream of PDB files.Zachary Turner2016-05-036-5/+179
| | | | | | | | | | | | | | | 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
* [llvm-pdbdump] Fix read past EOF when file is too small.Zachary Turner2016-05-021-0/+4
| | | | llvm-svn: 268316
* Thread Expected<...> up from libObject’s getType() for symbols to allow ↵Kevin Enderby2016-05-022-4/+14
| | | | | | | | | | | | | | | | | | | | | | llvm-objdump to produce a good error message. Produce another specific error message for a malformed Mach-O file when a symbol’s section index is more than the number of sections. The existing test case in test/Object/macho-invalid.test for macho-invalid-section-index-getSectionRawName now reports the error with the message indicating that a symbol at a specific index has a bad section index and that bad section index value. Again converting interfaces to Expected<> from ErrorOr<> does involve touching a number of places. Where the existing code reported the error with a string message or an error code it was converted to do the same. Also there some were bugs in the existing code that did not deal with the old ErrorOr<> return values.  So now with Expected<> since they must be checked and the error handled, I added a TODO and a comment: "// TODO: Actually report errors helpfully" and a call something like consumeError(NameOrErr.takeError()) so the buggy code will not crash since needed to deal with the Error. llvm-svn: 268298
* Fix build breakage due to implicit conversion.Zachary Turner2016-05-021-1/+2
| | | | llvm-svn: 268277
OpenPOWER on IntegriCloud