summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[DEBUGINFO, NVPTX]DO not emit ',debug' option if no debug info or ↵Alexey Bataev2018-11-091-48/+0
| | | | | | | | | only debug directives are requested." This reverts commit r345972. Need to update the description + possibly to update the patch itself after discussion with Eric Christofer. llvm-svn: 346508
* [DWARFv5] Read and dump multiple .debug_info sections.Paul Robinson2018-11-071-28/+32
| | | | | | | | Type units go in .debug_info comdats, not .debug_types, in v5. Differential Revision: https://reviews.llvm.org/D53907 llvm-svn: 346360
* Specify REQUIRES: default_triple in two debuginfo testsJustin Bogner2018-11-062-1/+3
| | | | | | These were failing when specifying LLVM_DEFAULT_TARGET_TRIPLE='' llvm-svn: 346185
* [codeview] Let the X86 backend tell us the VFRAME offset adjustmentReid Kleckner2018-11-032-6/+185
| | | | | | | | | | | Use MachineFrameInfo's OffsetAdjustment field to pass this information from the target to CodeViewDebug.cpp. The X86 backend doesn't use it for any other purpose. This fixes PR38857 in the case where there is a non-aligned quantity of CSRs and a non-aligned quantity of locals. llvm-svn: 346062
* [DWARF v5] Verifier: Add checks for DW_FORM_strx* forms.Wolfgang Pieb2018-11-031-4/+27
| | | | | | | | | Adding functionality to the DWARF verifier for DWARF v5 strx* forms which index into the string offsets table. Differential Revision: https://reviews.llvm.org/D54049 llvm-svn: 346061
* [DWARF] Fix typo, .gnu_index -> .gdb_indexFangrui Song2018-11-021-1/+1
| | | | llvm-svn: 346039
* [DEBUGINFO, NVPTX]DO not emit ',debug' option if no debug info or only debug ↵Alexey Bataev2018-11-021-0/+48
| | | | | | | | | | | | | | | | | directives are requested. Summary: If the output of debug directives only is requested, we should drop emission of ',debug' option from the target directive. Required for supporting of nvprof profiler. Reviewers: probinson, echristo, dblaikie Subscribers: Hahnfeld, jholewinski, llvm-commits, JDevlieghere, aprantl Differential Revision: https://reviews.llvm.org/D46061 llvm-svn: 345972
* test/DebugInfo: Convert some tests to MIRMatthias Braun2018-11-0214-1089/+1969
| | | | | | | | | | These tests are meant to test dwarf emission (or prolog/epilogue generation) so we can convert them to .mir and only run the relevant part of the pipeline. This way they become independent of changes in earlier passes such as my planned changes to RegAllocFast. llvm-svn: 345919
* [CodeView] Emit the correct TypeIndex for std::nullptr_t.Zachary Turner2018-11-011-0/+42
| | | | | | | | | | | | | | | | | | | | | | The TypeIndex used by cl.exe is 0x103, which indicates a SimpleTypeMode of NearPointer (note the absence of the bitness, normally pointers use a mode of NearPointer32 or NearPointer64) and a SimpleTypeKind of void. So this is basically a void*, but without a specified size, which makes sense given how std::nullptr_t is defined. clang-cl was actually not emitting *anything* for this. Instead, when we encountered std::nullptr_t in a DIType, we would actually just emit a TypeIndex of 0, which is obviously wrong. std::nullptr_t in DWARF is represented as a DW_TAG_unspecified_type with a name of "decltype(nullptr)", so we add that logic along with a test, as well as an update to the dumping code so that we no longer print void* when dumping 0x103 (which would previously treat Void/NearPointer no differently than Void/NearPointer64). Differential Revision: https://reviews.llvm.org/D53957 llvm-svn: 345811
* MachineOperand/MIParser: Do not print debug-use flag, infer itMatthias Braun2018-10-3038-243/+243
| | | | | | | | | | | | | | The debug-use flag must be set exactly for uses on DBG_VALUEs. This is so obvious that it can be trivially inferred while parsing. This will reduce noise when printing while omitting an information that has little value to the user. The parser will keep recognizing the flag for compatibility with old `.mir` files. Differential Revision: https://reviews.llvm.org/D53903 llvm-svn: 345671
* [X86] Re-enable the machine verifier after fixing more testsFrancis Visoiu Mistrih2018-10-301-1/+2
| | | | | | Was disabled again in r345528. Hopefully this the bots. llvm-svn: 345593
* Relax fast register allocator related test cases; NFCMatthias Braun2018-10-294-11/+9
| | | | | | | | | | | | | - Relex hard coded registers and stack frame sizes - Some test cleanups - Change phi-dbg.ll to match on mir output after phi elimination instead of going through the whole codegen pipeline. This is in preparation for https://reviews.llvm.org/D52010 I'm committing all the test changes upfront that work before and after independently. llvm-svn: 345532
* [X86] Enable the MachineVerifier by defaultFrancis Visoiu Mistrih2018-10-291-1/+2
| | | | | | | | | | | | | | | The machine verifier was disabled for x86 by default. There are now only 9 tests failing, compared to what previously was between 20 and 30. This is a good opportunity to file bugs for all the remaining issues, then explicitly disable the failing tests and enabling the machine verifier by default. This allows us to avoid adding new tests that break the verifier. PR27481 llvm-svn: 345513
* llvm-dwarfdump: loclists: Don't expect an (albeit empty) expression for ↵David Blaikie2018-10-251-2/+1
| | | | | | LLE_base_address llvm-svn: 345320
* [DEBUG_INFO][NVPTX]Fix processing of DBG_VALUES.Alexey Bataev2018-10-251-0/+81
| | | | | | | | | | | | | | | | | Summary: If the instruction in the eliminateFrameIndex function is a DBG_VALUE instruction, it requires special processing. The frame register is set to VRFrame and the offset is based on the object offset. The code is similar to the code used in lib/CodeGen/PrologEpilogInserter.cpp. Reviewers: tra Subscribers: jholewinski, llvm-commits Differential Revision: https://reviews.llvm.org/D53657 llvm-svn: 345269
* DebugInfo: Reuse common addresses for rnglist base address selectionsDavid Blaikie2018-10-241-3/+3
| | | | | | | | | | | | | | | | | | This makes the offsets larger (since they are further from the base address) but those are in the .dwo - and allows removing addresses and relocations from the .o file. This could be built into the AddressPool more fundamentally, perhaps - when you ask for an AddressPool entry you could say "or give me some other entry and an offset I need to use" - though what to do about situations where the first use of an address in a section is not the earliest address in that section... is tricky. At least with range addresses we can be fairly sure we've seen the earliest address first because we see the start address for the function. llvm-svn: 345224
* llvm-dwarfdump: Account for skeleton addr_base when dumping addresses in ↵David Blaikie2018-10-241-2/+2
| | | | | | split unit in the same file llvm-svn: 345215
* [DEBUGINFO, NVPTX] Try to pack bytes data into a single string.Alexey Bataev2018-10-245-4524/+679
| | | | | | | | | | | | | | | | | | | | Summary: If the target does not support `.asciz` and `.ascii` directives, the strings are represented as bytes and each byte is placed on the new line as a separate byte directive `.b8 <data>`. NVPTX target allows to represent the vector of the data of the same type as a vector, where values are separated using `,` symbol: `.b8 <data1>,<data2>,...`. This allows to reduce the size of the final PTX file. Ptxas tool includes ptx files into the resulting binary object, so reducing the size of the PTX file is important. Reviewers: tra, jlebar, echristo Subscribers: jholewinski, llvm-commits Differential Revision: https://reviews.llvm.org/D45822 llvm-svn: 345142
* [llvm-dwarfdump] - Fix win10 build bot failture.George Rimar2018-10-221-6/+6
| | | | | | | | | | | Bot failed: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/20877/steps/test/logs/stdio This was broken after the r344895 "[llvm-dwarfdump] - Add the support of parsing .debug_loclists." because of wrong formatting specifiers used. llvm-svn: 344896
* [llvm-dwarfdump] - Add the support of parsing .debug_loclists.George Rimar2018-10-221-0/+168
| | | | | | | | | | | | This teaches llvm-dwarfdump to dump the content of .debug_loclists sections. It converts the DWARFDebugLocDWO class to DWARFDebugLoclists, teaches llvm-dwarfdump about .debug_loclists section and adds the implementation for parsing the DW_LLE_offset_pair entries. Differential revision: https://reviews.llvm.org/D53364 llvm-svn: 344895
* DebugInfo: Use base address specifiers more aggressivelyDavid Blaikie2018-10-201-11/+22
| | | | | | | | | | Using a base address specifier even for a single-element range is a size win for object files (7 words versus 8 words - more significant savings if the debug info is compressed (since it's 3 words of uncompressable reloc + 4 compressable words compared to 6 uncompressable reloc + 2 compressable words) - does trade off executable size increase though. llvm-svn: 344841
* DebugInfo: Use DW_OP_addrx in DWARFv5David Blaikie2018-10-201-0/+27
| | | | | | Reuse addresses in the address pool, even in non-split cases. llvm-svn: 344838
* DebugInfo: Implement debug_rnglists.dwoDavid Blaikie2018-10-201-0/+78
| | | | | | | Save space/relocations in .o files by keeping dwo ranges in the dwo file rather than the .o file. llvm-svn: 344837
* DebugInfo: Use address pool forms in debug_rnglistsDavid Blaikie2018-10-203-14/+17
| | | | | | Save no relocations by reusing addresses from the address pool. llvm-svn: 344836
* DebugInfo: Use debug_addr for non-dwo addresses in DWARF 5David Blaikie2018-10-202-1/+3
| | | | | | | | Putting addresses in the address pool, even with non-fission, can reduce relocations - reusing the addresses from debug_info and debug_rnglists (the latter coming soon) llvm-svn: 344834
* [DWARF] Make llvm-dwarfdump display location lists in a .dwp file correctly. ↵Wolfgang Pieb2018-10-192-0/+94
| | | | | | | | | | | | | Fixes PR38990. Considers the index when extracting location lists from a .dwp file. Majority of the patch by David Blaikie. Reviewers: dblaikie Differential revision: https://reviews.llvm.org/D53155 llvm-svn: 344807
* [dwarfdump] Hide ranges in diff-mode.Jonas Devlieghere2018-10-191-0/+10
| | | | | | | | | llvm-dwarfdump --diff should not print DW_AT_ranges. This patch fixes that. Differential revision: https://reviews.llvm.org/D53353 llvm-svn: 344794
* [mips][micromips] Fix overlaping FDEs errorAleksandar Beserminji2018-10-151-0/+38
| | | | | | | | | | | | | | When compiling static executable for micromips, CFI symbols are incorrectly labeled as MICROMIPS, which cause ".eh_frame_hdr refers to overlapping FDEs." error. This patch does not label CFI symbols as MICROMIPS, and FDEs do not overlap anymore. This patch also exposes another bug, which is fixed here: https://reviews.llvm.org/D52985 Differential Revision: https://reviews.llvm.org/D52987 llvm-svn: 344516
* [mips][micromips] Revert "Fix overlaping FDEs error"Aleksandar Beserminji2018-10-151-38/+0
| | | | | | This reverts r344511. llvm-svn: 344515
* [mips][micromips] Fix overlaping FDEs errorAleksandar Beserminji2018-10-151-0/+38
| | | | | | | | | | | | | | When compiling static executable for micromips, CFI symbols are incorrectly labeled as MICROMIPS, which cause ".eh_frame_hdr refers to overlapping FDEs." error. This patch does not label CFI symbols as MICROMIPS, and FDEs do not overlap anymore. This patch also exposes another bug, which is fixed here: https://reviews.llvm.org/D52985 Differential Revision: https://reviews.llvm.org/D52987 llvm-svn: 344511
* [codeview] Emit S_BUILDINFO and LF_BUILDINFO with cwd and source fileReid Kleckner2018-10-121-0/+39
| | | | | | | | | | | | Summary: We can fill in the command line and compiler path later if we want. Reviewers: zturner Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D53179 llvm-svn: 344393
* Revert "DwarfDebug: Pick next location in case of missing location at block ↵Matthias Braun2018-10-116-83/+11
| | | | | | | | | | | | | | | begin" It originally triggered a stepping problem in the debugger, which could be fixed by adjusting CodeGen/LexicalScopes.cpp however it seems we prefer the previous behavior anyway. See the discussion for details: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20181008/593833.html This reverts commit r343880. This reverts commit r343874. llvm-svn: 344318
* [PDB] Fix another bug in globals stream name lookup.Zachary Turner2018-10-093-20/+45
| | | | | | | | When we're on the last bucket the computation is tricky. We were failing when the last bucket contained multiple matches. Added a new test for this. llvm-svn: 344081
* [PDB] fix a bug in global stream name lookup.Zachary Turner2018-10-081-0/+12
| | | | | | | When we're looking up a record in the last hash bucket chain, we need to be careful with the end-offset calculation. llvm-svn: 344001
* [DebugInfo] Fix debug information label testsPetar Jovanovic2018-10-082-3/+3
| | | | | | | | | | | | | | | | Remove the space in the asm check so that the expression is more general and can also capture MIPS labels which can be surrounded by braces, e.g.: .4byte ($tmp1) # DW_AT_low_pc Also change optimization level to O0 because the DW_TAG_label does not appear on MIPS when -O2 is used. Patch by Milos Stojanovic. Differential Revision: https://reviews.llvm.org/D52901 llvm-svn: 343999
* Don't use back-quotes in a run line.Zachary Turner2018-10-081-4/+0
| | | | | | | | | | | This works on Windows, but seems to be breaking tests that use an external shell (e.g. bash) because backquote has special meaning. This particular argument wasn't crucial for the test, so I've just removed it. llvm-svn: 343971
* [PDB] Add the ability to lookup global symbols by name.Zachary Turner2018-10-081-0/+22
| | | | | | | | | | The Globals table is a hash table keyed on symbol name, so it's possible to lookup symbols by name in O(1) time. Add a function to the globals stream to do this, and add an option to llvm-pdbutil to exercise this, then use it to write some tests to verify correctness. llvm-svn: 343951
* X86, AArch64, ARM: Do not attach debug location to spill/reload instructionsMatthias Braun2018-10-052-2/+3
| | | | | | | | | | | | | | This rebases and recommits r343520. hwasan should be fixed now and this shouldn't break the tests anymore. Spill/reload instructions are artificially generated by the compiler and have no relation to the original source code. So the best thing to do is not attach any debug location to them (instead of just taking the next debug location we find on following instructions). Differential Revision: https://reviews.llvm.org/D52125 llvm-svn: 343895
* Specify -mtriple=x86_64 in an X86-specific dwarf testVedant Kumar2018-10-051-2/+2
| | | | | | | | | | | | | | | On the PPC bot, the %llc_dwarf substitution does not contain an -mtriple argument. This can cause the wrong backend to be exercised. This causes issues because the backends differ in when they decide to emit tail calls: http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/12440 This is mostly a speculative fix as I don't have a PPC machine to test with. llvm-svn: 343893
* [LiveDebugValues] Extend var ranges through artificial blocksVedant Kumar2018-10-051-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | ASan often introduces basic blocks consisting exclusively of instructions without debug locations, or with line 0 debug locations. LiveDebugValues needs to extend variable ranges through these artificial blocks. Otherwise, a lot of variables disappear -- even at -O0. Typically, LiveDebugValues does not extend a variable's range into a block unless the block is essentially "part of" the variable's scope (for a precise definition, see LexicalScopes::dominates). This patch relaxes the lexical dominance check for artificial blocks. This makes the following Swift program debuggable at -O0: ``` 1| var x = 100 2| print("x = \(x)") ``` rdar://39127144 Differential Revision: https://reviews.llvm.org/D52921 llvm-svn: 343890
* Disable the dwarf callsite attrs test on WindowsVedant Kumar2018-10-051-0/+4
| | | | | | | | The Windows formats don't understand relocations inside of AT_return_pc. http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/270 llvm-svn: 343888
* Avoid hardcoding PC addresses in a dwarf testVedant Kumar2018-10-051-4/+4
| | | | | | | | The PCs appear to vary from builder-to-builder: http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/20053 llvm-svn: 343886
* [DebugInfo] Add support for DWARF5 call site-related attributesVedant Kumar2018-10-052-0/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DWARF v5 introduces DW_AT_call_all_calls, a subprogram attribute which indicates that all calls (both regular and tail) within the subprogram have call site entries. The information within these call site entries can be used by a debugger to populate backtraces with synthetic tail call frames. Tail calling frames go missing in backtraces because the frame of the caller is reused by the callee. Call site entries allow a debugger to reconstruct a sequence of (tail) calls which led from one function to another. This improves backtrace quality. There are limitations: tail recursion isn't handled, variables within synthetic frames may not survive to be inspected, etc. This approach is not novel, see: https://gcc.gnu.org/wiki/summit2010?action=AttachFile&do=get&target=jelinek.pdf This patch adds an IR-level flag (DIFlagAllCallsDescribed) which lowers to DW_AT_call_all_calls. It adds the minimal amount of DWARF generation support needed to emit standards-compliant call site entries. For easier deployment, when the debugger tuning is LLDB, the DWARF requirement is adjusted to v4. Testing: Apart from check-{llvm, clang}, I built a stage2 RelWithDebInfo clang binary. Its dSYM passed verification and grew by 1.4% compared to the baseline. 151,879 call site entries were added. rdar://42001377 Differential Revision: https://reviews.llvm.org/D49887 llvm-svn: 343883
* Fix dwarf-no-source-loc.ll path separator on WindowsReid Kleckner2018-10-051-1/+1
| | | | llvm-svn: 343880
* DwarfDebug: Pick next location in case of missing location at block beginMatthias Braun2018-10-056-11/+83
| | | | | | | | | | | | | | | | | Context: Compiler generated instructions do not have a debug location assigned to them. However emitting 0-line records for all of them bloats the line tables for very little benefit so we usually avoid doing that. Not emitting anything will lead to the previous debug location getting applied to the locationless instructions. This is not desirable for block begin and after labels. Previously we would emit simply emit line-0 records in this case, this patch changes the behavior to do a forward search for a debug location in these cases before emitting a line-0 record to further reduce line table bloat. Inspired by the discussion in https://reviews.llvm.org/D52862 llvm-svn: 343874
* Emit template type and value parameter DIEs for template variables.Matthew Voss2018-10-031-57/+77
| | | | | | | | | | | | | | | | | | | Summary: Ensure the TemplateParam attribute of the DIGlobalVariable node is translated into the proper DIEs. Resolves https://bugs.llvm.org/show_bug.cgi?id=22119 Reviewers: dblaikie, probinson, aprantl, JDevlieghere, clayborg, whitequark, deadalnix Reviewed By: dblaikie Subscribers: llvm-commits Tags: #debug-info Differential Revision: https://reviews.llvm.org/D52057 llvm-svn: 343706
* Relax dbg-declare-inalloca.ll test moreReid Kleckner2018-10-021-1/+1
| | | | | | | We don't need to match the precise type index number here. It's not important. The type name is what matters to make this test useful. llvm-svn: 343642
* [CodeView] Try fixing DebugInfo/X86/dbg-declare-inalloca.llFangrui Song2018-10-021-1/+2
| | | | llvm-svn: 343639
* [CodeView] Only add the Scoped flag for an enum type when it has an ↵Aaron Smith2018-10-021-0/+179
| | | | | | | | | | | | immediate function scope to match MSVC Reviewers: rnk, zturner, llvm-commits Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D52706 llvm-svn: 343627
* [CodeView] Emit function options for subprogram and member functionsAaron Smith2018-10-022-6/+590
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Use the newly added DebugInfo (DI) Trivial flag, which indicates if a C++ record is trivial or not, to determine Codeview::FunctionOptions. Clang and MSVC generate slightly different Codeview for C++ records. For example, here is the C++ code for a class with a defaulted ctor, class C { public: C() = default; }; Clang will produce a LF for the defaulted ctor while MSVC does not. For more details, refer to FIXMEs in the test cases in "function-options.ll" included with this set of changes. Reviewers: zturner, rnk, llvm-commits, aleksandr.urakov Reviewed By: rnk Subscribers: Hui, JDevlieghere Differential Revision: https://reviews.llvm.org/D45123 llvm-svn: 343626
OpenPOWER on IntegriCloud