summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/DebugInfo/PDB/PDBApiTest.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
* 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
* Revert "Revert "[PDB] Extend IPDBSession's interface to retrieve frame data""Aleksandr Urakov2018-10-231-0/+4
| | | | | | This reverts commit 466ce67d6ec444962e5cc0136243c16a453190c0. llvm-svn: 345010
* Revert "[PDB] Extend IPDBSession's interface to retrieve frame data"Aleksandr Urakov2018-10-221-4/+0
| | | | | | This reverts commit b5c7e2f9a4dbb34e3667c4bb4972735eadd3247a. llvm-svn: 344909
* [PDB] Extend IPDBSession's interface to retrieve frame dataAleksandr Urakov2018-10-221-0/+4
| | | | | | | | | | | | | | | | | | Summary: This patch just extends the `IPDBSession` interface to allow retrieving of frame data through it, and adds an implementation over DIA. It is needed for an implementation (for now with DIA) of the conversion from FPO programs to DWARF expressions mentioned in D53086. Reviewers: zturner, asmith, rnk Reviewed By: asmith Subscribers: mgorny, aprantl, JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D53324 llvm-svn: 344886
* Fix function signature to actually be an override.Zachary Turner2018-09-181-1/+2
| | | | llvm-svn: 342496
* [PDB] Change uint32_t to SymIndex wherever it makes sense.Zachary Turner2018-09-101-1/+1
| | | | | | Although it's just a typedef, it helps for readability. NFC. llvm-svn: 341863
* [DebugInfoPDB] Add missing test for findSymbolByRVA and findSymbolByAddrAaron Smith2018-04-101-0/+9
| | | | llvm-svn: 329733
* [DebugInfoPDB] Add DIA implementation of findLineNumbersByRVAAaron Smith2018-03-261-0/+4
| | | | | | | This method is used to find line numbers for PDBSymbolData that have an invalid virtual address. llvm-svn: 328586
* [DebugInfoPDB] Add DIA implementation of addressForVA and addressForRVAAaron Smith2018-03-261-2/+8
| | | | | | These are used in finding line numbers for PDBSymbolData llvm-svn: 328585
* [DIA] Add IPDBSectionContrib interfaces and DIA implementationAaron Smith2018-03-221-0/+5
| | | | | | | | | | | | | | | | | | | | | To resolve symbol context at a particular address, we need to determine the compiland for the address. We are able to determine the parent compiland of PDBSymbolFunc, PDBSymbolTypeUDT, PDBSymbolTypeEnum symbols indirectly through line information. However no such information is availabile for PDBSymbolData, i.e. variables. The Section Contribution table from PDBs has information about each compiland's contribution to sections by address. For example, a piece of a contribution looks like, VA RelativeVA Sect No. Offset Length Compiland 14000087B0 000087B0 0001 000077B0 000000BB exe_main.obj So given an address, it's possible to determine its compiland with this information. llvm-svn: 328178
* [DebugInfo] Add a new method IPDBSession::findLineNumbersBySectOffsetAaron Smith2018-03-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Some PDB symbols do not have a valid VA or RVA but have Addr by Section and Offset. For example, a variable in thread-local storage has the following properties: get_addressOffset: 0 get_addressSection: 5 get_lexicalParentId: 2 get_name: g_tls get_symIndexId: 12 get_typeId: 4 get_dataKind: 6 get_symTag: 7 get_locationType: 2 This change provides a new method to locate line numbers by Section and Offset from those symbols. Reviewers: zturner, rnk, llvm-commits Subscribers: asmith, JDevlieghere Differential Revision: https://reviews.llvm.org/D44407 llvm-svn: 327601
* Implement pure virtual method to fix build.Zachary Turner2018-03-131-0/+5
| | | | llvm-svn: 327431
* [DebugInfoPDB] Add DIA implementation for getSrcLineOnTypeDefnAaron Smith2018-03-071-0/+5
| | | | | | | | | | | | | | Summary: This helps to determine the line number for a PDB type with definition Reviewers: zturner, llvm-commits, rnk Reviewed By: zturner Subscribers: rengolin, JDevlieghere Differential Revision: https://reviews.llvm.org/D44119 llvm-svn: 326857
* [PDB] Check the result of setLoadAddress()Aaron Smith2018-02-231-1/+1
| | | | | | | | | | | | Summary: Change setLoadAddress() to return true or false on failure. Reviewers: zturner, llvm-commits Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D43638 llvm-svn: 325843
* [PDB] Add missing override to silence buildbotsAaron Smith2018-02-221-1/+1
| | | | llvm-svn: 325828
* [PDB] Implement more find methods for PDB symbolsAaron Smith2018-02-221-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add additional find methods on PDB raw symbols. findChildrenByAddr() findChildrenByVA() findInlineFramesByAddr() findInlineFramesByVA() findInlineLines() findInlineLinesByAddr() findInlineLinesByRVA() findInlineLinesByVA() Reviewers: zturner, llvm-commits Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D43637 llvm-svn: 325824
* [DebugInfo/PDB] Adding getUndecoratedNameEx and IPDB interfaces for ↵Aaron Smith2017-11-161-0/+9
| | | | | | | | | | | IDiaEnumTables and IDiaTable. Initial changes to support debugging PE/COFF files with LLDB on Windows through DIA SDK. There is another set of changes required on the LLDB side before this does anything. Differential Revision: https://reviews.llvm.org/D39517 llvm-svn: 318403
* Make IPDBSession::getGlobalScope a non-const methodAdrian McCarthy2017-06-221-3/+1
| | | | | | | | | | | | There doesn't seem to be a compelling reason why this method should be const other than it was possible with the DIA implementation. The native session is going to act as a symbol factory and cache. This could be acheived with mutable (and the existing const_cast), but it seems cleaner to accept that this method affects the state of the session. This change eliminates an existing const_cast. llvm-svn: 306041
* [llvm-pdbdump] More advanced class definition dumping.Zachary Turner2017-04-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix unit tests after r296049.Adrian McCarthy2017-02-241-1/+1
| | | | llvm-svn: 296055
* 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
* 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-071-0/+359
| | | | | | | | | | | | | | | 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-061-349/+0
| | | | | | This reverts commit 21028, as it is causing failures in LLVMConfig. llvm-svn: 228431
* Create lib/DebugInfo/PDB.Zachary Turner2015-02-061-0/+349
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