summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove more dead code.Rafael Espindola2013-05-111-3/+0
| | | | llvm-svn: 181656
* Debug Info: Support DW_TAG_imported_declarationDavid Blaikie2013-05-081-1/+3
| | | | | | | | | | | | | | This provides basic functionality for imported declarations. For subprograms and types some amount of lazy construction is supported (so the definition of a function can proceed the using declaration), but it still doesn't handle declared-but-not-defined functions (since we don't generally emit function declarations). Variable support is really rudimentary at the moment - simply looking up the existing definition with no support for out of order (declaration, imported_module, then definition). llvm-svn: 181392
* Finish renaming constructImportedModuleDIE to constructImportedEntityDIEDavid Blaikie2013-05-081-5/+5
| | | | llvm-svn: 181391
* Pass the MDNode in and do the insertion at compile unit creation timeEric Christopher2013-05-081-3/+2
| | | | | | instead of relying upon an extra call to finish initializing. llvm-svn: 181383
* Rename DIImportedModule to DIImportedEntity and allow imported declarationsDavid Blaikie2013-05-071-13/+20
| | | | | | | | | DIBuilder::createImportedDeclaration isn't fully plumbed through (note, lacking in AsmPrinter/DwarfDebug support) but this seemed like a sufficiently useful division of code to make the subsequent patch(es) easier to follow. llvm-svn: 181364
* Debug Info: Fix for break due to r181271David Blaikie2013-05-071-0/+1
| | | | | | | | | Apparently we didn't keep an association of Compile Unit metadata nodes to DIEs so looking up that parental context failed & thus caused no DW_TAG_imported_modules to be emitted at the CU scope. Fix this by adding the mapping & sure up the test case to verify this. llvm-svn: 181339
* Fix the VS2010 build broken by r181271Timur Iskhodzhanov2013-05-071-1/+2
| | | | llvm-svn: 181296
* DebugInfo: Support imported modules in lexical blocksDavid Blaikie2013-05-061-3/+39
| | | | llvm-svn: 181271
* Temporarily revert "Change the informal convention of DBG_VALUE so that we ↵Adrian Prantl2013-04-301-6/+6
| | | | | | | | | | can express a" because it breaks some buildbots. This reverts commit 180816. llvm-svn: 180819
* Change the informal convention of DBG_VALUE so that we can express aAdrian Prantl2013-04-301-6/+6
| | | | | | | | | | | | register-indirect address with an offset of 0. It used to be that a DBG_VALUE is a register-indirect value if the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE is register-indirect if the first operand is a register and the second operand is an immediate. For plain registers use the combination reg, reg. rdar://problem/13658587 llvm-svn: 180816
* Use the target triple from the target machine rather than the moduleEric Christopher2013-04-271-1/+1
| | | | | | | | | | | | | | | | to determine whether or not we're on a darwin platform for debug code emitting. Solves the problem of a module with no triple on the command line and no triple in the module using non-gdb ok features on darwin. Fix up the member-pointers test to check the correct things for cross platform (DW_FORM_flag is a good prefix). Unfortunately no testcase because I have no ideas how to test something without a triple and without a triple in the module yet check precisely on two platforms. Ideas welcome. llvm-svn: 180660
* Cleanup and document MachineLocation.Adrian Prantl2013-04-261-1/+7
| | | | | | | | | | | | Clarify documentation and API to make the difference between register and register-indirect addressed locations more explicit. Put in a comment to point out that with the current implementation we cannot specify a register-indirect location with offset 0 (a breg 0 in DWARF). No functionality change intended. rdar://problem/13658587 llvm-svn: 180641
* Formatting.Eric Christopher2013-04-241-1/+1
| | | | llvm-svn: 180186
* Tidy.Eric Christopher2013-04-221-4/+6
| | | | llvm-svn: 180000
* Revert "Revert "PR14606: debug info imported_module support""David Blaikie2013-04-221-0/+22
| | | | | | | | | | This reverts commit r179840 with a fix to test/DebugInfo/two-cus-from-same-file.ll I'm not sure why that test only failed on ARM & MIPS and not X86 Linux, even though the debug info was clearly invalid on all of them, but this ought to fix it. llvm-svn: 179996
* Revert "PR14606: debug info imported_module support"Eric Christopher2013-04-191-22/+0
| | | | | | This reverts commit r179836 as it seems to have caused test failures. llvm-svn: 179840
* PR14606: debug info imported_module supportDavid Blaikie2013-04-191-0/+22
| | | | | | | | | | Adding another CU-wide list, in this case of imported_modules (since they should be relatively rare, it seemed better to add a list where each element had a "context" value, rather than add a (usually empty) list to every scope). This takes care of DW_TAG_imported_module, but to fully address PR14606 we'll need to expand this to cover DW_TAG_imported_declaration too. llvm-svn: 179836
* The .dwo section shouldn't contain the unrelocated values (andEric Christopher2013-04-091-13/+21
| | | | | | | | | | | therefore not at all) of the pc or statement list. We also don't need to emit the compilation dir so save so space and time and don't bother. Fix up the testcase accordingly and verify that we don't emit the attributes or the items that they use. llvm-svn: 179114
* DW_FORM_sec_offset should be a relocation on platforms that useEric Christopher2013-04-071-4/+13
| | | | | | | | | a relocation across sections. Do this for DW_AT_stmt list in the skeleton CU and check the relocations in the debug_info section. Add a FIXME for multiple CUs. llvm-svn: 178969
* Dwarf: use utostr on CUID to append to SmallString.Manman Ren2013-04-061-1/+1
| | | | | | | | | We used to do "SmallString += CUID", which is incorrect, since CUID will be truncated to a char. rdar://problem/13573833 llvm-svn: 178941
* Debug Info: revert 178722 for now.Manman Ren2013-04-041-8/+1
| | | | | | | | | | | | | There is a difference for FORM_ref_addr between DWARF 2 and DWARF 3+. Since Eric is against guarding DWARF 2 ref_addr with DarwinGDBCompat, we are still in discussion on how to handle this. The correct solution is to update our header to say version 4 instead of version 2 and update tool chains as well. rdar://problem/13559431 llvm-svn: 178806
* Debug Info: according to DWARF 2, FORM_ref_addr the same size as an address onManman Ren2013-04-041-1/+8
| | | | | | | | | | | the target system. It was hard-coded to 4 bytes before. I can't get llvm to generate a ref_addr on a reasonably sized testing case. rdar://problem/13559431 llvm-svn: 178722
* Remove ZeroOrMore from the option description. We don't need it here.Eric Christopher2013-04-031-1/+1
| | | | llvm-svn: 178623
* Use SmallVectorImpl instead of SmallVector at the uses.Eric Christopher2013-03-291-13/+13
| | | | llvm-svn: 178386
* Use 12 as the magic number for our abbreviation data and ourEric Christopher2013-03-291-4/+4
| | | | | | | die values. A lot of DIEs have 10 attributes in C++ code (example clang), none had more than 12. Seems like a good default. llvm-svn: 178366
* Move the construction of the skeleton compile unit after theEric Christopher2013-03-291-7/+8
| | | | | | entire original compile unit has been constructed. llvm-svn: 178365
* No functionality change. Use unreachable in getCUOffset.Manman Ren2013-03-131-1/+3
| | | | llvm-svn: 176963
* Debug Info: use DW_FORM_ref_addr instead of DW_FORM_ref4 if the referenced DIEManman Ren2013-03-121-3/+30
| | | | | | | | | | | | | | | | belongs to a different compile unit. DW_FORM_ref_addr should be used for cross compile-unit reference. When compiling a large application, we got a dwarfdump verification error where abstract_origin points to nowhere. This error can't be reproduced on any testing case in MultiSource. We may have other cases where we use DW_FORM_ref4 unconditionally. rdar://problem/13370501 llvm-svn: 176882
* Remove support for versioned debug info.David Blaikie2013-03-111-108/+24
| | | | | | | | | | | | | | | | | | | | | | | | Versioned debug info support has been a burden to maintain & also compromised current debug info verification by causing test cases testing old debug info to remain rather than being updated to the latest. It also makes it hard to add or change the metadata schema by requiring various backwards-compatibility in the DI* hierarchy. So it's being removed in preparation for new changes to the schema to tidy up old/unnecessary fields and add new fields needed for new debug info (well, new to LLVM at least). The more surprising part of this is the changes to DI*::Verify - this became necessary due to the changes to AsmWriter. AsmWriter was relying on the version test to decide which bits of metadata were actually debug info when printing the comment annotations. Without the version information the tag numbers were too common & it would print debug info on random metadata that happened to start with an integer that matched a tag number. Instead this change makes the Verify functions more precise (just adding "number of operands" checks - not type checking those operands yet) & relies on that to decide which metadata is debug info metadata. llvm-svn: 176838
* Debug Info: store the files and directories for each compile unit.Manman Ren2013-03-071-10/+25
| | | | | | | | | | | | | | We now emit a line table for each compile unit. To reduce the prologue size of each line table, the files and directories used by each compile unit are stored in std::map<unsigned, std::vector< > > instead of std::vector< >. The prologue for a lto'ed image can be as big as 93K. Duplicating 93K for each compile unit causes a huge increase of debug info. With this patch, each prologue will only emit the files required by the compile unit. rdar://problem/13342023 llvm-svn: 176605
* Use getSplitDebugFilename when constructing the skeleton cu andEric Christopher2013-02-221-4/+2
| | | | | | update testcase accordingly to give the correct name to the cu. llvm-svn: 175934
* Allow optionally generating pubnames section in DWARF info. IntroduceKrzysztof Parzyszek2013-02-121-1/+68
| | | | | | option "generate-dwarf-pubnames" to control it, set to "false" by default. llvm-svn: 174981
* Dwarf: do not use line_table_start in at_stmt_list since we do not always emit Manman Ren2013-02-091-1/+4
| | | | | | line table entries in assembly. llvm-svn: 174785
* "Clean up" line section symbol emission by emitting the sectionEric Christopher2013-02-071-7/+11
| | | | | | | syms before constructing the compile units so we're not emitting section references to sections not there already. llvm-svn: 174663
* Clean up multiple skeleton compile units if we have multiple compileEric Christopher2013-02-061-6/+4
| | | | | | units coming in. llvm-svn: 174548
* Remove some dead code.Eric Christopher2013-02-061-31/+0
| | | | llvm-svn: 174547
* Attempt to recover gdb bot after r174445.Manman Ren2013-02-061-0/+2
| | | | | | | | | Failure: undefined symbol 'Lline_table_start0'. Root-cause: we use a symbol subtraction to calculate at_stmt_list, but the line table entries are not dumped in the assembly. Fix: use zero instead of a symbol subtraction for Compile Unit 0. llvm-svn: 174479
* Dwarf: support for LTO where a single object file can have multiple line tablesManman Ren2013-02-051-2/+19
| | | | | | | | | We generate one line table for each compilation unit in the object file. Reviewed by Eric and Kevin. rdar://problem/13067005 llvm-svn: 174445
* Construct a skeleton cu for each compile unit in the module, not justEric Christopher2013-02-051-5/+8
| | | | | | for the first compile unit. llvm-svn: 174352
* Add support for emitting a stub DW_AT_GNU_dwo_id as part of theEric Christopher2013-02-051-1/+7
| | | | | | DWARF5 split dwarf proposal. llvm-svn: 174350
* [Dwarf] early exit to avoid creating dangling DIEsManman Ren2013-01-311-1/+6
| | | | | | | | | | | | We used to create children DIEs for a scope, then check whether ScopeDIE is null. If ScopeDIE is null, the children DIEs will be dangling. Other DIEs can link to those dangling DIEs, which are not emitted at all, causing dwarf error. The current testing case is 4k lines, from MultiSource/BenchMark/McCat/09-vor. rdar://problem/13071959 llvm-svn: 174084
* Fix comment.Eric Christopher2013-01-281-1/+1
| | | | llvm-svn: 173698
* Fix the assembly and dissassembly of DW_FORM_sec_offset. Found this byEric Christopher2013-01-171-4/+6
| | | | | | | | | changing both the string of the dwo_name to be correct and the type of the statement list. Testcases all around. llvm-svn: 172699
* Add the DW_AT_GNU_addr_base for the skeleton cu. Add support forEric Christopher2013-01-171-1/+5
| | | | | | | emitting the dwarf32 version of DW_FORM_sec_offset and correct disassembler support. llvm-svn: 172698
* Split address information for DWARF5 split dwarf proposal. This involvesEric Christopher2013-01-151-20/+65
| | | | | | | | | | | | | | | using the DW_FORM_GNU_addr_index and a separate .debug_addr section which stays in the executable and is fully linked. Sneak in two other small changes: a) Print out the debug_str_offsets.dwo section. b) Change form we're expecting the entries in the debug_str_offsets.dwo section to take from ULEB128 to U32. Add tests for all of this in the fission-cu.ll test. llvm-svn: 172578
* Last in the series of removing unnecessary '0' arguments forEric Christopher2013-01-091-5/+5
| | | | | | | address space. Reordered the EmitULEB128IntValue arguments to make this easier. llvm-svn: 171949
* These functions have default arguments of 0 for the last arg. UseEric Christopher2013-01-091-1/+1
| | | | | | them. llvm-svn: 171933
* These functions have default arguments of 0 for the last arg. UseEric Christopher2013-01-091-7/+5
| | | | | | them and add one where it seemed obvious that we wanted one. llvm-svn: 171932
* Move the string pools down into the units. No functional change.Eric Christopher2013-01-081-10/+9
| | | | llvm-svn: 171905
* Whitespace and 80-col.Eric Christopher2013-01-071-2/+3
| | | | llvm-svn: 171803
OpenPOWER on IntegriCloud