summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
Commit message (Collapse)AuthorAgeFilesLines
...
* [DWARF parser] Respect address ranges specified in compile unit DIE.Alexey Samsonov2014-04-181-0/+7
| | | | | | | | | | | When address ranges for compile unit are specified in compile unit DIE itself, there is no need to collect ranges from children subprogram DIEs. This change speeds up llvm-symbolizer on Clang-produced binaries with full debug info. For instance, symbolizing a first address in a 1Gb binary is now 2x faster (1s vs. 2s). llvm-svn: 206641
* DebugInfo: Remove some initializer lists to make MSVC happy again.Benjamin Kramer2014-04-181-3/+3
| | | | llvm-svn: 206632
* [DWARF parser] Refactor fetching DIE address ranges.Alexey Samsonov2014-04-187-64/+72
| | | | | | | | | | Add a helper method to get address ranges specified in a DIE (either by DW_AT_low_pc/DW_AT_high_pc, or by DW_AT_ranges). Use it to untangle and simplify the code. No functionality change. llvm-svn: 206624
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-157-38/+38
| | | | | | instead of comparing to nullptr. llvm-svn: 206252
* Simplify compression API by decompressing into a SmallVector rather than a ↵David Blaikie2014-04-052-6/+7
| | | | | | | | | | | | MemoryBuffer This avoids an extra copy during decompression and avoids the use of MemoryBuffer which is a weirdly esoteric device that includes unrelated concepts like "file name" (its rather generic name is a bit misleading). Similar refactoring of zlib::compress coming up. llvm-svn: 205676
* DebugInfo: Support debug_loc under fissionDavid Blaikie2014-03-254-0/+96
| | | | | | | | | | | | | | | | | | | | | | Implement debug_loc.dwo, as well as llvm-dwarfdump support for dumping this section. Outlined in the DWARF5 spec and http://gcc.gnu.org/wiki/DebugFission the debug_loc.dwo section has more variation than the standard debug_loc, allowing 3 different forms of entry (plus the end of list entry). GCC seems to, and Clang certainly, only use one form, so I've just implemented dumping support for that for now. It wasn't immediately obvious that there was a good refactoring to share the implementation of dumping support between debug_loc and debug_loc.dwo, so they're separate for now - ideas welcome or I may come back to it at some point. As per a comment in the code, we could choose different forms that may reduce the number of debug_addr entries we emit, but that will require further study. llvm-svn: 204697
* Make some assertions on constant expressions static.Benjamin Kramer2014-03-151-1/+3
| | | | llvm-svn: 204011
* [C++11] Introduce SectionRef::relocations() to use range-based loopsAlexey Samsonov2014-03-141-8/+6
| | | | | | | | | | | | Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3077 llvm-svn: 203927
* Use ctor instead of initializer list to appease Windows buildbotsAlexey Samsonov2014-03-142-1/+2
| | | | llvm-svn: 203915
* Use temporary instead of a local variable hereAlexey Samsonov2014-03-141-2/+1
| | | | llvm-svn: 203914
* [C++11] Introduce ObjectFile::sections().Alexey Samsonov2014-03-131-17/+15
| | | | | | | | | | | | | | | | | | Summary: This adds ObjectFile::section_iterator_range, that allows to write range-based for-loops running over all sections of a given file. Several files from lib/ are converted to the new interface. Similar fixes should be applied to a variety of llvm-* tools. Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3069 llvm-svn: 203799
* [C++11] DWARF parser: use SmallVector<std::unique_ptr> for parsed units in ↵Alexey Samsonov2014-03-132-31/+20
| | | | | | DWARFContext, and delete custom destructors llvm-svn: 203770
* [C++11] Convert DWARF parser to range-based for loopsAlexey Samsonov2014-03-1316-165/+163
| | | | llvm-svn: 203766
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-063-16/+14
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* [C++11] Replace OwningPtr::take() with OwningPtr::release().Ahmed Charles2014-03-051-5/+5
| | | | llvm-svn: 202957
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-053-33/+33
| | | | | | class. llvm-svn: 202946
* Switch all uses of LLVM_OVERRIDE to just use 'override' directly.Craig Topper2014-03-022-3/+3
| | | | llvm-svn: 202621
* [C++11] Switch all uses of the llvm_move macro to use std::moveChandler Carruth2014-03-021-1/+1
| | | | | | directly, and remove the macro. llvm-svn: 202612
* llvm-dwarfdump: Support for debug_line.dwo section for file names for type ↵David Blaikie2014-02-244-15/+35
| | | | | | units under fission. llvm-svn: 202091
* Support DWARF discriminators in object streamer.Diego Novillo2014-02-142-3/+12
| | | | | | | | | | | | | | | Summary: This adds support for emitting DWARF path discriminator values in the object streamer. It also changes the DWARF dumper to show discriminator values in the line table output. Reviewers: echristo CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2794 llvm-svn: 201427
* make llvm-dwarfdump a little more resilient when parsing .debug_locAdrian Prantl2014-02-111-1/+3
| | | | | | | | sections. The call to data.getUnsigned(&Offset, AddressSize) only increments Offset if the read succeeds, which will result in an infinite loop. llvm-svn: 201179
* Change the begin and end methods in ObjectFile to match the style guide.Rafael Espindola2014-02-101-6/+6
| | | | llvm-svn: 201108
* Simplify the handling of iterators in ObjectFile.Rafael Espindola2014-01-301-5/+4
| | | | | | | | | | | | None of the object file formats reported error on iterator increment. In retrospect, that is not too surprising: no object format stores symbols or sections in a linked list or other structure that requires chasing pointers. As a consequence, all error checking can be done on begin() and end(). This reduces the text segment of bin/llvm-readobj in my machine from 521233 to 518526 bytes. llvm-svn: 200442
* [Sparc] Add support for parsing DW_CFA_GNU_window_save. Venkatraman Govindaraju2014-01-261-0/+1
| | | | llvm-svn: 200127
* DWARFContext: Fix possible memory leak since r198908.NAKAMURA Takumi2014-01-241-0/+1
| | | | llvm-svn: 200000
* Change createObjectFile to return an ErrorOr.Rafael Espindola2014-01-221-2/+2
| | | | llvm-svn: 199776
* llvm-dwarfdump: type unit dwo supportDavid Blaikie2014-01-092-3/+60
| | | | llvm-svn: 198850
* Simplify/collapse/denest a conditions/blocks.David Blaikie2014-01-091-32/+31
| | | | llvm-svn: 198813
* llvm-dwarfdump: reorder dwo sections to immediately proceed their non-dwo ↵David Blaikie2014-01-081-27/+27
| | | | | | | | | equivalents This makes it easier to write a test that's mostly shared between fission and non-fission (using FileCheck's multiple prefix support). llvm-svn: 198806
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-074-4/+4
| | | | | | | | | | subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-132-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. Recommitted as r197197 to reproduce the failure and reverted as r197199 Turns out there was unstable ordering in the type unit dumping code. Fixed by using MapVector in DWARFContext to store the debug_types comdat sections. Recommitted as r197210 with a fix to dumping and reverted as r197211 because I was a bit gun shy and thought I saw a failure that turned out to be unrelated. So here we go - once more with feeling! \o/ llvm-svn: 197275
* Revert "DebugInfo: Move type units into the debug_types section with ↵David Blaikie2013-12-132-8/+9
| | | | | | | | appropriate comdat grouping and type unit headers" This reverts commit r197210. llvm-svn: 197211
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-132-9/+8
| | | | | | | | | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. Recommitted as r197197 to reproduce the failure and reverted as r197199 Turns out there was unstable ordering in the type unit dumping code. Fixed by using MapVector in DWARFContext to store the debug_types comdat sections. llvm-svn: 197210
* DebugInfo: Avoid emitting pubtype entries for type DIEs that just indirect ↵David Blaikie2013-11-261-20/+22
| | | | | | to a type unit. llvm-svn: 195698
* DebugInfo: Make pubnames header printing similar to unit header printingDavid Blaikie2013-11-011-4/+4
| | | | | | | | | | | | | | | In a failed attempt to allow the gnu-public-names.ll test case to not hardcode the size of the unit that the pubnames section referred to I've at least managed to have unit headers and pubnames headers print out in a similar style. This failed to achieve the desired goal because the header in a unit specifies the length of the unit without the length element of the header whereas the length in the pubnames includes this element, so the numbers are off by 4 bytes. I don't know of any arithmetic powers in FileCheck so the test case can't simply say "CU_LENGTH + 4". llvm-svn: 193872
* DWARFDebugArangeSet: remove dead codeAlexey Samsonov2013-10-312-54/+0
| | | | llvm-svn: 193785
* DWARFUnit: kill dead code and make a couple of functions private. No ↵Alexey Samsonov2013-10-312-38/+7
| | | | | | functionality change. llvm-svn: 193780
* DWARFAbbreviationDeclaration: remove dead code, refactor parsing code and ↵Alexey Samsonov2013-10-313-75/+60
| | | | | | make it more robust. No functionality change. llvm-svn: 193770
* DWARF parser: propery handle DW_FORM_ref_sig8 and fix Windows build.Alexey Samsonov2013-10-291-43/+41
| | | | | | Based on D2050 by Timur Iskhodzhanov. llvm-svn: 193619
* Quick-fix DebugInfo build on WindowsTimur Iskhodzhanov2013-10-291-1/+3
| | | | | | | | | | | | | | | MSVC can't comprehend template<typename T, size_t N> ArrayRef<T> makeArrayRef(const T (&Arr)[N]) { return ArrayRef<T>(Arr); } if Arr is static const uint8_t sizes[]; declared in a templated and defined a few lines later. I'll send a proper fix (i.e. get rid of unnecessary templates) for review soon. llvm-svn: 193604
* Clean up.Richard Smith2013-10-291-4/+4
| | | | llvm-svn: 193576
* DWARFFormValue.cpp: Appease gcc to give explicit constructors.NAKAMURA Takumi2013-10-291-4/+4
| | | | | | error: conversion from `const uint8_t*' to non-scalar type `llvm::ArrayRef<unsigned char>' requested llvm-svn: 193575
* Merge DWARFDIE::extractFast and DWARFDIE::extract into one function.Alexey Samsonov2013-10-282-56/+10
| | | | | | | Complicated CU-DIE-specific logic in the latter was never used, and it makes sense to have safety checks for broken dwarf in the former. llvm-svn: 193563
* DWARF parser: Use ArrayRef to represent form sizes and simplify ↵Alexey Samsonov2013-10-284-18/+11
| | | | | | DWARFDIE::extractFast() interface. No functionality change. llvm-svn: 193560
* DWARF parser: since DWARF4, DW_AT_high_pc may be a constant representing ↵Alexey Samsonov2013-10-281-4/+10
| | | | | | function size llvm-svn: 193555
* DebugInfo: Introduce the notion of "form classes"Alexey Samsonov2013-10-285-67/+158
| | | | | | | | | | | | | | | | | | Summary: Use DWARF4 table of form classes to fetch attributes from DIE in a more consistent way. This shouldn't change the functionality and serves as a refactoring for upcoming change: DW_AT_high_pc has different semantics depending on its form class. Reviewers: dblaikie, echristo Reviewed By: echristo CC: echristo, llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1961 llvm-svn: 193553
* Correct log message typo: ended ad -> ended atEd Maste2013-10-181-1/+1
| | | | | | (From LLDB r192897) llvm-svn: 192968
* [DebugInfo] Remove unneeded struct member and hide struct definition. No ↵Alexey Samsonov2013-10-181-3/+2
| | | | | | functionality change. llvm-svn: 192954
* [DebugInfo] Remove dead code.Alexey Samsonov2013-10-181-31/+0
| | | | llvm-svn: 192952
* [DebugInfo] Delete dead code, simplify and fix code style for some existing ↵Alexey Samsonov2013-10-172-49/+31
| | | | | | code. No functionality change. llvm-svn: 192894
OpenPOWER on IntegriCloud