summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo
Commit message (Collapse)AuthorAgeFilesLines
...
* Minor tidying of regex in a testPaul Robinson2015-08-191-3/+3
| | | | llvm-svn: 245486
* Make DW_AT_[MIPS_]linkage_name optional, and off by default for SCE.Paul Robinson2015-08-1111-20/+90
| | | | | | | | | | | | | | Mangled "linkage" names can be huge, and if the debugger (or other tools) have no use for them, the size savings can be very impressive (on the order of 40%). Add one test for controlling behavior, and modify a number of tests to either stop using linkage names, or make llc emit them (so these tests will still run when the default triple is for PS4). Differential Revision: http://reviews.llvm.org/D11374 llvm-svn: 244678
* Fix a bunch of trivial cases of 'CHECK[^:]*$' in the tests. NFCIJonathan Roelofs2015-08-101-1/+1
| | | | | | | I looked into adding a warning / error for this to FileCheck, but there doesn't seem to be a good way to avoid it triggering on the instances of it in RUN lines. llvm-svn: 244481
* [SPARC] Disable unsupported ExecutionEngine tests, and XFAIL a coupleJames Y Knight2015-08-072-1/+4
| | | | | | of DebugInfo tests. llvm-svn: 244371
* If the "CodeView" module flag is set, emit codeview instead of DWARFReid Kleckner2015-08-059-21/+11
| | | | | | | | | | | | | | Summary: Emit both DWARF and CodeView if "CodeView" and "Dwarf Version" module flags are set. Reviewers: majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11756 llvm-svn: 244158
* Update test suite to make "ninja check" succeed without native backend builtinMehdi Amini2015-08-041-0/+3
| | | | | | | Requires "native" feature in most places that were failing. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 243960
* DI: Disallow uniquable DICompileUnitsDuncan P. N. Exon Smith2015-08-03245-258/+258
| | | | | | | | | | | | | | | | | | Since r241097, `DIBuilder` has only created distinct `DICompileUnit`s. The backend is liable to start relying on that (if it hasn't already), so make uniquable `DICompileUnit`s illegal and automatically upgrade old bitcode. This is a nice cleanup, since we can remove an unnecessary `DenseSet` (and the associated uniquing info) from `LLVMContextImpl`. Almost all the testcases were updated with this script: git grep -e '= !DICompileUnit' -l -- test | grep -v test/Bitcode | xargs sed -i '' -e 's,= !DICompileUnit,= distinct !DICompileUnit,' I imagine something similar should work for out-of-tree testcases. llvm-svn: 243885
* Don't use test inputs from other directories.Alexander Kornienko2015-08-032-1/+1
| | | | | | | | | | The test/DebugInfo/dwarfdump-macho-universal.test test added in r243862 uses an input from another test's directory (test/tools/dsymutil/Inputs/fat-test.o) which breaks our test setup. Copying the required test input to the test's Input directory to fix the issue. llvm-svn: 243872
* [dwarfdump] Add support for dumping mach-o universal objectfilesFrederic Riss2015-08-031-0/+17
| | | | llvm-svn: 243862
* [dwarfdump] Ignore scattered relocations for mach-o.Frederic Riss2015-07-313-0/+5
| | | | | | | | | | | | | | When encountering a scattered relocation, the code would assert trying to access an unexisting section. I couldn't find a way to expose the result of the processing of a scattered reloc, and I'm really unsure what the right thing to do is. This patch just skips them during the processing in DwarfContext and adds a mach-o file to the tests that exposed the asserting behavior. (This is a new failure that is being exposed by Rafael's recent work on the libObject interfaces. I think the wrong behavior has always happened, but now it's asserting) llvm-svn: 243778
* DI: Remove DW_TAG_arg_variable and DW_TAG_auto_variableDuncan P. N. Exon Smith2015-07-31149-394/+394
| | | | | | | | | | | | | | | | | | | | | | | | Remove the fake `DW_TAG_auto_variable` and `DW_TAG_arg_variable` tags, using `DW_TAG_variable` in their place Stop exposing the `tag:` field at all in the assembly format for `DILocalVariable`. Most of the testcase updates were generated by the following sed script: find test/ -name "*.ll" -o -name "*.mir" | xargs grep -l 'DILocalVariable' | xargs sed -i '' \ -e 's/tag: DW_TAG_arg_variable, //' \ -e 's/tag: DW_TAG_auto_variable, //' There were only a handful of tests in `test/Assembly` that I needed to update by hand. (Note: a follow-up could change `DILocalVariable::DILocalVariable()` to set the tag to `DW_TAG_formal_parameter` instead of `DW_TAG_variable` (as appropriate), instead of having that logic magically in the backend in `DbgVariable`. I've added a FIXME to that effect.) llvm-svn: 243774
* [mips] Fix out-of-date debug information in test file.Vasileios Kalintiris2015-07-301-6/+8
| | | | | | | | Update the debug info in the check-lines because the change in r243638 introduced a constant initialization before the prologue's end as part of a register spill. llvm-svn: 243640
* Implement target independent TLS compatible with glibc's emutls.c.Chih-Hung Hsieh2015-07-282-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'common' section TLS is not implemented. Current C/C++ TLS variables are not placed in common section. DWARF debug info to get the address of TLS variables is not generated yet. clang and driver changes in http://reviews.llvm.org/D10524 Added -femulated-tls flag to select the emulated TLS model, which will be used for old targets like Android that do not support ELF TLS models. Added TargetLowering::LowerToTLSEmulatedModel as a target-independent function to convert a SDNode of TLS variable address to a function call to __emutls_get_address. Added into lib/Target/*/*ISelLowering.cpp to call LowerToTLSEmulatedModel for TLSModel::Emulated. Although all targets supporting ELF TLS models are enhanced, emulated TLS model has been tested only for Android ELF targets. Modified AsmPrinter.cpp to print the emutls_v.* and emutls_t.* variables for emulated TLS variables. Modified DwarfCompileUnit.cpp to skip some DIE for emulated TLS variabls. TODO: Add proper DIE for emulated TLS variables. Added new unit tests with emulated TLS. Differential Revision: http://reviews.llvm.org/D10522 llvm-svn: 243438
* DI/Verifier: Fix argument bitrot in DILocalVariableDuncan P. N. Exon Smith2015-07-2417-27/+27
| | | | | | | | | | | | | | | | | | | | | | Add a verifier check that `DILocalVariable`s of tag `DW_TAG_arg_variable` always have a non-zero 'arg:' field, and those of tag `DW_TAG_auto_variable` always have a zero 'arg:' field. These are the only configurations that are properly understood by the backend. (Also, fix the bad examples in LangRef and test/Assembler, and fix the bug in Kaleidoscope Ch8.) A large number of testcases seem to have bitrotted their way forward from some ancient version of the debug info hierarchy that didn't have `arg:` parameters. If you have out-of-tree testcases that start failing in the verifier and you don't care enough to get the `arg:` right, you may have some luck just calling: sed -e 's/, arg: 0/, arg: 1/' or some such, but I hand-updated the ones in tree. llvm-svn: 243183
* Add a "debugger tuning" concept that allows us to fine-tune how wePaul Robinson2015-07-152-1/+45
| | | | | | | | | | | emit debug info, according to the preferences of the different debuggers used on various targets. Darwin and FreeBSD default to tuning for LLDB; PS4 defaults to tuning for the SCE (Sony Computer Entertainment) debugger. All others default to GDB. Differential Revision: http://reviews.llvm.org/D8506 llvm-svn: 242338
* Debug Info: Add basic support for external types references.Adrian Prantl2015-07-151-0/+51
| | | | | | | | | | | | | | This is a necessary prerequisite for bootstrapping the emission of debug info inside modules. - Adds a FlagExternalTypeRef to DICompositeType. External types must have a unique identifier. - External type references are emitted using a forward declaration with a DW_AT_signature([DW_FORM_ref_sig8]) based on the UID. http://reviews.llvm.org/D9612 llvm-svn: 242302
* [CodeView] Add support for emitting column informationDavid Majnemer2015-07-094-34/+206
| | | | | | | | | | Column information is present in CodeView when the line table subsection has bit 0 set to 1 in it's flags field. The column information is represented as a pair of 16-bit quantities: a starting and ending column. This information is present at the end of the chunk, after all the line-PC pairs. llvm-svn: 241764
* Revert "[DWARF] Fix debug info generation for function static variables, ↵David Blaikie2015-07-011-129/+0
| | | | | | | | | | typedefs, and records" Caused PR24008 This reverts commit 37cb5f1c2db9f42d29f26b215585f56bb64ae4f5. llvm-svn: 241176
* Test committed in r241153 is more target-specific than I thought.Michael Kuperstein2015-07-011-1/+1
| | | | | | Moving the (original, x86-only) test to the X86 directory. llvm-svn: 241162
* Fix non-target-specific test not to use the x86 triple.Michael Kuperstein2015-07-011-1/+1
| | | | llvm-svn: 241158
* [DWARF] Fix debug info generation for function static variables, typedefs, ↵Michael Kuperstein2015-07-011-0/+129
| | | | | | | | | | | | | | | and records Function static variables, typedefs and records (class, struct or union) declared inside a lexical scope were associated with the function as their parent scope, rather than the lexical scope they are defined or declared in. This fixes PR19238 Patch by: amjad.aboud@intel.com Differential Revision: http://reviews.llvm.org/D9758 llvm-svn: 241153
* Debug info: Add dwarf backend support for DIModule.Adrian Prantl2015-06-301-0/+25
| | | | | | rdar://problem/20965932 llvm-svn: 241034
* Revert "Debug Info: One more bitfield bugfix. While yesterday's r240853 fixed"Adrian Prantl2015-06-271-1/+1
| | | | | | This reverts commit 240890. Breaking the gdb buildbot. llvm-svn: 240893
* Don't use %llc_dwarf for target-specific tests.Benjamin Kramer2015-06-272-4/+2
| | | | | | Should fix running them on windows. llvm-svn: 240892
* Debug Info: One more bitfield bugfix. While yesterday's r240853 fixedAdrian Prantl2015-06-271-1/+1
| | | | | | | | | | the DW_AT_bit_offset computation, the byte offset is in fact also endian-dependent as it needs to point to the storage unit containing the most-significant bit of the the bitfield. I'm so looking forward to emitting the endian-agnostic DWARF 3 version instead. llvm-svn: 240890
* Add original source code to test case as suggested in review.Adrian Prantl2015-06-271-0/+58
| | | | llvm-svn: 240863
* Debug Info: Fix a bug in the DW_AT_bit_offset calculation that wouldAdrian Prantl2015-06-261-0/+45
| | | | | | | | | result in negative offsets and attempt a better job at documenting the algorithm. rdar://21082998 llvm-svn: 240853
* Debug info: Add more test coverage for bitfields.Adrian Prantl2015-06-261-0/+140
| | | | llvm-svn: 240834
* Make llvm-dwarfdump exit with non-zero exit code if error was occured.Alexey Samsonov2015-06-251-3/+3
| | | | llvm-svn: 240729
* Split test up into two target-spcific directories.Adrian Prantl2015-06-253-104/+148
| | | | llvm-svn: 240726
* Debug Info: Add basic test coverage for the DWARF encoding of bitfields.Adrian Prantl2015-06-251-0/+104
| | | | | | | | While looking at a couple of bugs in the debug info output for bitfields I noticed that there wasn't a single regression test to test my changes against, so here's a start. llvm-svn: 240717
* IAS: Use the root macro instanciation for locationFrederic Riss2015-06-251-0/+14
| | | | | | | | | | | | | | r224810 fixed the handling of macro debug locations in AsmParser. This patch fixes the logic to actually do what was intended: it uses the first macro of the macro stack instead of the last one. The updated testcase shows that the current scheme doesn't work when macro instanciations are nested and multiple files are used. Reviewers: compnerd Differential Revision: http://reviews.llvm.org/D10463 llvm-svn: 240705
* Make this test verify .debug_pubnames is actually missing.Paul Robinson2015-06-251-2/+2
| | | | | | It was matching at EOF regardless of whether the section was present. llvm-svn: 240679
* AsmPrinter: Don't emit empty .debug_loc entriesDuncan P. N. Exon Smith2015-06-211-0/+66
| | | | | | | | | | | If we don't know how to represent a .debug_loc entry, skip the entry entirely rather than emitting an empty one. Similarly, if a .debug_loc list has no entries, don't create the list. We still want to create the variables, just in an optimized-out form that doesn't have a DW_AT_location. llvm-svn: 240244
* Move the personality function from LandingPadInst to FunctionDavid Majnemer2015-06-177-17/+17
| | | | | | | | | | | | | | | | | | | The personality routine currently lives in the LandingPadInst. This isn't desirable because: - All LandingPadInsts in the same function must have the same personality routine. This means that each LandingPadInst beyond the first has an operand which produces no additional information. - There is ongoing work to introduce EH IR constructs other than LandingPadInst. Moving the personality routine off of any one particular Instruction and onto the parent function seems a lot better than have N different places a personality function can sneak onto an exceptional function. Differential Revision: http://reviews.llvm.org/D10429 llvm-svn: 239940
* Revert "[DWARF] Fix a few corner cases in expression emission"David Blaikie2015-06-091-110/+0
| | | | | | | This reverts commit r239380 due to apparently GDB regressions: http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/22562 llvm-svn: 239420
* llvm/test/DebugInfo/X86/expressions.ll: %llc_dwarf shouldn't be used with ↵NAKAMURA Takumi2015-06-091-2/+2
| | | | | | | | -mtriple, since %llc_dwarf implies the triple. In this case, use plain "llc". llvm-svn: 239390
* Move X86-only test case to appropriate directoryKeno Fischer2015-06-091-0/+0
| | | | llvm-svn: 239384
* [DWARF] Fix a few corner cases in expression emissionKeno Fischer2015-06-091-0/+110
| | | | | | | | | | | | | | | | | | | Summary: I noticed an object file with `DW_OP_reg4 DW_OP_breg4 0` as a DWARF expression, which I traced to a missing break (and `++I`) in this code snippet. While I was at it, I also added support for a few other corner cases along the same lines that I could think of. Test Plan: Hand-crafted test case to exercises these cases is included. Reviewers: echristo, dblaikie, aprantl Reviewed By: aprantl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10302 llvm-svn: 239380
* Revert "[Object, ELF] Fix segmentation fault in ELFFile::getSectionName()."Alexey Samsonov2015-06-042-3/+0
| | | | | | This reverts commit r239124. llvm-svn: 239125
* [Object, ELF] Fix segmentation fault in ELFFile::getSectionName().Alexey Samsonov2015-06-042-0/+3
| | | | | | Don't do a null dereference if .shstrtab section is missing. llvm-svn: 239124
* [Object, ELF] Don't assert on invalid magic in createELFObjectFile.Alexey Samsonov2015-06-042-0/+2
| | | | | | Instead, return a proper error code from factory. llvm-svn: 239116
* [Object, ELF] Don't call llvm_unreachable() from createELFObjectFile.Alexey Samsonov2015-06-042-0/+2
| | | | | | Instead, return a proper error code from factory. llvm-svn: 239113
* Erase constant dbgloc on reuse in PHI nodeSergey Dmitrouk2015-06-041-0/+81
| | | | | | | | | | | | | | | | | | | | Basic block selection involves checking successor BBs for PHI nodes that depend on the current BB. In case such BBs are found, the value being selected is a constant and such constant already exists in current BB, it's value is reused. This might lead to wrong locations in some situations, especially if same constant value ends up being materialized twice in two different ways, which discards that sharing and leaves us with wrong debug location in the successor BB. In code this involves the following sequence of calls: SelectionDAGBuilder::HandlePHINodesInSuccessorBlocks -> SelectionDAGBuilder::CopyValueToVirtualRegister -> SelectionDAGBuilder::getNonRegisterValue llvm-svn: 239089
* Improve test added in r238481.Alexey Samsonov2015-06-031-2/+2
| | | | llvm-svn: 238985
* [DWARF] Fix a bug in line info handlingKeno Fischer2015-05-312-9/+37
| | | | | | | | | | | | | | | | | | | | This fixes a bug in the line info handling in the dwarf code, based on a problem I when implementing RelocVisitor support for MachO. Since addr+size will give the first address past the end of the function, we need to back up one line table entry. Fix this by looking up the end_addr-1, which is the last address in the range. Note that this also removes a duplicate output from the llvm-rtdyld line table dump. The relevant line is the end_sequence one in the line table and has an offset of the first address part the end of the range and hence should not be included. Also factor out the common functionality into a separate function. This comes up on MachO much more than on ELF, since MachO doesn't store the symbol size separately, hence making said situation always occur. Differential Revision: http://reviews.llvm.org/D9925 llvm-svn: 238699
* For COFF and MachO, compute the gap between to symbols.Rafael Espindola2015-05-311-1/+6
| | | | | | Before r238028 we used to do this in O(N^2), now we do it in O(N log N). llvm-svn: 238698
* Add RelocVisitor support for MachOKeno Fischer2015-05-303-0/+7
| | | | | | | | | | | | This commit adds partial support for MachO relocations to RelocVisitor. A simple test case is added to show that relocations are indeed being applied and that using llvm-dwarfdump on MachO files no longer errors. Correctness is not yet tested, due to an unrelated bug in DebugInfo, which will be fixed with appropriate testcase in a followup commit. Differential Revision: http://reviews.llvm.org/D8148 llvm-svn: 238663
* Object, ELF: Use error code instead of calling report_fatal_error()Alexey Samsonov2015-05-282-0/+4
| | | | | | | Make createELFObjectFile() return object_error::parse_failed on encountering invalid ELF file, instead of crashing the program. llvm-svn: 238481
* DebugInfo: .debug_line DWARF64 supportEd Maste2015-05-282-0/+15
| | | | | | | | | | | This adds support for the 64-bit DWARF format, but is still limited to less than 4GB of debug data by the DataExtractor class. Some versions of the GNU MIPS toolchain generate 64-Bit DWARF even though it isn't actually necessary. Differential Revision: http://reviews.llvm.org/D1988 llvm-svn: 238434
OpenPOWER on IntegriCloud