summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Dwarf.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move the complex address expression out of DIVariable and into an extraAdrian Prantl2014-10-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument of the llvm.dbg.declare/llvm.dbg.value intrinsics. Previously, DIVariable was a variable-length field that has an optional reference to a Metadata array consisting of a variable number of complex address expressions. In the case of OpPiece expressions this is wasting a lot of storage in IR, because when an aggregate type is, e.g., SROA'd into all of its n individual members, the IR will contain n copies of the DIVariable, all alike, only differing in the complex address reference at the end. By making the complex address into an extra argument of the dbg.value/dbg.declare intrinsics, all of the pieces can reference the same variable and the complex address expressions can be uniqued across the CU, too. Down the road, this will allow us to move other flags, such as "indirection" out of the DIVariable, too. The new intrinsics look like this: declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr) declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr) This patch adds a new LLVM-local tag to DIExpressions, so we can detect and pretty-print DIExpression metadata nodes. What this patch doesn't do: This patch does not touch the "Indirect" field in DIVariable; but moving that into the expression would be a natural next step. http://reviews.llvm.org/D4919 rdar://problem/17994491 Thanks to dblaikie and dexonsmith for reviewing this patch! Note: I accidentally committed a bogus older version of this patch previously. llvm-svn: 218787
* Revert r218778 while investigating buldbot breakage.Adrian Prantl2014-10-011-2/+0
| | | | | | "Move the complex address expression out of DIVariable and into an extra" llvm-svn: 218782
* Move the complex address expression out of DIVariable and into an extraAdrian Prantl2014-10-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument of the llvm.dbg.declare/llvm.dbg.value intrinsics. Previously, DIVariable was a variable-length field that has an optional reference to a Metadata array consisting of a variable number of complex address expressions. In the case of OpPiece expressions this is wasting a lot of storage in IR, because when an aggregate type is, e.g., SROA'd into all of its n individual members, the IR will contain n copies of the DIVariable, all alike, only differing in the complex address reference at the end. By making the complex address into an extra argument of the dbg.value/dbg.declare intrinsics, all of the pieces can reference the same variable and the complex address expressions can be uniqued across the CU, too. Down the road, this will allow us to move other flags, such as "indirection" out of the DIVariable, too. The new intrinsics look like this: declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr) declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr) This patch adds a new LLVM-local tag to DIExpressions, so we can detect and pretty-print DIExpression metadata nodes. What this patch doesn't do: This patch does not touch the "Indirect" field in DIVariable; but moving that into the expression would be a natural next step. http://reviews.llvm.org/D4919 rdar://problem/17994491 Thanks to dblaikie and dexonsmith for reviewing this patch! llvm-svn: 218778
* Reapply "[dwarfdump] Add missing DW_LANG_Mips_Assembler case to ↵Frederic Riss2014-09-051-0/+1
| | | | | | | | LanguageString()" This commit was reverted in r217183, but is OK to go in again now that its dependency is commited (as of r217186). llvm-svn: 217231
* [ dwarfdump ] Add symbolic dump of known DWARF attribute values.Frederic Riss2014-09-041-0/+31
| | | | | | | | | | Reviewed By: dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5187 llvm-svn: 217186
* Revert "[dwarfdump] Add missing DW_LANG_Mips_Assembler case to LanguageString()"Frederic Riss2014-09-041-1/+0
| | | | | | | | This reverts commit 93c7e6161e1adbd2c7ac81fa081823183035cb64. This commit got approved first, but was dependant on another one going in (The one pretty printing attribute values). I'll reapply when the other one is in. llvm-svn: 217183
* [dwarfdump] Add missing DW_LANG_Mips_Assembler case to LanguageString()Frederic Riss2014-09-041-0/+1
| | | | | | | | | | Reviewed By: dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5193 llvm-svn: 217182
* [C++11] Make use of 'nullptr' in the Support library.Craig Topper2014-04-071-22/+22
| | | | llvm-svn: 205697
* Dwarf: Fix a copy-paste bug.Benjamin Kramer2013-12-221-1/+1
| | | | | | This tag isn't emitted by any compiler at the moment. PR18306. llvm-svn: 197877
* Pull in a couple of new constants from the upcoming DWARF 5 standard.Adrian Prantl2013-12-181-0/+21
| | | | llvm-svn: 197611
* Formally added an explicit enum for DWARF TLS support. No functionality change.Richard Mitton2013-10-071-3/+4
| | | | llvm-svn: 192118
* DebugInfo: GDBIndexEntry*String conversion functions now return const char* ↵David Blaikie2013-09-201-2/+2
| | | | | | | | | for easy llvm::formating This was previously invoking UB by passing a user-defined type to format. Thanks to Jordan Rose for pointing this out. llvm-svn: 191060
* DebugInfo: Improve IR annotation comments for GNU pubthings.David Blaikie2013-09-191-0/+34
| | | | llvm-svn: 191043
* Unshift the GDB index/GNU pubnames constants modified in r191025David Blaikie2013-09-191-23/+0
| | | | | | | | | | | | Based on code review feedback from Eric Christopher, unshifting these constants as they can appear in the gdb_index itself, shifted a further 24 bits. This means that keeping them preshifted is a bit inflexible, so let's not do that. Given the motivation, wrap up some nicer enums, more type safety, and some utility functions. llvm-svn: 191035
* Add constant defines for gnu pubnames and gnu pubtypes - they're usedEric Christopher2013-09-091-0/+23
| | | | | | for the gdb index as the names convey. llvm-svn: 190343
* Move accelerator table defines and constants to Dwarf.h sinceEric Christopher2013-09-051-0/+16
| | | | | | | | we're proposing it for DWARF5. No functional change intended. llvm-svn: 190074
* Formatting.Eric Christopher2013-09-051-2/+2
| | | | llvm-svn: 190019
* Add DW_AT_GNU_odr_signature to the set of dwarf attributes.Eric Christopher2013-07-141-0/+1
| | | | llvm-svn: 186296
* Previously, parsing capability of the .debug_frame section was addedEli Bendersky2013-02-211-0/+1
| | | | | | | | | | | | | | | | to lib/DebugInfo, with dumping in llvm-dwarfdump. This patch adds initial ability to parse and dump CFA instructions contained in entries. To keep it manageable, the patch omits some more advanced capabilities (accounted in TODOs): * Parsing of instructions with BLOCK arguments (expression lists) * Dumping of actual instruction arguments (currently only names are dumped). This is quite tricky since the dumper has to effectively "interpret" the instructions. llvm-svn: 175820
* Remove the llvm-local DW_TAG_vector_type tag and add a test toEric Christopher2013-01-081-1/+0
| | | | | | make sure that vector types do work. llvm-svn: 171833
* Remove what appears to be a dead llvm-specific debug tag.Eric Christopher2013-01-081-1/+0
| | | | llvm-svn: 171821
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-1/+1
| | | | | | single attribute in the future. llvm-svn: 170502
* Add support for fission attributes/forms/operations -> string.Eric Christopher2012-11-301-0/+16
| | | | llvm-svn: 169056
* Lowercase the tag name to match the rest of dwarf.Eric Christopher2012-03-291-1/+1
| | | | llvm-svn: 153691
* Add new tag and an attribute to support debug info for objective-c property.Devang Patel2012-02-031-0/+2
| | | | llvm-svn: 149724
* Add some more DWARF extensions from:Nick Lewycky2011-09-151-0/+32
| | | | | | | 1. http://gcc.gnu.org/wiki/TemplateParmsDwarf 2. ftp://ftp.software.ibm.com/software/os390/czos/dwarf/mips_extensions.pdf llvm-svn: 139784
* Update Dwarf enums list for DWARF 4.Nick Lewycky2011-09-151-0/+16
| | | | | | Note that DW_TAG_rvalue_reference_type is officially 0x42, not 0x41. llvm-svn: 139779
* Add DW_ATE_UTF, which clang started using in my previous commit!Devang Patel2011-09-121-0/+1
| | | | llvm-svn: 139503
* Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.Devang Patel2011-05-121-1/+1
| | | | | | s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g llvm-svn: 131244
* Let Objective-C front-end identify class extension, in dwarf output, using ↵Devang Patel2011-05-121-0/+1
| | | | | | an attribute DW_AT_APPLE_objc_class_extension. llvm-svn: 131238
* Add DW_OP_bit_piece.Devang Patel2011-04-211-0/+1
| | | | llvm-svn: 129945
* Introduce support to encode Objective-C property information in debugging ↵Devang Patel2011-04-161-0/+4
| | | | | | information generated for an interface. llvm-svn: 129624
* Provide tag strings for llvm specific tags.Devang Patel2011-02-181-0/+4
| | | | llvm-svn: 125986
* Add the entire range of DW_OP_lit[0..31], DW_OP_reg[0..31], and Jason Molenda2010-06-171-212/+299
| | | | | | | | | DW_OP_breg[0..31] to Dwarf.h. Add "DW_" prefix to the llvm::dwarf::*String methods which did not already have them in Dwarf.cpp. llvm-svn: 106197
* Fix typo. add a test case.Devang Patel2010-04-191-1/+1
| | | | llvm-svn: 101812
* Add DW_AT_APPLE_omit_frame_ptr to encode -fomit-frame-pointer flag.Devang Patel2010-04-191-1/+2
| | | | llvm-svn: 101805
* Do not crash when .ll printing metadata that smells like debug info, but isn't.Chris Lattner2009-12-291-46/+23
| | | | llvm-svn: 92268
* fix indentation, fit in 80 cols.Chris Lattner2009-12-291-382/+382
| | | | llvm-svn: 92267
* fix .cpp file to not wrap the entire file in namespace blocks.Chris Lattner2009-12-291-30/+23
| | | | llvm-svn: 92250
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-21/+21
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-21/+22
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Add dumping support for DW_AT_APPLE_isa and DW_AT_APPLE_block.Mike Stump2009-05-141-0/+2
| | | | | | Radar 6867696 llvm-svn: 71750
* Fix whitespacing (space after switch).Mike Stump2009-05-131-21/+21
| | | | llvm-svn: 71738
* The debugger sometimes lookup dynamically in the runtime to find ivar info ↵Devang Patel2009-02-171-0/+2
| | | | | | | | of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF. Add support for two additional DWARF attributes to encode Objective-C runtime version number. llvm-svn: 64834
* Introduce two DWARF attribute extentions DW_AT_APPLE_optimized, ↵Devang Patel2009-01-231-0/+2
| | | | | | | | | | | | DW_AT_APPLE_flags. DW_AT_APPLE_optimized flag is set when a compile_unit is optimized. The debugger takes advantage of this information some way. DW_AT_APPLE_flags encodes command line options when certain env. variable is set. This is used by build engineers to track various gcc command lines used by by a project, irrespective of whether the project used makefile, Xcode or something else. llvm-gcc patch is next. llvm-svn: 62888
* Change TAG_ names to DW_TAG for gcc (testsuite) compatibility.Dale Johannesen2008-10-121-59/+59
| | | | llvm-svn: 57425
* Change Dwarf comments starting with AT_ to DW_AT_ toDale Johannesen2008-10-121-96/+96
| | | | | | match gcc. Helps with the testsuite. llvm-svn: 57410
* Remove uses of llvm/System/IncludeFile.h that are no longer needed.Dan Gohman2008-05-061-3/+0
| | | | llvm-svn: 50695
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Adding new Dwarf constants.Jim Laskey2006-08-211-0/+1
| | | | llvm-svn: 29798
OpenPOWER on IntegriCloud