summaryrefslogtreecommitdiff
path: root/lib/DebugInfo
Commit message (Collapse)AuthorAge
* Simplify the handling of iterators in ObjectFile.Rafael Espindola2014-01-30
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200442 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sparc] Add support for parsing DW_CFA_GNU_window_save. Venkatraman Govindaraju2014-01-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200127 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARFContext: Fix possible memory leak since r198908.NAKAMURA Takumi2014-01-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200000 91177308-0d34-0410-b5e6-96231b3b80d8
* Change createObjectFile to return an ErrorOr.Rafael Espindola2014-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199776 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: type unit dwo supportDavid Blaikie2014-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198850 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify/collapse/denest a conditions/blocks.David Blaikie2014-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198813 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: reorder dwo sections to immediately proceed their non-dwo ↵David Blaikie2014-01-08
| | | | | | | | | equivalents This makes it easier to write a test that's mostly shared between fission and non-fission (using FileCheck's multiple prefix support). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198806 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-07
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198685 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-13
| | | | | | | | | | | | | | | | | | | | | | | | 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/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197275 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "DebugInfo: Move type units into the debug_types section with ↵David Blaikie2013-12-13
| | | | | | | | appropriate comdat grouping and type unit headers" This reverts commit r197210. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197211 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-13
| | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197210 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Avoid emitting pubtype entries for type DIEs that just indirect ↵David Blaikie2013-11-26
| | | | | | to a type unit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195698 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Make pubnames header printing similar to unit header printingDavid Blaikie2013-11-01
| | | | | | | | | | | | | | | 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". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193872 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARFDebugArangeSet: remove dead codeAlexey Samsonov2013-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193785 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARFUnit: kill dead code and make a couple of functions private. No ↵Alexey Samsonov2013-10-31
| | | | | | functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193780 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARFAbbreviationDeclaration: remove dead code, refactor parsing code and ↵Alexey Samsonov2013-10-31
| | | | | | make it more robust. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193770 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF parser: propery handle DW_FORM_ref_sig8 and fix Windows build.Alexey Samsonov2013-10-29
| | | | | | | Based on D2050 by Timur Iskhodzhanov. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193619 91177308-0d34-0410-b5e6-96231b3b80d8
* Quick-fix DebugInfo build on WindowsTimur Iskhodzhanov2013-10-29
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193604 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up.Richard Smith2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193576 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARFFormValue.cpp: Appease gcc to give explicit constructors.NAKAMURA Takumi2013-10-29
| | | | | | error: conversion from `const uint8_t*' to non-scalar type `llvm::ArrayRef<unsigned char>' requested git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193575 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge DWARFDIE::extractFast and DWARFDIE::extract into one function.Alexey Samsonov2013-10-28
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193563 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF parser: Use ArrayRef to represent form sizes and simplify ↵Alexey Samsonov2013-10-28
| | | | | | DWARFDIE::extractFast() interface. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193560 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF parser: since DWARF4, DW_AT_high_pc may be a constant representing ↵Alexey Samsonov2013-10-28
| | | | | | function size git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193555 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Introduce the notion of "form classes"Alexey Samsonov2013-10-28
| | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193553 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct log message typo: ended ad -> ended atEd Maste2013-10-18
| | | | | | | (From LLDB r192897) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192968 91177308-0d34-0410-b5e6-96231b3b80d8
* [DebugInfo] Remove unneeded struct member and hide struct definition. No ↵Alexey Samsonov2013-10-18
| | | | | | functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192954 91177308-0d34-0410-b5e6-96231b3b80d8
* [DebugInfo] Remove dead code.Alexey Samsonov2013-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192952 91177308-0d34-0410-b5e6-96231b3b80d8
* [DebugInfo] Delete dead code, simplify and fix code style for some existing ↵Alexey Samsonov2013-10-17
| | | | | | code. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192894 91177308-0d34-0410-b5e6-96231b3b80d8
* [DebugInfo] Further simplify DWARFDebugAranges public interfaceAlexey Samsonov2013-10-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191813 91177308-0d34-0410-b5e6-96231b3b80d8
* [DebugInfo] Simplify and speedup .debug_aranges parsingAlexey Samsonov2013-10-01
| | | | | | | | | | | | Parsing .debug_aranges section now takes O(nlogn) operations instead of O(n^2), where "n" is the number of address ranges. With this change, the time required to symbolize an address from a random large Clang-generated binary drops from 165 seconds to 1.5 seconds. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191781 91177308-0d34-0410-b5e6-96231b3b80d8
* [DebugInfo] Further simplify DWARFDebugAranges. No functionality change.Alexey Samsonov2013-10-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191779 91177308-0d34-0410-b5e6-96231b3b80d8
* [DebugInfo] Remove unused functions from DWARFDebugAranges and fix code style.Alexey Samsonov2013-10-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191778 91177308-0d34-0410-b5e6-96231b3b80d8
* Deallocate type units when destroying a DWARFContext.Benjamin Kramer2013-09-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191637 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework conditional for printing out pub sections.Eric Christopher2013-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191571 91177308-0d34-0410-b5e6-96231b3b80d8
* Dump the normal dwarf pubtypes section as well.Eric Christopher2013-09-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191408 91177308-0d34-0410-b5e6-96231b3b80d8
* Unify pubsection/gnu pubsection printing.Eric Christopher2013-09-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191407 91177308-0d34-0410-b5e6-96231b3b80d8
* Slight formatting change for pubnames/pubtypes output.Eric Christopher2013-09-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191401 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: add missing opening quotation mark lost in r191330David Blaikie2013-09-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191333 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: re-add field formatting for the entry kind lost in r191329David Blaikie2013-09-24
| | | | | | CR feedback from Eric Christopher git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191330 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump support for gnu_pubtypesDavid Blaikie2013-09-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191329 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARFTypeUnit::dump(): Use PRIx64 to format uint64_t.NAKAMURA Takumi2013-09-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191266 91177308-0d34-0410-b5e6-96231b3b80d8
* Format the index entry kind string to align.Eric Christopher2013-09-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191255 91177308-0d34-0410-b5e6-96231b3b80d8
* Comments for r191234 as suggested by Eric Christopher.David Blaikie2013-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191244 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak the build (from r191233)since we're calling printf.David Blaikie2013-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191238 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump/libDebugInfo support for type unitsDavid Blaikie2013-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191234 91177308-0d34-0410-b5e6-96231b3b80d8
* Exract most of DWARFCompileUnit into a new DWARFUnit to prepare for the ↵David Blaikie2013-09-23
| | | | | | coming DWARFTypeUnit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191233 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Wrap section data and relocs together for dwarf dumping supportDavid Blaikie2013-09-23
| | | | | | | | | | | | | | | | | | This is a small step that may enable some simplifications in producer (DWARFContext) and consumer (DWARFCompileUnit and other places) by making a more complete abstraction around the data and relocations for a section. Small initial steps could include simple changes such as passing the pair to DWARFCompileUnit's ctor rather than passing the data and relocs separately. I don't intend to pursue any such changes immediately, however. The motivation for doing this now is that type unit dumping will need to deal with these data+reloc pairs moreso than the existing dumping support has needed to associate the data as type unit sections are named the same (debug_types) and comdat group folded. So to implement dumping and reloc handling we'll need a mapping of section->data+relocs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191209 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead codeDavid Blaikie2013-09-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191179 91177308-0d34-0410-b5e6-96231b3b80d8
* StringRef-ize some thingsDavid Blaikie2013-09-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191178 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r191062; the build break was also fixed in a different (incompatible) ↵Richard Smith2013-09-20
| | | | | | way in r191060. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191065 91177308-0d34-0410-b5e6-96231b3b80d8