summaryrefslogtreecommitdiff
path: root/lib/DebugInfo/DWARFFormValue.cpp
Commit message (Collapse)AuthorAge
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-15
| | | | | | instead of comparing to nullptr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206252 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
* 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
* 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
* [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
* 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
* Remove dead codeDavid Blaikie2013-09-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191179 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for DebugFission to DWARF parserAlexey Samsonov2013-08-27
| | | | | | | | | | | | | | | | | | | Summary: 1) Make llvm-symbolizer properly symbolize files with split debug info (by using stanalone .dwo files). 2) Make DWARFCompileUnit parse and store corresponding .dwo file, if necessary. 3) Make bits of DWARF parsing more CompileUnit-oriented. Reviewers: echristo Reviewed By: echristo CC: bkramer, llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1164 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189329 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: Add support for dumping the .debug_loc sectionDavid Blaikie2013-06-19
| | | | | | | | | This is a basic implementation - we still don't have any support (that I know of) for dumping DWARF expressions in a meaningful way, so the location information itself is just printed as a sequence of bytes as we do elsewhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184361 91177308-0d34-0410-b5e6-96231b3b80d8
* Reformat comments here.Eric Christopher2013-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182901 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove variable store that is never read.Eric Christopher2013-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180013 91177308-0d34-0410-b5e6-96231b3b80d8
* Create a stub for DWARF parser unittestsAlexey Samsonov2013-04-17
| | | | | | | | Moves one DWARF-specific header to include/llvm/DebugInfo from lib/. Add a short unittest for r179095. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179678 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the C function to create a SLPVectorizerPass to something sane and ↵Benjamin Kramer2013-04-11
| | | | | | expose it in the header file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179272 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF parser: Fix DWARF-2/3 incompatibility: size of DW_FORM_ref_addr is the ↵Alexey Samsonov2013-04-09
| | | | | | same as DW_FORM_addr in DWARF2, and is 4/8 bytes on 32/64-bit DWARF starting from DWARF3. Adding a test for this is a huge pain - generating and uploading pre-built binary with DWARF3 debug info is way too ugly, and writing fine-grained unittests for DebugInfo is impossible, as it doesn't expose any headers in include/llvm. That said, I'm going to choose the second approach and submit the patch exposing DebugInfo headers for review soon enough. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179095 91177308-0d34-0410-b5e6-96231b3b80d8
* DW_FORM_sec_offset should be a relocation on platforms that useEric Christopher2013-04-07
| | | | | | | | | a relocation across sections. Do this for DW_AT_stmt list in the skeleton CU and check the relocations in the debug_info section. Add a FIXME for multiple CUs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178969 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the assembly and dissassembly of DW_FORM_sec_offset. Found this byEric Christopher2013-01-17
| | | | | | | | | changing both the string of the dwo_name to be correct and the type of the statement list. Testcases all around. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172699 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the DW_AT_GNU_addr_base for the skeleton cu. Add support forEric Christopher2013-01-17
| | | | | | | emitting the dwarf32 version of DW_FORM_sec_offset and correct disassembler support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172698 91177308-0d34-0410-b5e6-96231b3b80d8
* Split address information for DWARF5 split dwarf proposal. This involvesEric Christopher2013-01-15
| | | | | | | | | | | | | | | using the DW_FORM_GNU_addr_index and a separate .debug_addr section which stays in the executable and is fully linked. Sneak in two other small changes: a) Print out the debug_str_offsets.dwo section. b) Change form we're expecting the entries in the debug_str_offsets.dwo section to take from ULEB128 to U32. Add tests for all of this in the fission-cu.ll test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172578 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace and 80-col.Eric Christopher2013-01-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171804 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for separating strings for the split debug info DWARF5Eric Christopher2013-01-07
| | | | | | | | | | | | | proposal. This leaves the strings in the skeleton die as strp, but in all dwo files they're accessed now via DW_FORM_GNU_str_index. Add support for dumping these sections and modify the fission-cu.ll testcase to have the correct strings and form. Fix a small bug in the fixed form sizes routine that involved out of array accesses for the table and add a FIXME in the extractFast routine to fix this up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171779 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend the dumping infrastructure to deal with additionalEric Christopher2013-01-02
| | | | | | | | | | | | sections for debug info. These are some of the dwo sections from the DWARF5 split debug info proposal. Update the fission-cu.ll testcase to show what we should be able to dump more of now. Work in progress: Ultimately the relocations will be gone for the dwo section and the strings will be a different form (as well as the rest of the sections will be included). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171428 91177308-0d34-0410-b5e6-96231b3b80d8
* Right now all of the relocations are 32-bit dwarf, and the relocationEric Christopher2012-12-27
| | | | | | | | information doesn't return an addend for Rel relocations. Go ahead and use this information to fix relocation handling inside dwarfdump for 32-bit ELF REL. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171126 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some basic support for the fission addr forms to DebugInfo.Eric Christopher2012-11-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168223 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite DIContext interface to take an object. Update all callers.Eric Christopher2012-11-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167757 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixup for r167558: Store raw pointer (instead of reference) to RelocMap in ↵Alexey Samsonov2012-11-12
| | | | | | DIContext. This is needed to prevent crashes because of dangling reference if the clients don't provide RelocMap to DIContext constructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167728 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a relocation visitor to lib object. This works via caching relocatedEric Christopher2012-11-07
| | | | | | | values in a map that can be passed to consumers. Add a testcase that ensures this works for llvm-dwarfdump. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167558 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop casting away const qualifier needlessly.Roman Divacky2012-09-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163258 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for some missing DW_FORM_*.Eric Christopher2012-08-24
| | | | | | TODO: Fix code duplication and coding style. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162525 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a C++11 UDL conflict.Benjamin Kramer2012-04-04
| | | | | | Still not fixed in the standard ;) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154044 91177308-0d34-0410-b5e6-96231b3b80d8
* Audited all the format strings in libDebugInfo and fixed those that didn't ↵Benjamin Kramer2011-11-05
| | | | | | match the types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143814 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more PRI.64 macros for MSVC and use them throughout the codebase.Benjamin Kramer2011-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143799 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF: wire up .debug_str dumping.Benjamin Kramer2011-09-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139799 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF: Fix indentation.Benjamin Kramer2011-09-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139774 91177308-0d34-0410-b5e6-96231b3b80d8
* Style & indentation tweaks.Benjamin Kramer2011-09-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139646 91177308-0d34-0410-b5e6-96231b3b80d8
* Sketch out a DWARF parser.Benjamin Kramer2011-09-13
This introduces a new library to LLVM: libDebugInfo. It will provide debug information parsing to LLVM. Much of the design and some of the code is taken from the LLDB project. It also contains an llvm-dwarfdump tool that can dump the abbrevs and DIEs from an object file. It can be used to write tests for DWARF input and output easily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139627 91177308-0d34-0410-b5e6-96231b3b80d8