summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
Commit message (Collapse)AuthorAgeFilesLines
* Spell correct (s/begining/beginning/)David Blaikie2013-06-191-3/+3
| | | | llvm-svn: 184362
* llvm-dwarfdump: Add support for dumping the .debug_loc sectionDavid Blaikie2013-06-196-1/+170
| | | | | | | | | 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
* Reformat comments here.Eric Christopher2013-05-301-26/+26
| | | | llvm-svn: 182901
* libDebugInfo depends on libObject nowadays.Benjamin Kramer2013-05-091-1/+1
| | | | llvm-svn: 181510
* 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-232-0/+41
| | | | | | | This makes llvm-dwarfdump and llvm-symbolizer understand debug info sections compressed by ld.gold linker. llvm-svn: 180088
* Remove variable store that is never read.Eric Christopher2013-04-221-1/+0
| | | | llvm-svn: 180013
* Use StringSwitch instead of long chain of if-else. No functionality change.Alexey Samsonov2013-04-171-37/+28
| | | | llvm-svn: 179682
* Create a stub for DWARF parser unittestsAlexey Samsonov2013-04-174-85/+3
| | | | | | | 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-093-45/+35
| | | | | | 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
* DWARF parser: remove duplicated code and fix code style in DIE extractors.Alexey Samsonov2013-04-082-268/+81
| | | | llvm-svn: 179023
* 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 missing std::. Not sure how this compiles for anyone else.Matt Arsenault2013-03-211-1/+1
| | | | llvm-svn: 177620
* xlC doesn't like Header being both a type and a member variable. Rename theRafael Espindola2013-03-202-20/+20
| | | | | | | | member variable. Patch by Kai <kai@redstar.de> llvm-svn: 177575
* Code cleanup: pass Offset by pointer to parseInstruction to more explicitlyEli Bendersky2013-02-221-29/+33
| | | | | | | convey that it's a INOUT argument. Also, if parsing of entry instructions fails, don't push the entry. llvm-svn: 175847
* Previously, parsing capability of the .debug_frame section was addedEli Bendersky2013-02-211-6/+170
| | | | | | | | | | | | | | | | to lib/DebugInfo, with dumping in llvm-dwarfdump. This patch adds initial ability to parse and dump CFA instructions contained in entries. To keep it manageable, the patch omits some more advanced capabilities (accounted in TODOs): * Parsing of instructions with BLOCK arguments (expression lists) * Dumping of actual instruction arguments (currently only names are dumped). This is quite tricky since the dumper has to effectively "interpret" the instructions. llvm-svn: 175820
* Make helpers static. Add missing include so LLVMInitializeObjCARCOpts gets C ↵Benjamin Kramer2013-02-151-1/+2
| | | | | | linkage. llvm-svn: 175264
* Add support for the pubnames section to llvm-dwarfdump.Krzysztof Parzyszek2013-02-122-0/+23
| | | | llvm-svn: 174976
* The patch to fix some issues in r174543 fixed the lines failing the test, ↵David Tweed2013-02-081-3/+3
| | | | | | | | | but missed a couple of lines which weren't being explicitly looked at and were printing incorrect results. These values clearly must lie within 32 bits, so the casts are definitely safe. llvm-svn: 174717
* FDE::dumpHeader(): Forgot to fix one more formatting, ... take two!NAKAMURA Takumi2013-02-071-2/+2
| | | | | | Excuse me, I could not test it locally. llvm-svn: 174614
* FDE::dumpHeader(): Forgot to fix one more formatting. It affected bigendian ↵NAKAMURA Takumi2013-02-071-2/+3
| | | | | | hosts. llvm-svn: 174602
* DWARFDebugFrame.cpp: Fix formatting on i686 hosts.NAKAMURA Takumi2013-02-071-3/+6
| | | | | FIXME: Are they really truncated to i32 from i64 unconditionally? llvm-svn: 174574
* Add some comments to new frame entriesEli Bendersky2013-02-061-0/+4
| | | | llvm-svn: 174515
* Failing builds because a private class member is not being used afterEli Bendersky2013-02-061-0/+3
| | | | | | initialization is one of the reasons I consider -werror to be shoddy. llvm-svn: 174485
* Add virtual desctructor to FrameEntry to avoid error on delete-non-virtual-dtorEli Bendersky2013-02-061-0/+9
| | | | llvm-svn: 174483
* Fix some formatting & add comments, following Eric's reviewEli Bendersky2013-02-061-12/+19
| | | | llvm-svn: 174473
* Add missing file to CMake listEli Bendersky2013-02-051-0/+1
| | | | llvm-svn: 174465
* Initial support for DWARF CFI parsing and dumping in LLVMEli Bendersky2013-02-054-1/+281
| | | | llvm-svn: 174463
* DWARFDebugLine.cpp: Fix true path. Did you forget "return true" here?NAKAMURA Takumi2013-01-261-0/+2
| | | | llvm-svn: 173552
* Add DIContext::getLineInfoForAddressRange() function and test. This ↵Andrew Kaylor2013-01-264-0/+139
| | | | | | function allows a caller to obtain a table of line information for a function using the function's address and size. llvm-svn: 173537
* Fix a warning in the new DWARFheader. Add a new line at the end of the file.Nadav Rotem2013-01-251-1/+2
| | | | llvm-svn: 173518
* Add support for applying in-memory relocations to the .debug_line section ↵Andrew Kaylor2013-01-256-8/+55
| | | | | | 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-252-63/+83
| | | | | | | Flags for dumping specific DWARF sections added in lib/DebugInfo and llvm-dwarfdump. llvm-svn: 173480
* Fix the assembly and dissassembly of DW_FORM_sec_offset. Found this byEric Christopher2013-01-172-18/+9
| | | | | | | | | 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-155-4/+44
| | | | | | | | | | | | | | | 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
* Whitespace and 80-col.Eric Christopher2013-01-072-4/+6
| | | | llvm-svn: 171804
* Add support for separating strings for the split debug info DWARF5Eric Christopher2013-01-076-9/+53
| | | | | | | | | | | | | 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
* Update comment.Eric Christopher2013-01-071-1/+1
| | | | llvm-svn: 171689
* Add a space to the end of the line so we don't get "itsbounds" in output.Eric Christopher2013-01-041-1/+1
| | | | llvm-svn: 171487
* Extend the dumping infrastructure to deal with additionalEric Christopher2013-01-026-29/+148
| | | | | | | | | | | | 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
* 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