summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARFFormValue.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move DebugInfo to DebugInfo/DWARF.Zachary Turner2015-01-301-565/+0
| | | | | | | | | | | | | 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-141-1/+1
| | | | | | | | | | | 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-061-8/+16
| | | | | | | | | | 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-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
* 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
* Fix build faliure introduced by r217129.Frederic Riss2014-09-041-2/+2
| | | | | | Looks like one can't put 'const uint8_t' as ArrayRef contained type. It fails to build with libstdc++. llvm-svn: 217132
* Add DWARFFormValue::getAsBlock() and add FC_Flag as an acceptable class for ↵Frederic Riss2014-09-041-1/+9
| | | | | | | | an unsigned constant. To be used in further patches that improve the dumpers. llvm-svn: 217129
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-151-5/+5
| | | | | | instead of comparing to nullptr. llvm-svn: 206252
* 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
* DWARF parser: Use ArrayRef to represent form sizes and simplify ↵Alexey Samsonov2013-10-281-3/+3
| | | | | | DWARFDIE::extractFast() interface. No functionality change. llvm-svn: 193560
* DebugInfo: Introduce the notion of "form classes"Alexey Samsonov2013-10-281-34/+103
| | | | | | | | | | | | | | | | | | 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
* [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
* Exract most of DWARFCompileUnit into a new DWARFUnit to prepare for the ↵David Blaikie2013-09-231-11/+8
| | | | | | coming DWARFTypeUnit. llvm-svn: 191233
* Remove dead codeDavid Blaikie2013-09-221-17/+0
| | | | llvm-svn: 191179
* Add support for DebugFission to DWARF parserAlexey Samsonov2013-08-271-32/+29
| | | | | | | | | | | | | | | | | | | 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 llvm-svn: 189329
* llvm-dwarfdump: Add support for dumping the .debug_loc sectionDavid Blaikie2013-06-191-1/+5
| | | | | | | | | 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. llvm-svn: 184361
* Reformat comments here.Eric Christopher2013-05-301-26/+26
| | | | llvm-svn: 182901
* Remove variable store that is never read.Eric Christopher2013-04-221-1/+0
| | | | llvm-svn: 180013
* Create a stub for DWARF parser unittestsAlexey Samsonov2013-04-171-1/+1
| | | | | | | Moves one DWARF-specific header to include/llvm/DebugInfo from lib/. Add a short unittest for r179095. llvm-svn: 179678
* Rename the C function to create a SLPVectorizerPass to something sane and ↵Benjamin Kramer2013-04-111-2/+3
| | | | | | expose it in the header file. llvm-svn: 179272
* DWARF parser: Fix DWARF-2/3 incompatibility: size of DW_FORM_ref_addr is the ↵Alexey Samsonov2013-04-091-43/+33
| | | | | | 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. llvm-svn: 179095
* DW_FORM_sec_offset should be a relocation on platforms that useEric Christopher2013-04-071-2/+9
| | | | | | | | | 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. llvm-svn: 178969
* Fix the assembly and dissassembly of DW_FORM_sec_offset. Found this byEric Christopher2013-01-171-10/+5
| | | | | | | | | changing both the string of the dwo_name to be correct and the type of the statement list. Testcases all around. llvm-svn: 172699
* Add the DW_AT_GNU_addr_base for the skeleton cu. Add support forEric Christopher2013-01-171-4/+2
| | | | | | | emitting the dwarf32 version of DW_FORM_sec_offset and correct disassembler support. llvm-svn: 172698
* Split address information for DWARF5 split dwarf proposal. This involvesEric Christopher2013-01-151-1/+20
| | | | | | | | | | | | | | | 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. llvm-svn: 172578
* Whitespace and 80-col.Eric Christopher2013-01-071-3/+3
| | | | llvm-svn: 171804
* Add support for separating strings for the split debug info DWARF5Eric Christopher2013-01-071-4/+24
| | | | | | | | | | | | | 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. llvm-svn: 171779
* Extend the dumping infrastructure to deal with additionalEric Christopher2013-01-021-5/+5
| | | | | | | | | | | | 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). llvm-svn: 171428
* Right now all of the relocations are 32-bit dwarf, and the relocationEric Christopher2012-12-271-4/+3
| | | | | | | | 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. llvm-svn: 171126
* Add some basic support for the fission addr forms to DebugInfo.Eric Christopher2012-11-161-0/+10
| | | | llvm-svn: 168223
* Rewrite DIContext interface to take an object. Update all callers.Eric Christopher2012-11-121-22/+14
| | | | llvm-svn: 167757
* Fixup for r167558: Store raw pointer (instead of reference) to RelocMap in ↵Alexey Samsonov2012-11-121-15/+23
| | | | | | DIContext. This is needed to prevent crashes because of dangling reference if the clients don't provide RelocMap to DIContext constructor. llvm-svn: 167728
* Add a relocation visitor to lib object. This works via caching relocatedEric Christopher2012-11-071-4/+21
| | | | | | | values in a map that can be passed to consumers. Add a testcase that ensures this works for llvm-dwarfdump. llvm-svn: 167558
* Stop casting away const qualifier needlessly.Roman Divacky2012-09-051-1/+1
| | | | llvm-svn: 163258
* Add support for some missing DW_FORM_*.Eric Christopher2012-08-241-0/+49
| | | | | TODO: Fix code duplication and coding style. llvm-svn: 162525
* Fix a C++11 UDL conflict.Benjamin Kramer2012-04-041-1/+1
| | | | | | Still not fixed in the standard ;) llvm-svn: 154044
* Audited all the format strings in libDebugInfo and fixed those that didn't ↵Benjamin Kramer2011-11-051-7/+7
| | | | | | match the types. llvm-svn: 143814
* Add more PRI.64 macros for MSVC and use them throughout the codebase.Benjamin Kramer2011-11-051-3/+3
| | | | llvm-svn: 143799
* DWARF: wire up .debug_str dumping.Benjamin Kramer2011-09-151-13/+11
| | | | llvm-svn: 139799
* DWARF: Fix indentation.Benjamin Kramer2011-09-151-80/+80
| | | | llvm-svn: 139774
* Style & indentation tweaks.Benjamin Kramer2011-09-131-175/+170
| | | | llvm-svn: 139646
* Sketch out a DWARF parser.Benjamin Kramer2011-09-131-0/+434
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. llvm-svn: 139627
OpenPOWER on IntegriCloud