summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARFContext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* llvm-dwarfdump: type unit dwo supportDavid Blaikie2014-01-091-3/+36
| | | | 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-071-1/+1
| | | | | | | | | | 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-131-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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-131-2/+4
| | | | | | | | 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-131-4/+2
| | | | | | | | | | | | | | | | | | 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
* DebugInfo: Introduce the notion of "form classes"Alexey Samsonov2013-10-281-4/+4
| | | | | | | | | | | | | | | | | | 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] Further simplify DWARFDebugAranges public interfaceAlexey Samsonov2013-10-021-6/+0
| | | | llvm-svn: 191813
* Deallocate type units when destroying a DWARFContext.Benjamin Kramer2013-09-291-0/+1
| | | | llvm-svn: 191637
* Rework conditional for printing out pub sections.Eric Christopher2013-09-271-7/+5
| | | | llvm-svn: 191571
* Dump the normal dwarf pubtypes section as well.Eric Christopher2013-09-251-20/+26
| | | | llvm-svn: 191408
* Unify pubsection/gnu pubsection printing.Eric Christopher2013-09-251-26/+21
| | | | llvm-svn: 191407
* Slight formatting change for pubnames/pubtypes output.Eric Christopher2013-09-251-3/+3
| | | | llvm-svn: 191401
* llvm-dwarfdump: add missing opening quotation mark lost in r191330David Blaikie2013-09-241-1/+1
| | | | llvm-svn: 191333
* llvm-dwarfdump: re-add field formatting for the entry kind lost in r191329David Blaikie2013-09-241-1/+1
| | | | | | CR feedback from Eric Christopher llvm-svn: 191330
* llvm-dwarfdump support for gnu_pubtypesDavid Blaikie2013-09-241-20/+30
| | | | llvm-svn: 191329
* Format the index entry kind string to align.Eric Christopher2013-09-241-3/+3
| | | | llvm-svn: 191255
* Comments for r191234 as suggested by Eric Christopher.David Blaikie2013-09-231-0/+4
| | | | llvm-svn: 191244
* llvm-dwarfdump/libDebugInfo support for type unitsDavid Blaikie2013-09-231-3/+36
| | | | llvm-svn: 191234
* Exract most of DWARFCompileUnit into a new DWARFUnit to prepare for the ↵David Blaikie2013-09-231-6/+6
| | | | | | coming DWARFTypeUnit. llvm-svn: 191233
* DebugInfo: Wrap section data and relocs together for dwarf dumping supportDavid Blaikie2013-09-231-22/+22
| | | | | | | | | | | | | | | | | | 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. llvm-svn: 191209
* StringRef-ize some thingsDavid Blaikie2013-09-221-8/+4
| | | | llvm-svn: 191178
* Revert r191062; the build break was also fixed in a different (incompatible) ↵Richard Smith2013-09-201-3/+2
| | | | | | way in r191060. llvm-svn: 191065
* Unbreak Clang build after r191050: don't pass a StringRef to snprintf.Richard Smith2013-09-201-2/+3
| | | | llvm-svn: 191062
* DebugInfo: constrain gnu pubnames test furtherDavid Blaikie2013-09-191-2/+2
| | | | | | | | | | Ensures that the pubnames entries actually refer to the intended entities. This test could be more flexible if there was a way to do multiline FileCheck matches with captures (in that way the test wouldn't need to have hardcoded offset values and would thus be resilient to changes in the layout of the DIEs in this CU). llvm-svn: 191055
* DebugInfo: llvm-dwarfdump support for gnu_pubnames sectionDavid Blaikie2013-09-191-0/+22
| | | | llvm-svn: 191050
* Make DWARFCompileUnit non-copyableAlexey Samsonov2013-08-231-33/+32
| | | | | | | | | | | | | | | | | Summary: This is a part of D1164. DWARFCompileUnit is not that lightweight to copy it around, and we want it to own corresponding .dwo compile unit eventually. Reviewers: echristo Reviewed By: echristo CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1298 llvm-svn: 189089
* Store compile unit corresponding to each chain of inlined debug info ↵Alexey Samsonov2013-08-061-17/+18
| | | | | | entries. No functionality change. llvm-svn: 187792
* llvm-dwarfdump: Add support for dumping the .debug_loc sectionDavid Blaikie2013-06-191-0/+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. llvm-svn: 184361
* Handle relocations that don't point to symbols.Rafael Espindola2013-06-051-3/+2
| | | | | | | | In ELF (as in MachO), not all relocations point to symbols. Represent this properly by using a symbol_iterator instead of a SymbolRef. Update llvm-readobj ELF's dumper to handle relocatios without symbols. llvm-svn: 183284
* Change how we iterate over relocations on ELF.Rafael Espindola2013-05-301-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | For COFF and MachO, sections semantically have relocations that apply to them. That is not the case on ELF. In relocatable objects (.o), a section with relocations in ELF has offsets to another section where the relocations should be applied. In dynamic objects and executables, relocations don't have an offset, they have a virtual address. The section sh_info may or may not point to another section, but that is not actually used for resolving the relocations. This patch exposes that in the ObjectFile API. It has the following advantages: * Most (all?) clients can handle this more efficiently. They will normally walk all relocations, so doing an effort to iterate in a particular order doesn't save time. * llvm-readobj now prints relocations in the same way the native readelf does. * probably most important, relocations that don't point to any section are now visible. This is the case of relocations in the rela.dyn section. See the updated relocation-executable.test for example. llvm-svn: 182908
* Hoist boundary condition out of loop header.Eric Christopher2013-05-061-1/+2
| | | | llvm-svn: 181248
* Untabify.Eric Christopher2013-05-061-5/+5
| | | | llvm-svn: 181247
* Don't emit .dwo sections unless they exist.Eric Christopher2013-05-061-24/+30
| | | | llvm-svn: 181224
* Clarify getRelocationAddress x getRelocationOffset a bit.Rafael Espindola2013-04-251-1/+1
| | | | | | | | | | getRelocationAddress is for dynamic libraries and executables, getRelocationOffset for relocatable objects. Mark the getRelocationAddress of COFF and MachO as not implemented yet. Add a test of ELF's. llvm-readobj -r now prints the same values as readelf -r. llvm-svn: 180259
* Use zlib to uncompress debug sections in DWARF parser.Alexey Samsonov2013-04-231-0/+38
| | | | | | | This makes llvm-dwarfdump and llvm-symbolizer understand debug info sections compressed by ld.gold linker. llvm-svn: 180088
* Use StringSwitch instead of long chain of if-else. No functionality change.Alexey Samsonov2013-04-171-37/+28
| | | | llvm-svn: 179682
* Add support for the pubnames section to llvm-dwarfdump.Krzysztof Parzyszek2013-02-121-0/+20
| | | | llvm-svn: 174976
* Initial support for DWARF CFI parsing and dumping in LLVMEli Bendersky2013-02-051-1/+29
| | | | llvm-svn: 174463
* Add DIContext::getLineInfoForAddressRange() function and test. This ↵Andrew Kaylor2013-01-261-0/+58
| | | | | | function allows a caller to obtain a table of line information for a function using the function's address and size. llvm-svn: 173537
* Add support for applying in-memory relocations to the .debug_line section ↵Andrew Kaylor2013-01-251-4/+14
| | | | | | and, in the case of ELF files, using symbol addresses when available for relocations to the .debug_info section. Also extending the llvm-rtdyld tool to add the ability to dump line number information for testing purposes. llvm-svn: 173517
* Add command-line flags for DWARF dumping.Eli Bendersky2013-01-251-62/+82
| | | | | | | Flags for dumping specific DWARF sections added in lib/DebugInfo and llvm-dwarfdump. llvm-svn: 173480
* Split address information for DWARF5 split dwarf proposal. This involvesEric Christopher2013-01-151-1/+13
| | | | | | | | | | | | | | | 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
* [Object, DebugInfo] Make DWARFContext BE-aware.NAKAMURA Takumi2013-01-091-1/+1
| | | | | | test/DebugInfo/member-pointers.ll would not fail in targetting BE any more. llvm-svn: 171943
* Add support for separating strings for the split debug info DWARF5Eric Christopher2013-01-071-1/+5
| | | | | | | | | | | | | 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-7/+70
| | | | | | | | | | | | 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
* Don't skip __DWARF,Rafael Espindola2012-12-211-2/+0
| | | | | | | Now that we don't merge section and segment names, we don't need to skip the segment name to get to the section name. llvm-svn: 170839
OpenPOWER on IntegriCloud