Commit Graph

214 Commits

Author SHA1 Message Date
Eric Christopher 20b76a77c3 Turn these two options in to trinary state so that they can be
turned on and off separate from the platform if you're on darwin.

llvm-svn: 162487
2012-08-23 22:36:40 +00:00
Eric Christopher 4977f214d7 Add a flag to DwarfDebug to allow it to communicate whether or not
we're using the darwin old gdb compat mode for emitting dwarf.

llvm-svn: 162486
2012-08-23 22:36:36 +00:00
Eric Christopher b1b9451337 Temporarily revert c23b933d5f8be9b51a1d22e717c0311f65f87dcd. It's causing
failures in the debug testsuite and possibly PR13486.

llvm-svn: 161121
2012-08-01 18:19:01 +00:00
Eric Christopher 86ca9f9e11 Add a DW_AT_high_pc for CUs that are a single address range. Update
all tests accordingly.

Fixes PR13351.

Patch by shinichiro hamaji!

llvm-svn: 160899
2012-07-27 22:00:05 +00:00
Alexey Samsonov 6e7e6b646b Cleanup in DwarfDebug - fix a typo and remove two unused functions
llvm-svn: 159433
2012-06-29 16:04:14 +00:00
Bill Wendling e38859dc8e Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp and
include/llvm/Analysis/DebugInfo.h to include/llvm/DebugInfo.h.

The reasoning is because the DebugInfo module is simply an interface to the
debug info MDNodes and has nothing to do with analysis.

llvm-svn: 159312
2012-06-28 00:05:13 +00:00
Benjamin Kramer 0748008df5 Allocate the contents of DwarfDebug's StringMaps in a single big BumpPtrAllocator.
llvm-svn: 158265
2012-06-09 10:34:15 +00:00
Benjamin Kramer 71b197306e DwarfDebug: Store the filename/dirname pair as a zero-separated string in a stringmap, instead of using a highly inefficient std::map of a pair of std::strings.
llvm-svn: 152541
2012-03-11 14:56:26 +00:00
Eric Christopher e19f4cd066 Grammar.
llvm-svn: 151874
2012-03-02 01:57:55 +00:00
Chris Lattner 88fce10928 tidy up forward declarations.
llvm-svn: 149078
2012-01-26 20:44:57 +00:00
Eric Christopher 5223a57533 Remove the pubnames section, no one consumes it.
llvm-svn: 144169
2011-11-09 05:24:07 +00:00
Eric Christopher 8c7505f258 Remove unnecessary addition to API. Replace with something much simpler.
llvm-svn: 143925
2011-11-07 09:38:42 +00:00
Eric Christopher 4996c70034 Add the support code to enable the dwarf accelerator tables. Upcoming patches
to fix the types section (all types, not just global types), and testcases.

The code to do the final emission is disabled by default.

llvm-svn: 143923
2011-11-07 09:24:32 +00:00
Eric Christopher a7b6189071 Expose a way to get the beginning of the dwarf string section.
llvm-svn: 143920
2011-11-07 09:18:38 +00:00
Nick Lewycky d1ee7f8cf1 Don't emit a directory entry for the value in DW_AT_comp_dir, that is always
implied by directory index zero.

llvm-svn: 143570
2011-11-02 20:55:33 +00:00
Nick Lewycky d59c0cac6c Teach our Dwarf emission to use the string pool.
llvm-svn: 143097
2011-10-27 06:44:11 +00:00
Eric Christopher fe15841044 Remove unused forward decl.
llvm-svn: 142892
2011-10-25 00:55:35 +00:00
Nick Lewycky ac4c1860a3 Missed a spot!
llvm-svn: 142436
2011-10-18 22:40:18 +00:00
Nick Lewycky 5ca33ac926 Fix some typo/formatting issues. No functionality change.
llvm-svn: 142435
2011-10-18 22:39:43 +00:00
Nick Lewycky 40f8f2ff24 Add support for a new extension to the .file directive:
.file filenumber "directory" "filename"

This removes one join+split of the directory+filename in MC internals. Because
bitcode files have independent fields for directory and filenames in debug info,
this patch may change the .o files written by existing .bc files.

llvm-svn: 142300
2011-10-17 23:05:28 +00:00
Devang Patel 0ecbcbd12c Eliminate unnecessary forwarding function.
llvm-svn: 138006
2011-08-18 23:17:55 +00:00
Devang Patel eb1bb4e419 Until now all debug info MDNodes referred to a root MDNode, a compile unit. This simplified handling of these needs in dwarf writer. However, one side effect of this is that during link time optimization all these MDNodes are _not_ uniqued. In other words there will be N number of MDNodes describing "int", "char" and all other types, which would suddenly grow when each object file starts using libraries like STL.
MDNodes graph structure such that compiler unit keeps track of important MDNodes and update dwarf writer to process mdnodes top-down instead of bottom up.

llvm-svn: 137778
2011-08-16 22:09:43 +00:00
Devang Patel 07bb9eea33 Refactor.
llvm-svn: 137689
2011-08-15 23:47:24 +00:00
Devang Patel 1f4f98d664 Continue to hoist uses of getCompileUnit() up. The goal is to get rid of uses of getCompileUnit().
llvm-svn: 137683
2011-08-15 23:36:40 +00:00
Devang Patel d2dfc5ec02 This is somewhat déjà-vu, but avoid using getCompileUnit() as much as possible.
llvm-svn: 137668
2011-08-15 22:24:32 +00:00
Devang Patel 3acc70e536 Refactor. Variables are part of compile unit so let CompileUnit create new variable.
llvm-svn: 137663
2011-08-15 22:04:40 +00:00
Devang Patel d899444347 There is no need to maintain a set to keep track of variables that use location expressions. In such cases, AT_location attribute's value will be a label.
llvm-svn: 137659
2011-08-15 21:43:21 +00:00
Devang Patel 900d97719b Fix warning.
llvm-svn: 137658
2011-08-15 21:35:16 +00:00
Devang Patel 3e4a965519 Simplify. Let DbgVariable keep track of variable's DBG_VALUE machine instruction.
llvm-svn: 137656
2011-08-15 21:24:36 +00:00
Devang Patel 99819b527d Simplify mapping to variable from its abstract variable info.
When a variable is inlined multiple places, abstract variable keeps name, location, type etc.. info and all other concreate instances of the variable directly refers to abstract variable.

llvm-svn: 137637
2011-08-15 19:01:20 +00:00
Devang Patel d7d80aadd1 Refactor.
llvm-svn: 137632
2011-08-15 18:40:16 +00:00
Devang Patel 6e4d2c9fb7 Refactor.
llvm-svn: 137631
2011-08-15 18:35:42 +00:00
Devang Patel 895437142a Refactor. A subprogram is part of compile unit so let CompileUnit construct new subprogram.
llvm-svn: 137618
2011-08-15 17:24:54 +00:00
Devang Patel 7e62302fae Start using LexicalScopes utility. No intetional functionality change.
llvm-svn: 137246
2011-08-10 20:55:27 +00:00
Devang Patel ddfe66e948 Refactor.
llvm-svn: 135633
2011-07-20 23:00:27 +00:00
Evan Cheng 67c033e6b8 Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions for
better location welcome).

llvm-svn: 135438
2011-07-18 22:29:13 +00:00
Devang Patel b7cc06366d Use DebugLoc directly to map inlined functions' instructions to respective lexical scope.
llvm-svn: 135302
2011-07-15 21:25:44 +00:00
Devang Patel f5f352dda5 Eliminate redundant map.
llvm-svn: 135278
2011-07-15 16:38:42 +00:00
Devang Patel 4771159f9f Refactor.
llvm-svn: 135212
2011-07-14 23:17:49 +00:00
Devang Patel 1f9913fdb2 Eliminate redundant LLVMContext argument.
Improve DbgScope->dump() output.

llvm-svn: 135207
2011-07-14 22:30:56 +00:00
Devang Patel 07d61edc30 Simplify and delay extracting DebugLoc elements, scope and InlinedAt, as much as possible.
llvm-svn: 135124
2011-07-14 01:14:57 +00:00
Devang Patel ed9fd45740 Make provision to have floating point constants in .debug_loc expressions.
llvm-svn: 134702
2011-07-08 16:49:43 +00:00
Devang Patel 324f843107 Do not drop constant values when a variable's content is described using .debug_loc entries.
llvm-svn: 132427
2011-06-01 22:03:25 +00:00
Devang Patel 34a6620748 Identify end of prologue (and beginning of function body) using DW_LNS_set_prologue_end line table opcode.
llvm-svn: 131194
2011-05-11 19:22:19 +00:00
Rafael Espindola a716096677 Dead code elimination.
llvm-svn: 130984
2011-05-06 14:56:22 +00:00
Devang Patel 3e021533cd Teach dwarf writer to handle complex address expression for .debug_loc entries.
This fixes clang generated blocks' variables' debug info.
Radar 9279956.

llvm-svn: 130373
2011-04-28 02:22:40 +00:00
Devang Patel f20c4f715f This mechanical patch moves type handling into CompileUnit from DwarfDebug. In case of multiple compile unit in one object file, each compile unit is responsible for its own set of type entries anyway. This refactoring makes this obvious.
llvm-svn: 129402
2011-04-12 22:53:02 +00:00
Devang Patel 4547a9e658 Remove dead typedef.
llvm-svn: 129368
2011-04-12 17:43:12 +00:00
Devang Patel d4e20eacf0 Refactor.
llvm-svn: 128929
2011-04-05 21:08:24 +00:00
Devang Patel e0cbe31ebb Remove dead code.
llvm-svn: 128639
2011-03-31 16:53:49 +00:00