summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/DebugInfo/PDB
Commit message (Collapse)AuthorAgeFilesLines
...
* [pdb] Fix another narrowing conversion on x64 builds.Zachary Turner2016-07-281-1/+1
| | | | llvm-svn: 277026
* [pdb] Refactor library to more clearly separate reading/writingZachary Turner2016-07-282-104/+94
| | | | | | | Reviewed By: amccarth, ruiu Differential Revision: https://reviews.llvm.org/D22693 llvm-svn: 277019
* Get rid of IMsfStreamData class.Zachary Turner2016-07-281-75/+99
| | | | | | | | | | | | | | | | | | | | This was a pure virtual base class whose purpose was to abstract away the notion of how you retrieve the layout of a discontiguous stream of blocks in an Msf file. This led to too many layers of abstraction making it difficult to figure out what was going on and extend things. Ultimately, a stream's layout is decided by its length and the array of block numbers that it lives on. So rather than have an abstract base class which can return this in any number of ways, it's more straightforward to simply store them as fields of a trivial struct, and also to give a more appropriate name. This patch does that. It renames IMsfStreamData to MsfStreamLayout, and deletes the 2 concrete implementations, DirectoryStreamData and IndexedStreamData. MsfStreamLayout is a trivial struct with the necessary data. llvm-svn: 277018
* Fix dangling reference to temporary in use of ArrayRefReid Kleckner2016-07-281-1/+3
| | | | | | Fixes tests locally for me with MSVC 2015. llvm-svn: 277015
* Make DebugInfoMsf a dependency of DebugInfoPDBTests.Zachary Turner2016-07-221-0/+1
| | | | | | | For some reason this doesn't cause linker errors with MSVC or clang-cl, but the bots seem to be failing with other compilers. llvm-svn: 276463
* [msf] Create LLVMDebugInfoMsfZachary Turner2016-07-222-19/+17
| | | | | | | | | | | | | | This provides a better layering of responsibilities among different aspects of PDB writing code. Some of the MSF related code was contained in CodeView, and some was in PDB prior to this. Further, we were often saying PDB when we meant MSF, and the two are actually independent of each other since in theory you can have other types of data besides PDB data in an MSF. So, this patch separates the MSF specific code into its own library, with no dependencies on anything else, and DebugInfoCodeView and DebugInfoPDB take dependencies on DebugInfoMsf. llvm-svn: 276458
* [pdb] Teach MsfBuilder and other classes about the Free Page Map.Zachary Turner2016-07-151-20/+26
| | | | | | | | | | | | | | Block 1 and 2 of an MSF file are bit vectors that represent the list of blocks allocated and free in the file. We had been using these blocks to write stream data and other data, so we mark them as the free page map now. We don't yet serialize these pages to the disk, but at least we make a note of what it is, and avoid writing random data to them. Doing this also necessitated cleaning up some of the tests to be more general and hardcode fewer values, which is nice. llvm-svn: 275629
* [pdb] Use MsfBuilder to handle the writing PDBs.Zachary Turner2016-07-151-2/+56
| | | | | | | | | | | | | | | Previously we would read a PDB, then write some of it back out, but write the directory, super block, and other pertinent metadata back out unchanged. This generates incorrect PDBs since the amount of data written was not always the same as the amount of data read. This patch changes things to use the newly introduced `MsfBuilder` class to write out a correct and accurate set of Msf metadata for the data *actually* written, which opens up the door for adding and removing type records, symbol records, and other types of data to an existing PDB. llvm-svn: 275627
* [pdb] Introduce MsfBuilder for laying out PDB files.Zachary Turner2016-07-154-17/+345
| | | | | | | Reviewed by: ruiu Differential Revision: https://reviews.llvm.org/D22308 llvm-svn: 275611
* [llvm-pdbdump] Propagate errors a little more consistentlyDavid Majnemer2016-07-101-2/+2
| | | | | | | PDBFile::getBlockData didn't really return any indication that it failed. It merely returned an empty buffer. llvm-svn: 275009
* Try to fix compilation error in DebugInfoPDBTests.Zachary Turner2016-07-081-1/+3
| | | | llvm-svn: 274881
* DebugInfoPDBTests:MappedBlockStreamTest.TestWriteThenRead: Avoid assigning ↵NAKAMURA Takumi2016-06-111-1/+3
| | | | | | temporary object to ArrayRef. llvm-svn: 272457
* Try again to fix this endianness issue.Zachary Turner2016-06-101-17/+15
| | | | llvm-svn: 272440
* [pdb] Fix issues with pdb writing.Zachary Turner2016-06-101-1/+4
| | | | | | | | | This fixes an alignment issue by forcing all cached allocations to be 8 byte aligned, and also fixes an issue arising on big endian systems by writing ulittle32_t's instead of uint32_t's in the test. llvm-svn: 272437
* Add support for writing through StreamInterface.Zachary Turner2016-06-101-22/+285
| | | | | | | | | | | This adds method and tests for writing to a PDB stream. With this, even a PDB stream which is discontiguous can be treated as a sequential stream of bytes for the purposes of writing. Reviewed By: ruiu Differential Revision: http://reviews.llvm.org/D21157 llvm-svn: 272369
* [pdb] Fix build errors in PDB unit tests.Zachary Turner2016-06-081-8/+15
| | | | llvm-svn: 272174
* [pdb] Fix broken unit test compilation.Zachary Turner2016-06-071-4/+4
| | | | llvm-svn: 272059
* [pdb] Fix broken unit tests after r271982.Zachary Turner2016-06-071-11/+13
| | | | llvm-svn: 271983
* [CodeView] Take the StreamRef::readBytes offset into account when validatingDavid Majnemer2016-06-021-0/+2
| | | | | | | | We only considered the length of the operation and the length of the StreamRef without considered what it meant for the offset to be at a non-zero position. llvm-svn: 271496
* Rework r271439. I forgot to save the buffer for editing.NAKAMURA Takumi2016-06-011-1/+1
| | | | llvm-svn: 271441
* MappedBlockStreamTest.cpp: Simplify array initializers.NAKAMURA Takumi2016-06-011-2/+2
| | | | llvm-svn: 271439
* [pdb] silence warnings about moving from a temporary.Zachary Turner2016-06-011-2/+2
| | | | llvm-svn: 271420
* [CodeView] Make sure StreamRef::readBytes doesn't read too muchDavid Majnemer2016-06-011-5/+17
| | | | llvm-svn: 271418
* [PDB] Silence sign comparison warnings in MappedBlockStreamTestDavid Majnemer2016-06-011-8/+8
| | | | llvm-svn: 271416
* MappedBlockStreamTest.cpp: Appease msc18 to avoid initializer for std::vector.NAKAMURA Takumi2016-06-011-2/+6
| | | | llvm-svn: 271397
* DebugInfoPDBTests: Update libdeps for r271346.NAKAMURA Takumi2016-06-011-0/+1
| | | | llvm-svn: 271355
* [pdb] Add unit tests for PDB MappedBlockStream and zero copyZachary Turner2016-05-312-0/+162
| | | | | | | Differential Revision: http://reviews.llvm.org/D20837 Reviewed By: ruiu llvm-svn: 271346
* Fix build of DebugInfoPDBTests.Zachary Turner2016-05-041-0/+1
| | | | | | Missing a using statement. llvm-svn: 268552
* [DebugInfoPDB] Add source / line number accessors for PDB.Zachary Turner2016-02-181-0/+26
| | | | | | | This patch adds a variety of different methods to query source and line number information from PDB files. llvm-svn: 261239
* Remove autoconf supportChris Bieneman2016-01-261-16/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
* Fix compilation of PDBApiTest.Zachary Turner2015-05-011-1/+1
| | | | llvm-svn: 236345
* [PDB] Support executables and source/line info.Zachary Turner2015-04-171-0/+10
| | | | | | | | | | | | Previously DebugInfoPDB could only load data for a PDB given a path to the PDB. It could not open an EXE and find the matching PDB and verify it matched, etc. This patch adds support for that so that we can simply load debug information for a PDB directly. Additionally, this patch extends DebugInfoPDB to support getting source and line information for symbols. llvm-svn: 235237
* [llvm-pdbdump] Very minor code cleanup.Zachary Turner2015-02-231-1/+1
| | | | | | | This just removes some dead enums as well as some debug flushes of stdout. llvm-svn: 230204
* Fix the build, I forgot to check that UnitTests still built.Zachary Turner2015-02-131-0/+3
| | | | llvm-svn: 229021
* Fix warning due to unused private member variable.Zachary Turner2015-02-111-4/+3
| | | | llvm-svn: 228774
* Convert std::make_unique<> to llvm::make_unique<>.Zachary Turner2015-02-101-2/+2
| | | | llvm-svn: 228768
* Add missing function and header include.Zachary Turner2015-02-101-0/+5
| | | | llvm-svn: 228758
* Rewrite llvm-pdbdump in terms of LLVMDebugInfoPDB.Zachary Turner2015-02-101-15/+15
| | | | | | | | | | | | | This makes llvm-pdbdump available on all platforms, although it will currently fail to create a dumper if there is no PDB reader implementation for the current platform. It implements dumping of compilands and children, which is less information than was previously available, but it has to be rewritten from scratch using the new set of interfaces, so the rest of the functionality will be added back in subsequent commits. llvm-svn: 228755
* Fix build due to mismatched function signatures.Zachary Turner2015-02-101-2/+5
| | | | llvm-svn: 228752
* DebugInfoPDB: Make the symbol base case hold an IPDBSession ref.Zachary Turner2015-02-081-8/+29
| | | | | | | | | Dumping a symbol often requires access to data that isn't inside the symbol hierarchy, but which is only accessible through the top-level session. This patch is a pure interface change to give symbols a reference to the session. llvm-svn: 228542
* Some cleanup for libpdb.Zachary Turner2015-02-081-6/+2
| | | | | | | | | | | This patch implements a few of the optional suggestions from the initial patch comitting libpdb. In particular, it implements a virtual function out of line for each of the concrete classes. A few other minor cleanups exist as well, such as using override instead of virtual, etc. llvm-svn: 228516
* Consistently use override rather than virtual.Chandler Carruth2015-02-071-8/+8
| | | | | | This fixes -Winconsistent-missing-override warnings. llvm-svn: 228489
* Change RHS-style decltype to LHS-style decltype<declval()>.Zachary Turner2015-02-071-1/+2
| | | | | | | | Seems some compilers don't like the RHS-style decltype specifier. This should fix the buildbots. llvm-svn: 228484
* Resubmit unittests for DebugInfoPDB.Zachary Turner2015-02-073-0/+386
| | | | | | | | | | | | | | | These were originally submitted as part of r228428, but this part caused a build breakage in LLVMConfig. The library portion was resubmitted independently since it was not causing breakage. There were two reasons this was causing the build to fail. The first is that there were no Makefiles added for the PDB tests. And the second is that the DebugInfoPDB library was only being built by CMake behind an "if (MSVC)" check. This is wrong since this the library hides platform specific details, and it was causing LLVM-Config to not find the library when trying to build unittests. llvm-svn: 228482
* Revert "Create lib/DebugInfo/PDB."Zachary Turner2015-02-063-376/+0
| | | | | | This reverts commit 21028, as it is causing failures in LLVMConfig. llvm-svn: 228431
* Create lib/DebugInfo/PDB.Zachary Turner2015-02-063-0/+376
This patch creates a platform-independent interface to a PDB reader. There is currently no implementation of this interface, which will be provided in future patches. This defines the basic object model which any implementation must conform to. Reviewed by: David Blaikie Differential Revision: http://reviews.llvm.org/D7356 llvm-svn: 228428
OpenPOWER on IntegriCloud