summaryrefslogtreecommitdiff
path: root/test/DebugInfo
Commit message (Collapse)AuthorAge
* [llvm-symbolizer] Print file/line for a PC even if there is no DIE ↵Alexey Samsonov2014-04-18
| | | | | | | | | | | | describing it. This is important for symbolizing executables with debug info in unavailable .dwo files. Even if all DIE entries are missing, we can still symbolize an address: function name can be fetched from symbol table, and file/line info can be fetched from line table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206665 91177308-0d34-0410-b5e6-96231b3b80d8
* Change argument order and add explanatory comment to r206130David Blaikie2014-04-14
| | | | | | Changes requested in code review by Eric Christopher of r206130. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206219 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply r206096 after investigating the gdb buildbot failure.Adrian Prantl2014-04-14
| | | | | | | | | | | | | | | Thanks to dblaikie for updating the testcase! Debug info: (bugfix) C++ C/Dtors can be compiled to multiple functions, therefore, their declaration cannot have one DW_AT_linkage_name. The specific instances however can and should have that attribute. This patch reorders the code in DwarfUnit::getOrCreateSubprogramDIE() to emit linkage names for C/Dtors. rdar://problem/16362674. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206210 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix instruction debug info location during legalizationDavid Blaikie2014-04-13
| | | | | | | | | | | | I found this from a particular GDB test suite case of inlining (something similar is provided as a test case) but came across a few other related cases (other callers of the same functions, and one other instance of the same coding mistake in a separate function). I'm not sure what the best way to test this is (let alone to cover the other cases I discovered), so hopefully this sufficies - open to ideas. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206130 91177308-0d34-0410-b5e6-96231b3b80d8
* PR13337: Omit DW_TAG_restrict_type when compiling for DWARF2David Blaikie2014-04-12
| | | | | | | DWARF3 introduced DW_TAG_restrict_type, so avoid using it in prior versions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206105 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Debug info: (bugfix) C++ C/Dtors can be compiled to multiple functions,"Adrian Prantl2014-04-12
| | | | | | | This reverts commit 206096 while I investigate why this broke the gdb buildbot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206103 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info: (bugfix) C++ C/Dtors can be compiled to multiple functions,Adrian Prantl2014-04-12
| | | | | | | | | | | | therefore, their declaration cannot have one DW_AT_linkage_name. The specific instances however can and should have that attribute. This patch reorders the code in DwarfUnit::getOrCreateSubprogramDIE() to emit linkage names for C/Dtors. rdar://problem/16362674. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206096 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some CHECKs to this testcase.Adrian Prantl2014-04-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206046 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info: Store the DIVariable in DebugLocEntry also for constants,Adrian Prantl2014-04-11
| | | | | | | | so DwarfDebug::emitDebugLocEntry can emit them with the correct signedness. rdar://problem/15928306 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206042 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some doc and comment typosAlp Toker2014-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205899 91177308-0d34-0410-b5e6-96231b3b80d8
* X86MCAsmInfoGNUCOFF: Set PointerSize as 8 for targeting x64. It caused ↵NAKAMURA Takumi2014-04-08
| | | | | | | | DW_LNE_set_address was misemitted on x64. FIXME: I haven't investigate whether CalleeSaveStackSlotSize should be 8. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205772 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the last couple of patches here and go back to somethingEric Christopher2014-04-07
| | | | | | that at least failed reliably. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205711 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL this completely at the moment:Eric Christopher2014-04-07
| | | | | | | | | cygwin has llvm-dwarfdump problems and isn't paying attention to the specific xfail there. s390x isn't matching for an unknown reason. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205708 91177308-0d34-0410-b5e6-96231b3b80d8
* Make test run on most platforms and only fail on cygwin/mingw whileEric Christopher2014-04-07
| | | | | | it's being investigated for those. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205704 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Support namespace aliases as DW_TAG_imported_declaration instead ↵David Blaikie2014-04-06
| | | | | | | | | | | | | | | | of DW_TAG_imported_module I really should read the spec more often (and test GCC more often too). I just assumed that namespace aliases would be the same as using directives, except with a name. But apparently that's not how the DWARF standards suggests they be implemented. DWARF4 provides an example and other non-normative text suggesting that namespace aliases be implemented by named imported declarations intsead of named imported modules. So be it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205685 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak unconditional-branch.ll passing on any hosts, while investigating ↵NAKAMURA Takumi2014-04-04
| | | | | | | | | | | | | | | | | | x86_64-mingw32. Sorry for the breakage. For now, it will fail in two ways: 1. To fail for targeting x86_64-mingw32. <stdin>:131:8: note: possible intended match here 0x30830a0100000002 3 0 1 0 0 is_stmt 2. To fail not to find the target x86. llc: : error: unable to get target for 'x86_64-unknown-unknown', see --version and --triple. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205621 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix llvm-objdump crash.Rafael Espindola2014-04-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205581 91177308-0d34-0410-b5e6-96231b3b80d8
* unconditional-branch.ll is broken for targeting x86_64-cygming. Add an ↵NAKAMURA Takumi2014-04-03
| | | | | | explicit triple for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205563 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r205551, "Attempt to XFAIL this on mingw and cygwin hosts." It didn't ↵NAKAMURA Takumi2014-04-03
| | | | | | | | | | | | | | | | | | | | fail on cygming. That said, it emits errors to the stderr (with exit(0)); error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_DIR32 error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_DIR32 error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_DIR32 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205560 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to XFAIL this on mingw and cygwin hosts. The line table onEric Christopher2014-04-03
| | | | | | | | | | | | these is very much off and is more than just the branch from this bug incorrect: Address Line Column File ISA Discriminator Flags ------------------ ------ ------ ------ --- ------------- ------------- 0x30830a0100000002 3 0 1 0 0 is_stmt 0x30830a0100000008 3 0 1 0 0 is_stmt end_sequence git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205551 91177308-0d34-0410-b5e6-96231b3b80d8
* Loosen up check so that we can pass on platforms that generateEric Christopher2014-04-03
| | | | | | | | | | | | | | | | slightly more verbose than needed line tables, e.g.: Address Line Column File ISA Discriminator Flags ------------------ ------ ------ ------ --- ------------- ------------- 0x0000000000000000 1 0 1 0 0 is_stmt 0x0000000000000000 1 0 1 0 0 is_stmt prologue_end 0x0000000000000010 2 0 1 0 0 is_stmt 0x0000000000000018 4 0 1 0 0 is_stmt these should probably be looked at, but it isn't affecting the correctness of the testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205546 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR 19261:Eric Christopher2014-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | llc doesn't generate nodes for unconditional fall-through branches for targets without FastISel implementation (X86 has it, but can be disabled by "-fast-isel=false") in SelectionDAGBuilder::visitBr(). So for line 4 in the following testcase 1: void foo(int i){ 2: switch(i){ 3: default: 4: break; 5: } 6: return; 7: } there is no corresponding line in .debug_line section, and a debugger cannot set a breakpoint at line 4. Fix this by always emitting a branch when we're not optimizing and add a testcase to ensure that there's code on every line we'd want to break. Patch by Daniil Fukalov. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205529 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Use a 64 bit type for the subrangeDavid Blaikie2014-04-03
| | | | | | | | | | | While we were encoding 64 bit values (data8) in the subrange itself, using a 32 bit type for the subrange was still confusing the gdb. Oh, and make it unsigned too. As the comment points out, this could be pushed into the frontend so that it would be 32 or 64 bit as appropriate, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205512 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the R_ARM_ABS32 relocation.Rafael Espindola2014-04-03
| | | | | | This should bring the arm buildbots back. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205502 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugLocEntry: Actually merge the loc entry when returning true.David Blaikie2014-04-01
| | | | | | | | | | Seems we didn't have any test coverage for merging... awesome. So I added some - but hit an llvm-objdump bug while I was there. I'm choosing not to shave that yak right now. Code review feedback/bug catch by Adrian Prantl in r205360. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205373 91177308-0d34-0410-b5e6-96231b3b80d8
* DwarfDebug: Prevent DebugLocEntry merging from coalescing two differentAdrian Prantl2014-04-01
| | | | | | | | constants into only the first one. rdar://14874886. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205357 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Avoid creating unnecessary/empty line tables and remove the ↵David Blaikie2014-04-01
| | | | | | | | | | | | special case of '0' in DwarfCompileUnit::initStmtList by just always using a label difference This moves one case of raw text checking down into the MCStreamer interfaces in the form of a virtual function, even if we ultimately end up consolidating on the one-or-many line tables issue one day, this is nicer in the interim. This just generally streamlines a bunch of use cases into a common code path. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205287 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM64: initial backend importTim Northover2014-03-29
| | | | | | | | | | | | This adds a second implementation of the AArch64 architecture to LLVM, accessible in parallel via the "arm64" triple. The plan over the coming weeks & months is to merge the two into a single backend, during which time thorough code review should naturally occur. Everything will be easier with the target in-tree though, hence this commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205090 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a PR referenceTimur Iskhodzhanov2014-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204904 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the recent COFF debug info tests more readableTimur Iskhodzhanov2014-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204902 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorder arguments on test command line to make it easier to cut andEric Christopher2014-03-26
| | | | | | paste. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204875 91177308-0d34-0410-b5e6-96231b3b80d8
* Follow-up to r204790: don't try to emit line tables if there are no ↵Timur Iskhodzhanov2014-03-26
| | | | | | functions with DI in the TU git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204795 91177308-0d34-0410-b5e6-96231b3b80d8
* Add tests for r204790Timur Iskhodzhanov2014-03-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204791 91177308-0d34-0410-b5e6-96231b3b80d8
* Use -LABEL checks in the COFF debug info testsTimur Iskhodzhanov2014-03-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204788 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Add fission-related sections to COFFDavid Blaikie2014-03-26
| | | | | | | Allows this test to pass on COFF platforms so we don't need to restrict this test to a single target anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204780 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm/test/DebugInfo/empty.ll: Suppress crash for targeting pecoff while ↵NAKAMURA Takumi2014-03-25
| | | | | | investigating. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204766 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Add GNU_addr_base and GNU_ranges_base only when there are ↵David Blaikie2014-03-25
| | | | | | | | addresses or ranges Based on code review feedback from Eric in r204672. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204702 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Support debug_loc under fissionDavid Blaikie2014-03-25
| | | | | | | | | | | | | | | | | | | | | | Implement debug_loc.dwo, as well as llvm-dwarfdump support for dumping this section. Outlined in the DWARF5 spec and http://gcc.gnu.org/wiki/DebugFission the debug_loc.dwo section has more variation than the standard debug_loc, allowing 3 different forms of entry (plus the end of list entry). GCC seems to, and Clang certainly, only use one form, so I've just implemented dumping support for that for now. It wasn't immediately obvious that there was a good refactoring to share the implementation of dumping support between debug_loc and debug_loc.dwo, so they're separate for now - ideas welcome or I may come back to it at some point. As per a comment in the code, we could choose different forms that may reduce the number of debug_addr entries we emit, but that will require further study. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204697 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Add DW_AT_GNU_ranges_base to skeleton CUsDavid Blaikie2014-03-24
| | | | | | | | | This is used to avoid relocations in the dwo file by allowing DW_AT_ranges specified in debug_info.dwo to be relative to this base address. (r204667 implements the base-relative DW_AT_ranges side of this) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204672 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Implement relative addressing for DW_AT_ranges under fissionDavid Blaikie2014-03-24
| | | | | | | | This removes the debug_ranges relocations from debug_info.dwo (but doesn't implement the DW_AT_GNU_ranges_base which is also necessary for correct functioning) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204668 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Don't emit relocations to abbreviations in debug_info.dwoDavid Blaikie2014-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204667 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Omit DW_AT_addr_base from skeletal type units.David Blaikie2014-03-21
| | | | | | | | | | | | | Type units have no addresses, so there's no need for DW_AT_addr_base. This removes another relocation from every skeletal type unit and brings LLVM's skeletal type units in line with GCC's (containing only GNU_dwo_name (strp), comp_dir (strp), and GNU_pubnames (flag_present)). Cary's got some ideas about using str_index in the .o file to reduce those last two relocations (well, replace two relocations with one relocation (pointing to the string index) and two indicies) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204506 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert CodeGen test into a more specific MC test.Rafael Espindola2014-03-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204406 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use EmitAbsValue with symbol references.Rafael Espindola2014-03-20
| | | | | | | | | | | | | | | The function exists to force an expression to be absolute, but there it is not possible to force a symbol reference since a = b .long a means something else. This is an alternative fix for pr9951 that uses an assert. It then deletes the old pr9951 test that was testing nothing already. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204399 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply DW_AT_low/high_pc patch:Eric Christopher2014-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the range machinery for DW_AT_ranges and DW_AT_high/lo_pc. This commit moves us from a single range per subprogram to extending ranges if we are: a) In the same section, and b) In the same enclosing CU. This means we have more fine grained ranges for compile units, and fewer ranges overall when we have multiple functions in the same CU adjacent to each other in the object file. Also remove all of the earlier hacks around this functionality for function sections etc. Also update all of the testcases to take into account the merging functionality. with a fix for location entries in the debug_loc section: Make sure that debug loc entries are relative to the low_pc of the compile unit. This means that when we only have a single range that the offset should be just relative to the low_pc of the unit, for multiple ranges for a CU this means that we'll be relative to 0 which we emit along with DW_AT_ranges. This mostly shows up with linked binaries, so add a testcase with multiple CUs so that our location is going to be offset of a CU with a non-zero low_pc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204377 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comments from Eric's review of r204094.David Blaikie2014-03-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204358 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Use the range machinery for DW_AT_ranges and DW_AT_high/lo_pc."Eric Christopher2014-03-20
| | | | | | | | This appears to trigger failures with optimization and function arguments somehow. This reverts commit r204277. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204286 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the range machinery for DW_AT_ranges and DW_AT_high/lo_pc.Eric Christopher2014-03-19
| | | | | | | | | | | | | | | | | | This commit moves us from a single range per subprogram to extending ranges if we are: a) In the same section, and b) In the same enclosing CU. This means we have more fine grained ranges for compile units, and fewer ranges overall when we have multiple functions in the same CU adjacent to each other in the object file. Also remove all of the earlier hacks around this functionality for function sections etc. Also update all of the testcases to take into account the merging functionality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204277 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Use the comp_dir of the referencing type units when building ↵David Blaikie2014-03-19
| | | | | | | | | | | | debug_line.dwo This isn't a complete fix - it falls back to non-comp_dir when multiple compile units are in play. Adding a map of comp_dir to table is part of the more general solution, but I gave up (in the short term) when I realized I'd also have to calculate the size of each type unit so as to produce correct DW_AT_stmt_list attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204202 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo/lto-comp-dir.ll: Tweak for dos path.NAKAMURA Takumi2014-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204117 91177308-0d34-0410-b5e6-96231b3b80d8