summaryrefslogtreecommitdiff
path: root/test/DebugInfo
Commit message (Collapse)AuthorAge
* Prototype of skeleton type units for fissionDavid Blaikie2014-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198851 91177308-0d34-0410-b5e6-96231b3b80d8
* DwarfDebug: Refactor out common skeleton construction code to be reused for ↵David Blaikie2014-01-09
| | | | | | type unit skeletons. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198846 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: reorder dwo sections to immediately proceed their non-dwo ↵David Blaikie2014-01-08
| | | | | | | | | equivalents This makes it easier to write a test that's mostly shared between fission and non-fission (using FileCheck's multiple prefix support). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198806 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit arange padding with a single directive.Benjamin Kramer2014-01-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198700 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Revert "Debug Info: Type Units: Simplify type hashing using ↵David Blaikie2014-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | IR-provided unique names."" This reverts commit r198398, thus reapplying r198397. I had accidentally introduced an endianness issue when applying the hash to the type unit. Using support::ulittle64_t in the reinterpret_cast in addDwarfTypeUnitType fixes this issue. Original commit message: Debug Info: Type Units: Simplify type hashing using IR-provided unique names. What's good for LTO metadata size problems ought to be good for non-LTO debug info size too, so let's rely on the same uniqueness in both cases. If it's insufficient for non-LTO for whatever reason (since we now won't be uniquing CU-local types or any C types - but these are likely to not be the most significant contributors to type bloat) we should consider a frontend solution that'll help both LTO and non-LTO alike, rather than using DWARF-level DIE-hashing that only helps non-LTO debug info size. It's also much simpler this way and benefits C++ even more since we can deduplicate lexically separate definitions of the same C++ type since they have the same mangled name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198436 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Debug Info: Type Units: Simplify type hashing using IR-provided ↵David Blaikie2014-01-03
| | | | | | | | | | | unique names." Reverting due to bot failure I won't have time to investigate until tomorrow. This reverts commit r198397. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198398 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: Type Units: Simplify type hashing using IR-provided unique names.David Blaikie2014-01-03
| | | | | | | | | | | | | | | | What's good for LTO metadata size problems ought to be good for non-LTO debug info size too, so let's rely on the same uniqueness in both cases. If it's insufficient for non-LTO for whatever reason (since we now won't be uniquing CU-local types or any C types - but these are likely to not be the most significant contributors to type bloat) we should consider a frontend solution that'll help both LTO and non-LTO alike, rather than using DWARF-level DIE-hashing that only helps non-LTO debug info size. It's also much simpler this way and benefits C++ even more since we can deduplicate lexically separate definitions of the same C++ type since they have the same mangled name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198397 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Reverting r193835 due to weirdness with Go..."David Blaikie2014-01-03
| | | | | | | | | | The cgo problem was that it wants dwarf2 which doesn't support direct constant encoding of the location. So let's add support for dwarf2 encoding (using a location expression) of data member locations. This reverts commit r198385. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198389 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting r193835 due to weirdness with Go...David Blaikie2014-01-03
| | | | | | | Apologies for the noise - we're seeing some Go failures with cgo interacting with Clang's debug info due to this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198385 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Debug info: Add enumerators to the __apple_names accelerator table."Adrian Prantl2014-01-02
| | | | | | | This reverts r197927 until the discussion on llvm-commits comes to a conclusion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198333 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r198208 and reapply:Eric Christopher2013-12-30
| | | | | | | | | | r198196: Use a pointer to keep track of the skeleton unit for each normal unit and construct it up front. r198199: Reapply r198196 with a fix to zero initialize the skeleton pointer. r198202: Fix aranges and split dwarf by ensuring that the symbol and relocation back to the compile unit from the aranges section is to the skeleton unit and not the one in the dwo. with a fix to use integer 0 for DW_AT_low_pc since the relocation to the text section symbol was causing issues with COFF. Accordingly remove addLocalLabelAddress and machinery since we're not currently using it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198222 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r198199 (and r198202). It broke 3 DebugInfo tests for targeting ↵NAKAMURA Takumi2013-12-30
| | | | | | | | | | | | | | i686-cygming. r198196: Use a pointer to keep track of the skeleton unit for each normal unit and construct it up front. r198199: Reapply r198196 with a fix to zero initialize the skeleton pointer. r198202: Fix aranges and split dwarf by ensuring that the symbol and relocation back to the compile unit from the aranges section is to the skeleton unit and not the one in the dwo. They could be reproducible with explicit target. llvm/lib/MC/WinCOFFObjectWriter.cpp:224: bool {anonymous}::COFFSymbol::should_keep() const: Assertion `Section->Number != -1 && "Sections with relocations must be real!"' failed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198208 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix aranges and split dwarf by ensuring that the symbol and relocationEric Christopher2013-12-30
| | | | | | | | | | | back to the compile unit from the aranges section is to the skeleton unit and not the one in the dwo. Do this by adding a method to grab a forwarded on local sym and local section by querying the skeleton if one exists and using that. Add a few tests to verify the relocations are back to the correct section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198202 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r198196 with a fix to zero initialize the skeleton pointer.Eric Christopher2013-12-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198199 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily revert "Use a pointer to keep track of the skeleton unit forEric Christopher2013-12-30
| | | | | | each normal unit" as it seems to be causing problems in the asan tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198197 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a pointer to keep track of the skeleton unit for each normal unitEric Christopher2013-12-30
| | | | | | | | | | | and construct it up front. Add address ranges at the end and a helper routine so that we're not needlessly using an indirction in the case of split dwarf. Update testcases according to the new ordering of attributes on the compile unit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198196 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-symbolizer: add --obj flag to specify a single object file that should ↵Alexey Samsonov2013-12-24
| | | | | | be symbolized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197988 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info: Add enumerators to the __apple_names accelerator table.Adrian Prantl2013-12-23
| | | | | | rdar://problem/11516681. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197927 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info: On ARM ensure that the data sections come before theAdrian Prantl2013-12-23
| | | | | | | | | (optional) DWARF sections, so compiling with -g does not result in different code being generated. rdar://problem/15623193 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197922 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extra check line that's failing on windows and not necessary atEric Christopher2013-12-20
| | | | | | the moment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197782 91177308-0d34-0410-b5e6-96231b3b80d8
* This test requires object emission.Eric Christopher2013-12-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197781 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for a CU to output a set of ranges for the CU. This is usefulEric Christopher2013-12-20
| | | | | | | | when you want to have the full list of addresses for a particular CU or when you have multiple modules linked together and can't depend upon the ordering of a single CU for begin/end ranges. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197776 91177308-0d34-0410-b5e6-96231b3b80d8
* move test back into the parent directory and add a REQUIRES: obj emission.Adrian Prantl2013-12-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197759 91177308-0d34-0410-b5e6-96231b3b80d8
* Move testcase to the appropriate X86 subdirectory.Adrian Prantl2013-12-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197701 91177308-0d34-0410-b5e6-96231b3b80d8
* add source in commentAdrian Prantl2013-12-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197642 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info: Implement (rvalue) reference qualifiers for C++11 non-staticAdrian Prantl2013-12-18
| | | | | | | | member functions. Paired commit with CFE. rdar://problem/15356637 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197613 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-13
| | | | | | | | | | | | | | | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. Recommitted as r197197 to reproduce the failure and reverted as r197199 Turns out there was unstable ordering in the type unit dumping code. Fixed by using MapVector in DWARFContext to store the debug_types comdat sections. Recommitted as r197210 with a fix to dumping and reverted as r197211 because I was a bit gun shy and thought I saw a failure that turned out to be unrelated. So here we go - once more with feeling! \o/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197275 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "DebugInfo: Move type units into the debug_types section with ↵David Blaikie2013-12-13
| | | | | | | | appropriate comdat grouping and type unit headers" This reverts commit r197210. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197211 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-13
| | | | | | | | | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. Recommitted as r197197 to reproduce the failure and reverted as r197199 Turns out there was unstable ordering in the type unit dumping code. Fixed by using MapVector in DWARFContext to store the debug_types comdat sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197210 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "DebugInfo: Move type units into the debug_types section with ↵David Blaikie2013-12-13
| | | | | | | | appropriate comdat grouping and type unit headers" This reverts commit r197197. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197199 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-13
| | | | | | | | | | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. This commit originally got jumbled up with another build-breaking commit and I can't find the failures I thought this caused anymore. Recommitting to hopefully get some clean buildbot results to work from. I have a sneaking suspicion there's unstable output in the comdat group output of MCStreamer... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197197 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "DebugInfo: Move type units into the debug_types section with ↵David Blaikie2013-12-11
| | | | | | | | | | | | appropriate comdat grouping and type unit headers" This reverts commit r197073. The test seems to be failing on some buildbots for unknown reasons. Reverting until I can figure that out. If anyone's got a reproduction (.s and .o together would be great) - I'd really appreciate it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197079 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-11
| | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197073 91177308-0d34-0410-b5e6-96231b3b80d8
* Update testcase for previous commit.Eric Christopher2013-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196857 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Ensure unit IDs (for non-skeletal units) match thein index in the ↵David Blaikie2013-12-06
| | | | | | | | | | | | | | | | | | | list This simplifies reasoning about the code and enables simple navigation from a skeleton to its full unit. (currently there are no type unit skeletons, so the skeleton list doesn't have the same ID == index property) Eventually we should get rid of this ID and just store the labels we need as the IDs are allowing this code to create difficult to manage/understand associations (loops over non-skeletal units are implicitly referencing their skeletal units during pub* emission, for example). It may be necessary to have some kind of skeleton->full unit association and a more direct pointer or similar device would be preferable than an index. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196600 91177308-0d34-0410-b5e6-96231b3b80d8
* Make these two tests resilient in the face of compile unit sizeEric Christopher2013-12-05
| | | | | | changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196444 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Improve test to use llvm-dwarfdumpDavid Blaikie2013-12-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196396 91177308-0d34-0410-b5e6-96231b3b80d8
* Test fix for r196394David Blaikie2013-12-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196395 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Type Units: Propagate the correct DW_AT_language into type units.David Blaikie2013-12-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196130 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Do not include variables only referenced by templates in aranges.David Blaikie2013-11-27
| | | | | | | | ARanges included even extern variables referenced by pointer non-type template parameters even though that variable isn't part of this compilation unit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195895 91177308-0d34-0410-b5e6-96231b3b80d8
* DwarfDebug: Include type units in accelerator tables.David Blaikie2013-11-26
| | | | | | | Since type units aren't in the CUMap, use the DwarfUnits list to iterate over units for tasks such as accelerator table building. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195776 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Update test case due to dumper improvements in r195698David Blaikie2013-11-26
| | | | | | | | | | The dumper was only dumping one pubtypes set and it was /always/ dumping one pubtypes set even when there were zero sets. Now that the dumper correctly dumps zero, one, or many sets, we can update this test case to test for the absolute absence of a set rather than a bogus/accidental zero-valued set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195706 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Avoid emitting pubtype entries for type DIEs that just indirect ↵David Blaikie2013-11-26
| | | | | | to a type unit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195698 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: update testing cases to specify the debug info version number.Manman Ren2013-11-22
| | | | | | | | | We are going to drop debug info without a version number or with a different version number, to make sure we don't crash when we see bitcode files with different debug info metadata format. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195504 91177308-0d34-0410-b5e6-96231b3b80d8
* In Dwarf 3 (and Dwarf 2) attributes whose value are offsets into aEric Christopher2013-11-21
| | | | | | | | | | | | | | | | | | | | | section use the form DW_FORM_data4 whilst in Dwarf 4 and later they use the form DW_FORM_sec_offset. This patch updates the places where such attributes are generated to use the appropriate form depending on the Dwarf version. The DIE entries affected have the following tags: DW_AT_stmt_list, DW_AT_ranges, DW_AT_location, DW_AT_GNU_pubnames, DW_AT_GNU_pubtypes, DW_AT_GNU_addr_base, DW_AT_GNU_ranges_base It also adds a hidden command line option "--dwarf-version=<uint>" to llc which allows the version of Dwarf to be generated to override what is specified in the metadata; this makes it possible to update existing tests to check the debugging information generated for both Dwarf 4 (the default) and Dwarf 3 using the same metadata. Patch (slightly modified) by Keith Walker! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195391 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Partial implementation of DWARF type units.David Blaikie2013-11-19
| | | | | | | | | | | | | | Emit DW_TAG_type_units into the debug_info section using compile unit headers. This is bogus/unusable by debuggers, but testable and provides more isolated review. Subsequent patches will include support for type unit headers and emission into the debug_types section, as well as comdat grouping the types based on their hash. Also the CompileUnit type will be renamed 'Unit' and relevant portions pulled out into respective CompileUnit and TypeUnit types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195166 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: support for emitting only the debug_types section using ↵David Blaikie2013-11-19
| | | | | | -debug-dump git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195063 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info: Let LowerDbgDeclare perfom the dbg.declare -> dbg.valueAdrian Prantl2013-11-18
| | | | | | | | | | lowering only for load/stores to scalar allocas. The resulting values confuse the backend and don't add anything because we can describe array-allocas with a dbg.declare intrinsic just fine. rdar://problem/15464571 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195052 91177308-0d34-0410-b5e6-96231b3b80d8
* For dwarf4 use the correct form for referencing debug_loc locations,Eric Christopher2013-11-16
| | | | | | | | | and update test cases accordingly. This doesn't affect the output dumped using llvm-dwarfdump, but readelf does now dump the debug_loc section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194898 91177308-0d34-0410-b5e6-96231b3b80d8
* Add addrspacecast instruction.Matt Arsenault2013-11-15
| | | | | | Patch by Michele Scandale! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194760 91177308-0d34-0410-b5e6-96231b3b80d8