summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbutil/BytesOutputStyle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [llvm] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-151-1/+1
| | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. llvm-svn: 369013
* Slightly simplify MappedBlockStream::createIndexedStream() callsNico Weber2019-07-121-3/+1
| | | | | | | | | | | | | | | | All callers had a PDBFile object at hand, so call Pdb.createIndexedStream() instead, which pre-populates all the arguments (and returns nullptr for kInvalidStreamIndex). Also change safelyCreateIndexedStream() to only take the string index, and update callers. Make the method public and call it in two places that manually did the bounds checking before. No intended behavior change. Differential Revision: https://reviews.llvm.org/D64633 llvm-svn: 365936
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [llvm-pdbutil] Add support for dumping detailed module stats.Zachary Turner2017-08-211-23/+3
| | | | | | | | | | | | | | | This adds support for dumping a summary of module symbols and CodeView debug chunks. This option prints a table for each module of all of the symbols that occurred in the module and the number of times it occurred and total byte size. Then at the end it prints the totals for the entire file. Additionally, this patch adds the -jmc (just my code) option, which suppresses modules which are from external libraries or linker imports, so that you can focus only on the object files and libraries that originate from your own source code. llvm-svn: 311338
* [pdbutil] Add a command to dump the FPM.Zachary Turner2017-08-021-0/+13
| | | | | | | | | | | | | | Recently problems have been discovered in the way we write the FPM (free page map). In order to fix this, we first need to establish a baseline about what a correct FPM looks like using an MSVC generated PDB, so that we can then make our own generated PDBs match. And in order to do this, the dumper needs a mode where it can dump an FPM so that we can write tests for it. This patch adds a command to dump the FPM, as well as a test against a known-good PDB. llvm-svn: 309894
* [llvm-pdbutil] Add a mode to `bytes` for dumping split debug chunks.Zachary Turner2017-06-261-7/+46
| | | | llvm-svn: 306309
* [llvm-pdbutil] Dump raw bytes of module symbols and debug chunks.Zachary Turner2017-06-231-0/+109
| | | | llvm-svn: 306179
* [llvm-pdbutil] Dump raw bytes of type and id records.Zachary Turner2017-06-231-0/+64
| | | | llvm-svn: 306167
* [llvm-pdbutil] Dump raw bytes of various DBI stream subsections.Zachary Turner2017-06-231-0/+98
| | | | llvm-svn: 306160
* [llvm-pdbutil] Dump raw bytes of pdb name map.Zachary Turner2017-06-231-0/+17
| | | | | | | | This patch dumps the raw bytes of the pdb name map which contains the mapping of stream name to stream index for the string table and other reserved streams. llvm-svn: 306148
* [llvm-pdbutil] Add the ability to dump raw bytes from the file.Zachary Turner2017-06-231-0/+31
| | | | | | | | | | Normally we can only make sense of the content of a PDB in terms of streams and blocks, but in some cases it may be useful to dump bytes at a specific absolute file offset. For example, if you know that some interesting data is at a particular location and you want to see some surrounding data. llvm-svn: 306146
* [llvm-pdbutil] Add a function for formatting MSF data.Zachary Turner2017-06-231-27/+3
| | | | | | | | | | | | | | | | | | | The goal here is to make it possible to display absolute file offsets when dumping byets from an MSF. The problem is that when dumping bytes from an MSF, often the bytes will cross a block boundary and encounter a discontinuity. We can't use the normal formatBinary() function for this because this would just treat the sequence as entirely ascending, and not account out-of-order blocks. This patch adds a formatMsfData() function to our printer, and then uses this function to improve the output of the -stream-data command line option for dumping bytes from a particular stream. Test coverage is also expanded to make sure to include all possible scenarios of offsets, sizes, and crossing block boundaries. llvm-svn: 306141
* [llvm-pdbutil] Create a "bytes" subcommand.Zachary Turner2017-06-221-0/+167
This idea originally came about when I was doing some deep investigation of why certain bytes in a PDB that we round-tripped differed from their original bytes in the source PDB. I found myself having to hack up the code in many places to dump the bytes of this substream, or that record. It would be nice if we could just do this for every possible stream, substream, debug chunk type, etc. It doesn't make sense to put this under dump because there's just so many options that would detract from the more common use case of just dumping deserialized records. So making a new subcommand seems like the most logical course of action. In doing so, we already have two command line options that are suitable for this new subcommand, so start out by moving them there. llvm-svn: 306056
OpenPOWER on IntegriCloud