summaryrefslogtreecommitdiff
path: root/test/DebugInfo
Commit message (Collapse)AuthorAge
* 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
* DebugInfo: regenerate test case from Clang to adjust for fixes/improvementsDavid Blaikie2013-11-01
| | | | | | | | | | | I hit some problems with future work due to the member subprogram of 'a_b's type having a subprogram (an implicit default ctor, !52 in the pre-commit source) with no name. Clang now generates a name for such a function but in this case doesn't even emit debug info for it as it is unused (Clang never emits the body of the ctor, instead just emitting memset if needed). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193892 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Improve readability of test case added in r193878David Blaikie2013-11-01
| | | | | | | | | The point is to ensure that the attribute in question (DW_AT_data_member_location) is associated with the prior tag, so ensure that we don't see another tag starting between the intended tag and the desired attribute. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193884 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: add a test case for data member locations (coverage for r193835)David Blaikie2013-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193878 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a test case broken by r193872David Blaikie2013-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193876 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Make pubnames header printing similar to unit header printingDavid Blaikie2013-11-01
| | | | | | | | | | | | | | | In a failed attempt to allow the gnu-public-names.ll test case to not hardcode the size of the unit that the pubnames section referred to I've at least managed to have unit headers and pubnames headers print out in a similar style. This failed to achieve the desired goal because the header in a unit specifies the length of the unit without the length element of the header whereas the length in the pubnames includes this element, so the numbers are off by 4 bytes. I don't know of any arithmetic powers in FileCheck so the test case can't simply say "CU_LENGTH + 4". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193872 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Emit member variable locations as data instead of expressions in ↵David Blaikie2013-11-01
| | | | | | | | | blocks Drive by space optimization. Also makes the DIEs more regular which might speed up DWARF parsing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193835 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: remove duplication of DIEs when a DIE can be shared across CUs.Manman Ren2013-10-31
| | | | | | | | | | | | | | | | | | | | We add a map in DwarfDebug to map MDNodes that are shareable across CUs to the corresponding DIEs: MDTypeNodeToDieMap. These DIEs can be shared across CUs, that is why we keep the maps in DwarfDebug instead of CompileUnit. We make the assumption that if a DIE is not added to an owner yet, we assume it belongs to the current CU. Since DIEs for the type system are added to their owners immediately after creation, and other DIEs belong to the current CU, the assumption should be true. A testing case is added to show that we only create a single DIE for a type MDNode and we use ref_addr to refer to the type DIE. We also add a testing case to show ref_addr relocations for non-darwin platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193779 91177308-0d34-0410-b5e6-96231b3b80d8
* Add DebugInfo testcase for high_pc encoded as constant, fixed in r193555.Will Dietz2013-10-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193711 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: instead of calling addToContextOwner which constructs the contextManman Ren2013-10-29
| | | | | | | | | | | | | | | | after the DIE creation, we construct the context first. Ensure that we create the context before we create a type so that we can add the newly created type to the parent. Remove last use of addToContextOwner now that it's not needed. We use createAndAddDIE to wrap around "new DIE(". Now all shareable DIEs should be added to their parents right after the creation. Reviewed off-list by Eric, Thanks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193657 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: clean up testing case.Manman Ren2013-10-29
| | | | | | | | | Add a tag before the name attribute for readability. Use CHECK-NEXT instead of CHECK-NOT followed by a CHECK. Add new lines to separate checking of different DIEs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193629 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: instead of calling addToContextOwner which constructs the contextManman Ren2013-10-29
| | | | | | | | | | | | | after the DIE creation, we construct the context first. This touches creation of namespaces and global variables. The purpose is to handle all DIE creations similarly: constructs the context first, then creates the DIE and immediately adds the DIE to its parent. We use createAndAddDIE to wrap around "new DIE(". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193589 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: use createAndAddDIE for newly-created Subprogram DIEs.Manman Ren2013-10-29
| | | | | | | | | | | | More patches will be submitted to convert "new DIE(" to use createAddAndDIE in DwarfCompileUnit.cpp. This will simplify implementation of addDIEEntry where we have to decide between ref4 and ref_addr, because DIEs that can be shared across CU will be added to a CU already. Reviewed off-list by Eric. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193567 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Hash DW_FORM_GNU_str_index as a string.David Blaikie2013-10-21
| | | | | | | | | | Found while adding type safety to the various DWARF enumerations (form, attribute, tag, etc) that caused Clang to warn on an incompletely covered switch. Converting the comment to a default/unreachable uncovered this case of an unsupported form encoding. Seems we were skipping fission strings entirely. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193089 91177308-0d34-0410-b5e6-96231b3b80d8
* Changing DebugInfoFinder to iterate over all the compile units.Michael Kuperstein2013-10-17
| | | | | | | | Solves http://llvm.org/bugs/show_bug.cgi?id=17507 Committed on behalf of alon.mishne@intel.com git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192879 91177308-0d34-0410-b5e6-96231b3b80d8
* According to the dwarf standard pubnames and pubtypes for languagesEric Christopher2013-10-17
| | | | | | | | | | | like C++ should be the fully qualified names for the type. Add a routine that does a language specific context walk to build up the qualified name and use it when we add types/names to the tables. Expand the gnu pubnames testcase as it's the most complex to make sure that qualified types are also being added. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192865 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the subprogram DIEs to the context they're created with onlyEric Christopher2013-10-17
| | | | | | | if they're a declaration, otherwise they're owned by the compile unit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192861 91177308-0d34-0410-b5e6-96231b3b80d8