summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-pdbdump] Resubmit "Add some tests for llvm-pdbdump".Zachary Turner2015-02-228-0/+67
| | | | | | | | | | | | | NOTE: This patch intentionally breaks the build. It attempts to resubmit r230083, but with some debug logging in the CMake and lit config files to determine why certain bots do not correctly disable the DIA tests when DIA is not available. After a sufficient number of bots fail, this patch will either be reverted or, if the cause of the failure becomes obvious, a fix submitted with the log statements removed. llvm-svn: 230161
* Revert "[llvm-pdbdump] Add some tests for llvm-pdbdump."Zachary Turner2015-02-208-66/+0
| | | | | | | It is not correctly detecting the situations where the test is unsupported. Reverting until we can figure it out. llvm-svn: 230085
* [llvm-pdbdump] Add some tests for llvm-pdbdump.Zachary Turner2015-02-208-0/+66
| | | | | | | | | | This adds only a very basic set of tests that dump a few functions and object files. Differential Revision: http://reviews.llvm.org/D7656 Reviewed By: David Blaikie llvm-svn: 230083
* DebugInfo: Match Name and DisplayName in testcaseDuncan P. N. Exon Smith2015-02-191-2/+2
| | | | | | | | | There's no way for `DIBuilder` to create a subprogram or global variable where `getName()` and `getDisplayName()` give different answers. This testcase managed to achieve the feat though. This was probably just left behind in some sort of upgrade along the way. llvm-svn: 229930
* Modify llvm-readobj to dump symbol record bytes.Zachary Turner2015-02-185-9/+9
| | | | | | | | | | This will help us study the format of individual symbol records more closely. Differential Revision: http://reviews.llvm.org/D7664 Reviewed by: Timur Iskhodzhanov llvm-svn: 229730
* Add the missing testcase for r228764.Adrian Prantl2015-02-101-0/+257
| | | | llvm-svn: 228766
* Debug info: When updating debug info during SROA, do not emit debug infoAdrian Prantl2015-02-091-0/+91
| | | | | | | | | | for any padding introduced by SROA. In particular, do not emit debug info for an alloca that represents only the padding introduced by a previous iteration. Fixes PR22495. llvm-svn: 228632
* Debug info: Use DW_OP_bit_piece instead of DW_OP_piece in theAdrian Prantl2015-02-099-21/+21
| | | | | | | | | | | intermediate representation. This - increases consistency by using the same granularity everywhere - allows for pieces < 1 byte - DW_OP_piece didn't actually allow storing an offset. Part of PR22495. llvm-svn: 228631
* DebugInfo: Remove DW_TAG_constantDuncan P. N. Exon Smith2015-02-091-31/+0
| | | | | | | | Remove handling for DW_TAG_constant. We started producing it in r110656, but reverted that in r110876 without dropping the support. Finish the job. llvm-svn: 228623
* MC: Emit COFF section flags in the "proper" orderDavid Majnemer2015-02-076-10/+10
| | | | | | | | COFF section flags are not idempotent: 'rd' will make a read-write section because 'd' implies write 'dr' will make a read-only section because 'r' disables write llvm-svn: 228490
* Debug Info: Relax assertion in isUnsignedDIType() to allow floats to beAdrian Prantl2015-02-021-0/+55
| | | | | | | | | | | | | | | described by integer constants. This is a bit ugly, but if the source language allows arbitrary type casting, the debug info must follow suit. For example: void foo() { float a; *(int *)&a = 0; } For the curious: SROA replaces the float alloca with an i32 alloca, which is then optimized away and described via dbg.value(i32 0, ...). llvm-svn: 227827
* Fix PR22393. When recursively replacing an aggregate with a smallerAdrian Prantl2015-02-011-0/+146
| | | | | | | | aggregate or scalar, the debug info needs to refer to the absolute offset (relative to the entire variable) instead of storing the offset inside the smaller aggregate. llvm-svn: 227702
* Add missing tags.Adrian Prantl2015-02-012-2/+2
| | | | llvm-svn: 227701
* Add PPC test for r227481, but XFAIL because this is actually more work than ↵David Blaikie2015-01-301-0/+7
| | | | | | | | | | | it appeared to be. Same sort of bug as on ARM where the cmp+branch are lowered to br_cc (choosing the branch's debugloc for the br_cc's debugloc) then expanded out to a cmp and a br, but both using the debug loc of the br_cc, thus losing fidelity. llvm-svn: 227645
* Add ARM test for r227489, but XFAIL because this is actually more work than ↵David Blaikie2015-01-301-0/+7
| | | | | | | | | | | | | | it appeared to be. Also revert r227489 since it didn't actually fix the thing I thought I was fixing (since the test case was targeting the wrong architecture initially). The change might be correct & demonstrated by other test cases, but it's not a priority for me to find those test cases right now. Filed PR22417 for the failure. llvm-svn: 227632
* Revert "Add missing test from r227488"Renato Golin2015-01-301-1/+0
| | | | | | This reverts commit r227489, since this is the real one failing the bots. llvm-svn: 227602
* Add missing test from r227488David Blaikie2015-01-291-0/+1
| | | | llvm-svn: 227489
* Refactor test to be reused across architecturesDavid Blaikie2015-01-292-3/+2
| | | | llvm-svn: 227487
* Remove erroneous REQUIRES: object-emission for asm test.David Blaikie2015-01-291-2/+0
| | | | llvm-svn: 227486
* Missing test case for r227481David Blaikie2015-01-291-0/+59
| | | | llvm-svn: 227485
* PR22356: DebugInfo: Handle the size of a member where the type of that ↵David Blaikie2015-01-281-74/+81
| | | | | | member is a typedef (or other sugar) of a declaration. llvm-svn: 227290
* Replace this testcase with an even shorter one provided by dblaikie.Adrian Prantl2015-01-271-339/+169
| | | | llvm-svn: 227152
* Debug info: Fix PR22296 by omitting the DW_AT_location if we lost theAdrian Prantl2015-01-251-0/+373
| | | | | | | | | | | physical register that is described in a DBG_VALUE. In the testcase the DBG_VALUE describing "p5" becomes unavailable because the register its address is in is clobbered and we (currently) aren't smart enough to realize that the value is rematerialized immediately after the DBG_VALUE and/or is actually a stack slot. llvm-svn: 227056
* [mips] Fix 'jumpy' debug line info around calls.Daniel Sanders2015-01-241-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: At the moment, address calculation is taking the debug line info from the address node (e.g. TargetGlobalAddress). When a function is called multiple times, this results in output of the form: .loc $first_call_location .. address calculation .. .. function call .. .. address calculation .. .loc $second_call_location .. function call .. .loc $first_call_location .. address calculation .. .loc $third_call_location .. function call .. This patch makes address calculations for function calls take the debug line info for the call node and results in output of the form: .loc $first_call_location .. address calculation .. .. function call .. .loc $second_call_location .. address calculation .. .. function call .. .loc $third_call_location .. address calculation .. .. function call .. All other address calculations continue to use the address node. Test Plan: Fixes test/DebugInfo/multiline.ll on a mips host. Subscribers: dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D7050 llvm-svn: 227005
* Debug Info / PR22309: Allow union types to be emitted as unsigned constants.Adrian Prantl2015-01-231-0/+66
| | | | llvm-svn: 226919
* Revert "PR21408: Workaround the appearance of duplicate variables due to ↵David Blaikie2015-01-221-117/+0
| | | | | | | | | | | problems when inlining two calls to the same function from the same call site." The underlying bug has been fixed in r226736 so there's no need to workaround this anymore. This reverts commit r220923. llvm-svn: 226842
* DebugInfo: Use distinct inlinedAt MDLocations to avoid separate inlined ↵David Blaikie2015-01-213-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | calls being coalesced When two calls from the same MDLocation are inlined they currently get treated as one inlined function call (creating difficulty debugging, duplicate variables, etc). Clang worked around this by including column information on inline calls which doesn't address LTO inlining or calls to the same function from the same line and column (such as through a macro). It also didn't address ctor and member function calls. By making the inlinedAt locations distinct, every call site has an explicitly distinct location that cannot be coalesced with any other call. This can produce linearly (2x in the worst case where every call is inlined and the call instruction has a non-call instruction at the same location) more debug locations. Any increase beyond that are in cases where the Clang workaround was insufficient and the new scheme is creating necessary distinct nodes that were being erroneously coalesced previously. After this change to LLVM the incomplete workarounds in Clang. That should reduce the number of debug locations (in a build without column info, the default on Darwin, not the default on Linux) by not creating pseudo-distinct locations for every call to an inline function. (oh, and I made the inlined-at chain rebuilding iterative instead of recursive because I was having trouble wrapping my head around it the way it was - open to discussion on the right design for that function (including going back to a recursive solution)) llvm-svn: 226736
* Make DIExpression::Verify() stricter by checking that the number ofAdrian Prantl2015-01-211-0/+54
| | | | | | elements and the ordering is sane and cleanup the accessors. llvm-svn: 226627
* DebugLocs without a scope should fail the verification.Adrian Prantl2015-01-201-0/+33
| | | | | | Follow-up to r226588. llvm-svn: 226616
* Reapply: Teach SROA how to update debug info for fragmented variables.Adrian Prantl2015-01-204-4/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reapplies r225379. ChangeLog: - The assertion that this commit previously ran into about the inability to handle indirect variables has since been removed and the backend can handle this now. - Testcases were upgrade to the new MDLocation format. - Instead of keeping a DebugDeclares map, we now use llvm::FindAllocaDbgDeclare(). Original commit message follows. Debug info: Teach SROA how to update debug info for fragmented variables. This allows us to generate debug info for extremely advanced code such as typedef struct { long int a; int b;} S; int foo(S s) { return s.b; } which at -O1 on x86_64 is codegen'd into define i32 @foo(i64 %s.coerce0, i32 %s.coerce1) #0 { ret i32 %s.coerce1, !dbg !24 } with this patch we emit the following debug info for this TAG_formal_parameter [3] AT_location( 0x00000000 0x0000000000000000 - 0x0000000000000006: rdi, piece 0x00000008, rsi, piece 0x00000004 0x0000000000000006 - 0x0000000000000008: rdi, piece 0x00000008, rax, piece 0x00000004 ) AT_name( "s" ) AT_decl_file( "/Volumes/Data/llvm/_build.ninja.release/test.c" ) Thanks to chandlerc, dblaikie, and echristo for their feedback on all previous iterations of this patch! llvm-svn: 226598
* Remove support for DIVariable's FlagIndirectVariable and expectAdrian Prantl2015-01-1912-30/+30
| | | | | | | | | | | | | | | frontends to use a DIExpression with a DW_OP_deref instead. This is not only a much more natural place for this informationl; there is also a technical reason: The FlagIndirectVariable is used to mark a variable that is turned into a reference by virtue of the calling convention; this happens for example to aggregate return values. The inliner, for example, may actually need to undo this indirection to correctly represent the value in its new context. This is impossible to implement because the DIVariable can't be safely modified. We can however safely construct a new DIExpression on the fly. llvm-svn: 226476
* IR: Move MDLocation into placeDuncan P. N. Exon Smith2015-01-14168-878/+878
| | | | | | | | | | | | | | | | | | | | This commit moves `MDLocation`, finishing off PR21433. There's an accompanying clang commit for frontend testcases. I'll attach the testcase upgrade script I used to PR21433 to help out-of-tree frontends/backends. This changes the schema for `DebugLoc` and `DILocation` from: !{i32 3, i32 7, !7, !8} to: !MDLocation(line: 3, column: 7, scope: !7, inlinedAt: !8) Note that empty fields (line/column: 0 and inlinedAt: null) don't get printed by the assembly writer. llvm-svn: 226048
* Debug Info: Move the complex expression handling (=the remainder) ofAdrian Prantl2015-01-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | emitDebugLocValue() into DwarfExpression. Ought to be NFC, but it actually uncovered a bug in the debug-loc-asan.ll testcase. The testcase checks that the address of variable "y" is stored at [RSP+16], which also lines up with the comment. It also check(ed) that the *value* of "y" is stored in RDI before that, but that is actually incorrect, since RDI is the very value that is stored in [RSP+16]. Here's the assembler output: movb 2147450880(%rcx), %r8b #DEBUG_VALUE: bar:y <- RDI cmpb $0, %r8b movq %rax, 32(%rsp) # 8-byte Spill movq %rsi, 24(%rsp) # 8-byte Spill movq %rdi, 16(%rsp) # 8-byte Spill .Ltmp3: #DEBUG_VALUE: bar:y <- [RSP+16] Fixed the comment to spell out the correct register and the check to expect an address rather than a value. Note that the range that is emitted for the RDI location was and is still wrong, it claims to begin at the function prologue, but really it should start where RDI is first assigned. llvm-svn: 225851
* Update multiline.ll testcase to handle (ppc64le) .localentry directiveWill Schmidt2015-01-131-1/+1
| | | | | | | | | | | | The ppc64le platform will emit a .localentry directive. This is triggering a false-positive against a CHECK-NOT: .loc in multiline.ll. Add a space "{{ }}" to the check-not line to allow for arguments, and prevent .localentry from matching. Differential Revision: http://reviews.llvm.org/D6935 llvm-svn: 225810
* Debug info: Factor out the creation of DWARF expressions from AsmPrinterAdrian Prantl2015-01-121-2/+1
| | | | | | | | | | | | | | into a new class DwarfExpression that can be shared between AsmPrinter and DwarfUnit. This is the first step towards unifying the two entirely redundant implementations of dwarf expression emission in DwarfUnit and AsmPrinter. Almost no functional change — Testcases were updated because asm comments that used to be on two lines now appear on the same line, which is actually preferable. llvm-svn: 225706
* Revert "Reapply: Teach SROA how to update debug info for fragmented variables."Adrian Prantl2015-01-084-266/+4
| | | | | | | This reverts commit r225379 while investigating an assertion failure reported by Alexey. llvm-svn: 225424
* Reapply: Teach SROA how to update debug info for fragmented variables.Adrian Prantl2015-01-074-4/+266
| | | | | | | | The two buildbot failures were addressed in LLVM r225378 and CFE r225359. This rapplies commit 225272 without modifications. llvm-svn: 225379
* Debug info: Allow aggregate types to be described by constants.Adrian Prantl2015-01-071-0/+118
| | | | llvm-svn: 225378
* Revert "Reapply: Teach SROA how to update debug info for fragmented variables."Adrian Prantl2015-01-064-266/+4
| | | | | | | | | because of a tsan buildbot failure. This reverts commit 225272. Fix should be coming soon. llvm-svn: 225288
* Reapply: Teach SROA how to update debug info for fragmented variables.Adrian Prantl2015-01-064-4/+266
| | | | | | | | | | This also rolls in the changes discussed in http://reviews.llvm.org/D6766. Defers migrating the debug info for new allocas until after all partitions are created. Thanks to Chandler for reviewing! llvm-svn: 225272
* Reverting 225045 and 225043 and XFAIL multiline.ll on hexagonColin LeMahieu2014-12-311-0/+1
| | | | llvm-svn: 225047
* Fix a test case to not depend on asm comment syntax, so as to be portableDavid Blaikie2014-12-301-9/+9
| | | | | | | | Too many different comment characters - instead of trying to account for them all, instead disable the comments and just check for end-of-line instead. llvm-svn: 225020
* Generalize even further, for ARM comment syntax (@)David Blaikie2014-12-301-8/+8
| | | | llvm-svn: 225019
* Generalize test case to handle different asm syntax (# or // comments)David Blaikie2014-12-301-8/+8
| | | | llvm-svn: 225017
* DebugInfo: Omit is_stmt from line table entries on the same line.David Blaikie2014-12-302-1/+82
| | | | | | | | | | | | | | | | | | | | | | GCC does this for non-zero discriminators and since GCC doesn't produce column info, that was the only place it comes up there. For LLVM, since we can emit discriminators and/or column info, it makes more sense to invert the condition and just test for changes in line number. This should resolve at least some of the GDB 7.5 test suite failures created by recent Clang changes that increase the location fidelity (which, since Clang defaults to including column info on Linux by default created a bunch of cases that confused GDB). In theory we could do this better/differently by grouping actual source statements together in a similar manner to the way lexical scopes are handled but given that GDB isn't really in a position to consume that (& users are probably somewhat used to different lines being different 'statements') this seems the safest and cheapest change. (I'm concerned that doing this 'right' would bloat the debugloc data even further - something Duncan's working hard to address) llvm-svn: 225011
* Band-aid fix for PR22032: don't emit DWARF debug info if AddressSanitizer is ↵Timur Iskhodzhanov2014-12-261-0/+3
| | | | | | enabled on Windows llvm-svn: 224860
* IAS: correct debug line info for asm macrosSaleem Abdulrasool2014-12-241-0/+20
| | | | | | | | | | | | | | | | | Correct the line information generation for preprocessed assembly. Although we tracked the source information for the macro instantiation, we failed to account for the fact that we were instantiating a macro, which is populated into a new buffer and that the line information would be relative to the definition rather than the actual instantiation location. This could cause the line number associated with the statement to be very high due to wrapping of the difference calculated for the preprocessor line information emitted into the stream. Properly calculate the line for the macro instantiation, referencing the line where the macro is actually used as GCC/gas do. The test case uses x86, though the same problem exists on any other target using the LLVM IAS. llvm-svn: 224810
* Debug Info: In symmetry to DW_TAG_pointer_type, do not emit the byte sizeAdrian Prantl2014-12-241-0/+44
| | | | | | | of a DW_TAG_ptr_to_member_type. This restores the behavior from before r224780-r224781. llvm-svn: 224799
* Revert r224739: Debug info: Teach SROA how to update debug info forChandler Carruth2014-12-233-203/+4
| | | | | | | | | | | fragmented variables. This caused codegen to start crashing when we built somewhat large programs with debug info and optimizations. 'check-msan' hit in, and I suspect a bootstrap would as well. I mailed a test case to the review thread. llvm-svn: 224750
* Thumb1 frame lowering: Mark CFI instructions with the FrameSetup flag.Adrian Prantl2014-12-221-1/+2
| | | | | | | | | | | | | Followup to r224294: ARM/AArch64: Attach the FrameSetup MIFlag to CFI instructions. Debug info marks the first instruction without the FrameSetup flag as being the end of the function prologue. Any CFI instructions in the middle of the function prologue would cause debug info to end the prologue too early and worse, attach the line number of the CFI instruction, which incidentally is often 0. llvm-svn: 224743
OpenPOWER on IntegriCloud