summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARFUnit.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [DebugInfo] Move all DWARF headers to the public include directory.Frederic Riss2014-12-191-2/+2
| | | | | | | | | | 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
* [DebugInfo] Pass DWARFSection down to DWARFUnit constructor (NFC).Alexey Samsonov2014-10-081-7/+7
| | | | | | Keep the actual section contents and the relocation map together. llvm-svn: 219261
* [DebugInfo] Pass DWARFSection into DWARFUnitSection constructor (NFC).Alexey Samsonov2014-10-081-9/+7
| | | | llvm-svn: 219259
* Factor the Unit section parsing into the DWARFUnitSection class.Frederic Riss2014-10-061-0/+15
| | | | | | | | | | | | Summary: No functional change. Reviewers: dblaikie, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5522 llvm-svn: 219098
* Introduce the DWARFUnitSection abstraction.Frederic Riss2014-09-151-2/+3
| | | | | | | | | | | | | | | | | | A DWARFUnitSection is the collection of Units that have been extracted from the same debug section. By embeding a reference to their DWARFUnitSection in each unit, the DIEs will be able to resolve inter-unit references by interrogating their Unit's DWARFUnitSection. This is a minimal patch where the DWARFUnitSection is-a SmallVector of Units, thus exposing exactly the same interface as before. Followup-up patches might change from inheritance to composition in order to expose only the wanted DWARFUnitSection abstraction. Differential Revision: http://reviews.llvm.org/D5310 llvm-svn: 217747
* [DWARF parser] Fix nasty memory corruption in .dwo files handling.Alexey Samsonov2014-09-051-11/+9
| | | | | | | Forge a test case where llvm-symbolizer has to use external .dwo file to produce the inlining information. llvm-svn: 217270
* Add a DWARFContext& member in DWARFUnit.Frederic Riss2014-09-041-6/+6
| | | | | | | | | | The DWARFContext will be used to pass global 'context' down, like pointers to related debug info sections or command line options. The first use will be for the debug_info dumper to be able to access other debug info section to dump eg. Location Expression inline in the debug_info dump. llvm-svn: 217128
* Don't own the buffer in object::Binary.Rafael Espindola2014-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Owning the buffer is somewhat inflexible. Some Binaries have sub Binaries (like Archive) and we had to create dummy buffers just to handle that. It is also a bad fit for IRObjectFile where the Module wants to own the buffer too. Keeping this ownership would make supporting IR inside native objects particularly painful. This patch focuses in lib/Object. If something elsewhere used to own an Binary, now it also owns a MemoryBuffer. This patch introduces a few new types. * MemoryBufferRef. This is just a pair of StringRefs for the data and name. This is to MemoryBuffer as StringRef is to std::string. * OwningBinary. A combination of Binary and a MemoryBuffer. This is needed for convenience functions that take a filename and return both the buffer and the Binary using that buffer. The C api now uses OwningBinary to avoid any change in semantics. I will start a new thread to see if we want to change it and how. llvm-svn: 216002
* DWOHolder takes ownership of the argument constructor, use std::unique_ptr.Rafael Espindola2014-07-311-4/+5
| | | | | | Thanks to David Blaikie for noticing it. llvm-svn: 214434
* Use a reference instead of a pointer.Rafael Espindola2014-07-311-1/+1
| | | | | | This makes using a std::unique_ptr in the caller more convenient. llvm-svn: 214433
* Use std::unique_ptr to make the ownership explicit.Rafael Espindola2014-07-311-2/+2
| | | | llvm-svn: 214377
* [DWARF parser] Use distinction between DW_AT_ranges_base and ↵Alexey Samsonov2014-06-131-8/+5
| | | | | | DW_AT_GNU_ranges_base instead of DWARF version llvm-svn: 210945
* [llvm-symbolizer] Fix parsing DW_AT_ranges in Fission skeleton compile unit ↵Alexey Samsonov2014-06-121-3/+9
| | | | | | | | | | | | | DIEs. Turns out that DW_AT_ranges_base attribute sets the offset for DW_AT_ranges values specified in the .dwo file, but not for DW_AT_ranges specified in the skeleton compile unit DIE in the main executable. This is extremely confusing, and would hopefully be fixed in DWARF-5 when it's finalized. For now this behavior makes sense, as otherwise Fission would break DWARF consumers who doesn't know anything about DW_AT_ranges_base. llvm-svn: 210809
* [DWARF parser] Compress DIEMinimal even further, simplify building DIE tree.Alexey Samsonov2014-04-291-31/+24
| | | | | | | | | | | DIE doesn't need to store a pointer to its parent: we can traverse the DIE tree only with functions getFirstChild() and getSibling(). Parents must be known only when we construct the tree. Rewrite setDIERelations() procedure in a more straightforward way, and get rid of lots of now unused DIEMinimal methods. No functionality change. llvm-svn: 207563
* [DWARF parser] Make a few methods non-publicAlexey Samsonov2014-04-241-4/+4
| | | | llvm-svn: 207156
* [DWARF parser] DWARFUnit ctor doesn't need both parsed and raw .debug_abbrev ↵Alexey Samsonov2014-04-241-12/+14
| | | | | | section. Remove the former. llvm-svn: 207153
* [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
* [DWARF parser] Refactor fetching DIE address ranges.Alexey Samsonov2014-04-181-16/+9
| | | | | | | | | | 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-151-12/+12
| | | | | | instead of comparing to nullptr. llvm-svn: 206252
* [C++11] Convert DWARF parser to range-based for loopsAlexey Samsonov2014-03-131-4/+5
| | | | llvm-svn: 203766
* Change createObjectFile to return an ErrorOr.Rafael Espindola2014-01-221-2/+2
| | | | llvm-svn: 199776
* DWARFUnit: kill dead code and make a couple of functions private. No ↵Alexey Samsonov2013-10-311-24/+0
| | | | | | functionality change. llvm-svn: 193780
* DWARF parser: Use ArrayRef to represent form sizes and simplify ↵Alexey Samsonov2013-10-281-4/+1
| | | | | | DWARFDIE::extractFast() interface. No functionality change. llvm-svn: 193560
* DebugInfo: Introduce the notion of "form classes"Alexey Samsonov2013-10-281-8/+8
| | | | | | | | | | | | | | | | | | 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
* Unbreak the build (from r191233)since we're calling printf.David Blaikie2013-09-231-0/+1
| | | | llvm-svn: 191238
* Exract most of DWARFCompileUnit into a new DWARFUnit to prepare for the ↵David Blaikie2013-09-231-0/+391
coming DWARFTypeUnit. llvm-svn: 191233
OpenPOWER on IntegriCloud