summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
Commit message (Collapse)AuthorAgeFilesLines
...
* Add concrete type overloads to PDBSymbol::findChildren().Zachary Turner2015-02-126-35/+29
| | | | | | | | | | | | Frequently you only want to iterate over children of a specific type (e.g. functions). Previously you would get back a generic interface that allowed iteration over the base symbol type, which you would have to dyn_cast<> each one of. With this patch, we allow the user to specify the concrete type as a template parameter, and it will return an iterator which returns instances of the concrete type directly. llvm-svn: 228960
* Fix build for CMake < 2.8.12.Peter Collingbourne2015-02-111-1/+1
| | | | llvm-svn: 228810
* Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects.Zachary Turner2015-02-112-2/+5
| | | | | | | | | | This allows IDEs to recognize the entire set of header files for each of the core LLVM projects. Differential Revision: http://reviews.llvm.org/D7526 Reviewed By: Chris Bieneman llvm-svn: 228798
* Temporary workaround to fix MSVC 2012 build problemsAndrew Kaylor2015-02-111-1/+11
| | | | llvm-svn: 228788
* Fix some warnings due to -Wcovered-switch-default.Zachary Turner2015-02-112-8/+0
| | | | llvm-svn: 228773
* Convert std::make_unique<> to llvm::make_unique<>.Zachary Turner2015-02-102-11/+12
| | | | llvm-svn: 228768
* Rewrite llvm-pdbdump in terms of LLVMDebugInfoPDB.Zachary Turner2015-02-1038-45/+801
| | | | | | | | | | | | | 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
* Provide DIA implementation of DebugInfoPDB.Zachary Turner2015-02-1011-0/+1338
| | | | | | | | | | | | | | | | | This implements DebugInfoPDB when the DIA SDK is present on the system. Specifically, this means that the following conditions are met: 1) You are building on Windows. 2) You are building with MSVC. 3) Visual Studio did not corrupt the installation of DIA due to a known issue with side-by-side installations of VS2012 and VS2013. If all of these conditions are true, you will be able to pass a value of PDB_Reader::DIA to PDB::createPdbReader(). There are no tests for this yet, as any test will be in the form of a lit test which tests the llvm-pdbdump.exe, which still needs to be rewritten in terms of this library. llvm-svn: 228747
* Fix -Wuninitialized build by referencing the relevant ctor parameter instead ↵David Blaikie2015-02-088-8/+8
| | | | | | of the base class member variable. llvm-svn: 228554
* Make PDBSymbol's IPDBSymbol reference const.Zachary Turner2015-02-0832-33/+33
| | | | llvm-svn: 228553
* DebugInfoPDB: Make the symbol base case hold an IPDBSession ref.Zachary Turner2015-02-0832-67/+87
| | | | | | | | | 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
* Removed unused function mistakenly left in, triggering -Werror.Zachary Turner2015-02-081-21/+0
| | | | llvm-svn: 228517
* Some cleanup for libpdb.Zachary Turner2015-02-0833-71/+663
| | | | | | | | | | | 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
* Resubmit unittests for DebugInfoPDB.Zachary Turner2015-02-071-3/+2
| | | | | | | | | | | | | | | 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
* Try to fix Makefile build for LLVMDebugInfoPDB.Zachary Turner2015-02-062-1/+15
| | | | llvm-svn: 228437
* Resubmit "Create lib/DebugInfo/PDB" (r228428)Zachary Turner2015-02-069-2/+315
| | | | | | | | | | | | | | | | | | | | This change resubmits the patch that broke the build, this time without unittests. The unittests will be submitted separately after the problem has been addressed: --Original Commit Message-- Create lib/DebugInfo/PDB. 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: 228435
* Revert "Create lib/DebugInfo/PDB."Zachary Turner2015-02-069-315/+2
| | | | | | This reverts commit 21028, as it is causing failures in LLVMConfig. llvm-svn: 228431
* Create lib/DebugInfo/PDB.Zachary Turner2015-02-069-2/+315
| | | | | | | | | | | | 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
* Move DebugInfo to DebugInfo/DWARF.Zachary Turner2015-01-3026-57/+98
| | | | | | | | | | | | | In preparation for adding PDB support to LLVM, this moves the DWARF parsing code to its own subdirectory under DebugInfo, and renames LLVMDebugInfo to LLVMDebugInfoDWARF. This is purely a mechanical / build system change. Differential Revision: http://reviews.llvm.org/D7269 Reviewed by: Eric Christopher llvm-svn: 227586
* [cleanup] Re-sort all the #include lines in LLVM usingChandler Carruth2015-01-145-6/+4
| | | | | | | | | | | utils/sort_includes.py. I clearly haven't done this in a while, so more changed than usual. This even uncovered a missing include from the InstrProf library that I've added. No functionality changed here, just mechanical cleanup of the include order. llvm-svn: 225974
* Implement a very basic colored syntax highlighting for llvm-dwarfdump.Adrian Prantl2015-01-065-21/+112
| | | | | | | | | | The color scheme is the same as the one used by the colorize dwarfdump script on Darwin. A new --color option can be used to forcibly turn color on or off. http://reviews.llvm.org/D6852 llvm-svn: 225269
* [DebugInfo] Move all DWARF headers to the public include directory.Frederic Riss2014-12-1932-1608/+26
| | | | | | | | | | dsymutil needs access to DWARF specific inforamtion, the small DIContext wrapper isn't sufficient. Other DWARF consumers might want to use it too (I'm looking at you lldb). Differential Revision: http://reviews.llvm.org/D6694 llvm-svn: 224594
* Silence more static analyzer warnings.Michael Ilseman2014-12-151-1/+3
| | | | | | | | Add in definedness checks for shift operators, null checks when pointers are assumed by the code to be non-null, and explicit unreachables. llvm-svn: 224255
* Make DWARFAcceleratorTable::dump() const.Frederic Riss2014-11-202-9/+12
| | | | | | | | | As dump() methods should be. To allow that, do not store the DWARFFormValue objects used for the dump in the header data. Per Alexey's suggestion! llvm-svn: 222436
* Add missing copyright headers.Frederic Riss2014-11-202-0/+17
| | | | llvm-svn: 222435
* [dwarfdump] Handle relocations in Dwarf accelerator tablesFrederic Riss2014-11-144-24/+40
| | | | | | | | | | | ELF targets (and maybe COFF) use relocations when referring to strings in the .debug_str section. Handle that in the accelerator table dumper. This commit restores the test/DebugInfo/cross-cu-inlining.ll test to its expected platform independant form, validating that the fix works (this test failed on linux boxes). llvm-svn: 222029
* Reapply "[dwarfdump] Add support for dumping accelerator tables."Frederic Riss2014-11-145-0/+200
| | | | | | | | | | | | | This reverts commit r221842 which was a revert of r221836 and of the test parts of r221837. This new version fixes an UB bug pointed out by David (along with addressing some other review comments), makes some dumping more resilient to broken input data and forces the accelerator tables to be dumped in the tests where we use them (this decision is platform specific otherwise). llvm-svn: 222003
* Revert "[dwarfdump] Add support for dumping accelerator tables."Frederic Riss2014-11-135-194/+0
| | | | | | | | | | This reverts commit r221836. The tests are asserting on some buildbots. This also reverts the test part of r221837 as it relies on dwarfdump dumping the accelerator tables. llvm-svn: 221842
* [dwarfdump] Add support for dumping accelerator tables.Frederic Riss2014-11-125-0/+194
| | | | | | | The class used for the dump only allows to dump for the moment, but it can (and will) be easily extended to support search also. llvm-svn: 221836
* Allow DWARFFormValue::extractValue to be called with a null CU.Frederic Riss2014-11-121-15/+17
| | | | | | | | | | | | | | | Currently FormValues are only used for attributes of DIEs and thus uers always have a CU lying around when calling into the FormValue API. Accelerator tables encode their information using the same Forms as the attributes, thus it is natural to use DWARFFormValue to extract/dump them. There is no CU in that case though. Allow the API to be called with a null CU arguemnt by making the RelocMap lookup conditional on the CU pointer validity. And document this new behvior in the header. (Test coverage for this use of the API comes in the DwarfAccelTable support patch) llvm-svn: 221835
* Remove unsused variables.Frederic Riss2014-11-121-2/+0
| | | | llvm-svn: 221834
* [dwarfdump] Dump DW_AT_ranges values inline in the debug_info dump.Frederic Riss2014-10-231-1/+19
| | | | | | | | | | | The output looks like that: DW_AT_ranges [FORM_data4] (0x00000000 [0x00000001000024a0 - 0x00000001000024c2) [0x0000000100002505 - 0x000000010000268b)) Differential Revision: http://reviews.llvm.org/D5712 llvm-svn: 220466
* Constify input argument of RelocVisitor and DWARFContext constructors. NFC.Alexey Samsonov2014-10-203-3/+3
| | | | llvm-svn: 220228
* Add couple of missing 'override' keyword. NFC.Fariborz Jahanian2014-10-101-1/+1
| | | | llvm-svn: 219516
* [dwarfdump] Prettyprint DW_AT_APPLE_property_attribute bitfield values.Frederic Riss2014-10-101-0/+19
| | | | | | | | | | | | | This change depends on the ApplePropertyString helper that I sent spearately. Not sure how you want this tested: as a tool test by adding a binary to dump, or as an llvm test starting from an IR file? Reviewers: dblaikie, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5689 llvm-svn: 219507
* [dwarfdump] Resolve also variable specifications/abstract_origins.Frederic Riss2014-10-102-11/+20
| | | | | | | | | | | | | | | | | DW_AT_specification and DW_AT_abstract_origin resolving was only performed on subroutine DIEs because it used the getSubroutineName method. Introduce a more generic getName() and use it to dump the reference attributes. Testcases have been updated to check the printed names instead of the offsets except when the name could be ambiguous. Reviewers: dblaikie, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5625 llvm-svn: 219506
* Remove bogus std::error_code returns form SectionRef.Rafael Espindola2014-10-081-6/+3
| | | | | | | | | | | | | | There are two methods in SectionRef that can fail: * getName: The index into the string table can be invalid. * getContents: The section might point to invalid contents. Every other method will always succeed and returning and std::error_code just complicates the code. For example, a section can have an invalid alignment, but if we are able to get to the section structure at all and create a SectionRef, we will always be able to read that invalid alignment. llvm-svn: 219314
* llvm-dwarfdump: Add support for some COFF relocationsDavid Majnemer2014-10-081-6/+3
| | | | | | | DWARF in COFF utilizes several relocations. Implement support for them in RelocVisitor to support llvm-dwarfdump. llvm-svn: 219280
* [DebugInfo] Pass DWARFSection down to DWARFUnit constructor (NFC).Alexey Samsonov2014-10-084-25/+25
| | | | | | Keep the actual section contents and the relocation map together. llvm-svn: 219261
* [DebugInfo] Pass DWARFSection into DWARFUnitSection constructor (NFC).Alexey Samsonov2014-10-083-27/+25
| | | | llvm-svn: 219259
* [DebugInfo] Turn DWARFContext::Section into DWARFSection (NFC).Alexey Samsonov2014-10-072-25/+45
| | | | | | | | It would be more convenient to pass DWARFSection into DWARFUnitSection constructor, instead of passing its components (Data and RelocAddrMap) as a separate arguments. llvm-svn: 219252
* Refactor RelocVisitor to take an object. This removes someEric Christopher2014-10-061-1/+1
| | | | | | | | | string comparisons and makes it a bit easier to check individual targets. Patch by Charlie Turner. llvm-svn: 219108
* Resolve ambiguity between llvm::make_unique and std::make_unique.Yaron Keren2014-10-061-2/+3
| | | | | | | Intorduced in r219098. llvm-svn: 219105
* [dwarfdump] Print the name for referenced specification of abstract_origin DIEs.Frederic Riss2014-10-061-0/+14
| | | | | | | | | | Reviewers: dblaikie, samsonov, echristo, aprantl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5466 llvm-svn: 219099
* Factor the Unit section parsing into the DWARFUnitSection class.Frederic Riss2014-10-063-62/+50
| | | | | | | | | | | | Summary: No functional change. Reviewers: dblaikie, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5522 llvm-svn: 219098
* Remove unnecessary copying or replace it with moves in a bunch of places.Benjamin Kramer2014-10-042-3/+4
| | | | | | NFC. llvm-svn: 219061
* Store TypeUnits in a SmallVector<DWARFUnitSection> instead of a single ↵Frederic Riss2014-09-293-16/+28
| | | | | | | | | | | | | | | | | | | | | | | | | DWARFUnitSection. There will be multiple TypeUnits in an unlinked object that will be extracted from different sections. Now that we have DWARFUnitSection that is supposed to represent an input section, we need a DWARFUnitSection<TypeUnit> per input .debug_types section. Once this is done, the interface is homogenous and we can move the Section parsing code into DWARFUnitSection. This is a respin of r218513 that got reverted because it broke some builders. This new version features an explicit move constructor for the DWARFUnitSection class to workaround compilers unable to generate correct C++11 default constructors. Reviewers: samsonov, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5482 llvm-svn: 218606
* Object: BSS/virtual sections don't have contentsDavid Majnemer2014-09-261-0/+9
| | | | | | | | | | | | Users of getSectionContents shouldn't try to pass in BSS or virtual sections. In all instances, this is a bug in the code calling this routine. N.B. Some COFF implementations (like CL) will mark their BSS sections as taking space on disk. This would confuse COFFObjectFile into thinking the section is larger than the file. llvm-svn: 218549
* Revert "Store TypeUnits in a SmallVector<DWARFUnitSection> instead of a ↵Frederic Riss2014-09-262-23/+16
| | | | | | | | | | | single DWARFUnitSection." This reverts commit r218513. Buildbots using libstdc++ issue an error when trying to copy SmallVector<std::unique_ptr<>>. Revert the commit until we have a fix. llvm-svn: 218514
* Store TypeUnits in a SmallVector<DWARFUnitSection> instead of a single ↵Frederic Riss2014-09-262-16/+23
| | | | | | | | | | | | | | | | | | | | | DWARFUnitSection. Summary: There will be multiple TypeUnits in an unlinked object that will be extracted from different sections. Now that we have DWARFUnitSection that is supposed to represent an input section, we need a DWARFUnitSection<TypeUnit> per input .debug_types section. Once this is done, the interface is homogenous and we can move the Section parsing code into DWARFUnitSection. Reviewers: samsonov, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5482 llvm-svn: 218513
OpenPOWER on IntegriCloud