summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Dwarf.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Macro debug info support in LLVM IRAmjad Aboud2015-12-101-0/+10
| | | | | | | | Introduced DIMacro and DIMacroFile debug info metadata in the LLVM IR to support macros. Differential Revision: http://reviews.llvm.org/D14687 llvm-svn: 255245
* dwarfdump: Added macro support to llvm-dwarfdump tool.Amjad Aboud2015-11-121-0/+1
| | | | | | | | Added "macro" option to "-debug-dump" flag, which trigger parsing and dumping of the ".debug_macinfo" section. Differential Revision: http://reviews.llvm.org/D14294 llvm-svn: 252866
* Support: Recognize Borland DWARF extensions.Dawn Perchik2015-11-111-0/+25
| | | | | | | | | | | This patch adds DWARF values for the Delphi language and Borland C++ language extensions. Reviewed by: dblaikie Subscribers: llvm-commits, majnemer Differential Revision: http://reviews.llvm.org/D14522 llvm-svn: 252776
* Emit discriminator for inlined callsites.Dehao Chen2015-11-111-0/+1
| | | | | | | | | | | | Summary: Inlined callsites need to be emitted in debug info so that sample profile can be annotated to the correct inlined instance. Reviewers: dnovillo, dblaikie Subscribers: dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D14511 llvm-svn: 252768
* Debug info: Add dwarf backend support for DIModule.Adrian Prantl2015-06-301-0/+3
| | | | | | rdar://problem/20965932 llvm-svn: 241034
* [DWARF parser] Add basic support for DWZ DWARF multifile extensions.Alexey Samsonov2015-05-191-0/+4
| | | | | | | | | | | | | | | | | | | | | This change implements basic support for DWARF alternate sections proposal: http://www.dwarfstd.org/ShowIssue.php?issue=120604.1&type=open LLVM tools now understand new forms: DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt, which are used as references to .debug_info and .debug_str sections respectively, stored in a separate file, and possibly shared between different executables / shared objects. llvm-dwarfdump and llvm-symbolizer don't yet know how to access this alternate debug file (usually pointed by .gnu_debugaltlink section), but they can at lease properly parse and dump regular files, which refer to it. This change should fix crashes of llvm-dwarfdump and llvm-symbolizer on files produced by running "dwz" tool. Such files are already installed on some modern Linux distributions. llvm-svn: 237721
* Support: Add dwarf::getOperationEncoding()Duncan P. N. Exon Smith2015-02-131-0/+7
| | | | llvm-svn: 229001
* Support: Rewrite LocationAtom and OperationEncodingString(), NFCDuncan P. N. Exon Smith2015-02-131-162/+5
| | | | | | Use `Dwarf.def` more. llvm-svn: 229000
* Support: Add dwarf::getVirtuality()Duncan P. N. Exon Smith2015-02-071-0/+8
| | | | llvm-svn: 228474
* Support: Use Dwarf.def for DW_VIRTUALITY, NFCDuncan P. N. Exon Smith2015-02-071-4/+6
| | | | | | | Use definition file for `DW_VIRTUALITY_*`. Add a `DW_VIRTUALITY_max` both for ease of testing and for future use by the `LLParser`. llvm-svn: 228473
* Support: Add dwarf::getAttributeEncoding()Duncan P. N. Exon Smith2015-02-061-0/+7
| | | | llvm-svn: 228470
* Support: Rewrite AttributeEncodingString(), NFCDuncan P. N. Exon Smith2015-02-061-17/+5
| | | | llvm-svn: 228469
* Support: Stop stringifying DW_ATE_{lo,hi}_userDuncan P. N. Exon Smith2015-02-061-2/+0
| | | | llvm-svn: 228468
* Support: Add dwarf::getLanguage()Duncan P. N. Exon Smith2015-02-061-0/+7
| | | | llvm-svn: 228458
* Support: Rewrite dwarf::LanguageString(), NFCDuncan P. N. Exon Smith2015-02-061-29/+6
| | | | llvm-svn: 228457
* Support: Stop stringifying DW_LANG_{lo,hi}_userDuncan P. N. Exon Smith2015-02-061-2/+0
| | | | llvm-svn: 228451
* Support: Add string => unsigned mapping for DW_TAGDuncan P. N. Exon Smith2015-02-031-0/+8
| | | | | | Add `dwarf::getTag()` to translate from `StringRef` to `unsigned`. llvm-svn: 228031
* Support: Re-implement dwarf::TagString() using a .def file, NFCDuncan P. N. Exon Smith2015-02-031-78/+5
| | | | | | | | | Also re-implements the `dwarf::Tag` enumerator. I've moved the mock tags into the enumerator since there's no other way to do this. Really they shouldn't be used at all (they're just a hack to identify `MDNode`s, but we have a class hierarchy for that now). llvm-svn: 228030
* Support: Stop stringifying DW_TAG_{lo,hi}_userDuncan P. N. Exon Smith2015-02-031-2/+0
| | | | | | | | `dwarf::TagString()` shouldn't stringify `DW_TAG_lo_user` or `DW_TAG_hi_user`. These aren't actual tags; they're markers for the edge of vendor-specific tag regions. llvm-svn: 228029
* Modernize doxygen comments in Support/Dwarf.hFrederic Riss2014-10-231-45/+0
| | | | | | | | | | In post-commit review of r219442, Rafael pointed out that the comment style of the newly introduced helper didn't follow LLVM's coding standard. Modernize the whole file to the new standards. Differential Revision: http://reviews.llvm.org/D5918 llvm-svn: 220467
* Add ApplePropertyString dump helper to Dwarf.{h|cpp}.Frederic Riss2014-10-091-0/+33
| | | | | | | | | | Reviewers: dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5688 llvm-svn: 219442
* 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
OpenPOWER on IntegriCloud