summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARFContext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [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
* The section is .debug_line.Eric Christopher2012-11-271-1/+1
| | | | llvm-svn: 168666
* [DebugInfo] Generate address ranges for compile units even if .debug_aranges ↵Alexey Samsonov2012-11-161-2/+4
| | | | | | is present: it is often the case that .debug_aranges section contains ranges only for a small subset of compile units. Test cases will be added in separate commits. llvm-svn: 168144
* Rewrite DIContext interface to take an object. Update all callers.Eric Christopher2012-11-121-0/+80
| | | | llvm-svn: 167757
* Use a typedef to reduce some typing and reformat code accordingly.Eric Christopher2012-10-161-12/+17
| | | | llvm-svn: 166077
* Variable name cleanup.Eric Christopher2012-10-161-4/+4
| | | | llvm-svn: 166076
* Add support for fetching inlining context (stack of source code locations)Alexey Samsonov2012-09-041-14/+73
| | | | | | | | | | | by instruction address from DWARF. Add --inlining flag to llvm-dwarfdump to demonstrate and test this functionality, so that "llvm-dwarfdump --inlining --address=0x..." now works much like "addr2line -i 0x...", provided that the binary has debug info (Clang's -gline-tables-only *is* enough). llvm-svn: 163128
* Refactor fetching file/line info from DWARFContext to simplify theAlexey Samsonov2012-08-301-57/+75
| | | | | | | | code and allow better code reuse. Make the code a bit more conforming to LLVM code style. No functionality change. llvm-svn: 162895
* Add basic support for .debug_ranges section to LLVM's DebugInfo library.Alexey Samsonov2012-08-271-1/+15
| | | | | | | | | | | This section (introduced in DWARF-3) is used to define instruction address ranges for functions that are not contiguous and can't be described by low_pc/high_pc attributes (this is the usual case for inlined subroutines). The patch is the first step to support fetching complete inlining info from DWARF. Reviewed by Benjamin Kramer. llvm-svn: 162657
* Fix the representation of debug line table in DebugInfo LLVM library,Alexey Samsonov2012-08-071-3/+1
| | | | | | | | | | | | | and "instruction address -> file/line" lookup. Instead of plain collection of rows, debug line table for compilation unit is now treated as the number of row ranges, describing sequences (series of contiguous machine instructions). The sequences are not always listed in the order of increasing address, so previously used std::lower_bound() sometimes produced wrong results. Now the instruction address lookup consists of two stages: finding the correct sequence, and searching for address in range of rows for this sequence. llvm-svn: 161414
* DebugInfo library: add support for fetching absolute paths to source filesAlexey Samsonov2012-07-191-3/+27
| | | | | | | | (instead of basenames) from DWARF. Use this behavior in llvm-dwarfdump tool. Reviewed by Benjamin Kramer. llvm-svn: 160496
OpenPOWER on IntegriCloud