aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/SourceLevelDebugging.rst
AgeCommit message (Collapse)AuthorFilesLines
2016-07-20[docs] Fixing Sphinx warnings to unclog the buildbotRenato Golin1-5/+5
Lots of blocks had "llvm" or "nasm" syntax types but either weren't following the syntax, or the syntax has changed (and sphinx hasn't keep up) or the type doesn't even exist (nasm?). Other documents had :options: what were invalid. I only removed those that had warnings, and left the ones that didn't, in order to follow the principle of least surprise. This is like this for ages, but the buildbot is now failing on errors. It may take a while to upgrade the buildbot's sphinx, if that's even possible, but that shouldn't stop us from getting docs updates (which seem down for quite a while). Also, we're not losing any syntax highlight, since when it doesn't parse, it doesn't colour. Ie. those blocks are not being highlighted anyway. I'm trying to get all docs in one go, so that it's easy to revert later if we do fix, or at least easy to know what's to fix. llvm-svn: 276109
2016-07-14Synchronize LLVM and clang's ObjCDeclSpec::ObjCPropertyAttributeKind.Adrian Prantl1-1/+7
This adds Clang-specific DWARF constants for nullability and ObjC class properties that are already generated by clang. This patch adds dwarfdump support and a more comprehensive testcase. <rdar://problem/27335745> llvm-svn: 275354
2016-06-07Add info to SourceLevelDebugging about CodeViewReid Kleckner1-5/+78
Adds some discussion of the nature of the format, and some developer docs on how to work with it in LLVM. llvm-svn: 272057
2016-04-01testcase gardening: update the emissionKind enum to the new syntax. (NFC)Adrian Prantl1-2/+2
llvm-svn: 265081
2016-02-12Fix minor error with debug info doc.Mark Lacey1-1/+1
Replace 'third' with 'fourth' in the description of the fourth argument. llvm-svn: 260656
2015-11-06docs: Document function-attached metadata and IR changes from r252219.Peter Collingbourne1-8/+7
llvm-svn: 252268
2015-09-12Fix typos.Bruce Mitchener1-1/+1
Summary: This fixes a variety of typos in docs, code and headers. Subscribers: jholewinski, sanjoy, arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D12626 llvm-svn: 247495
2015-08-28DI: Require subprogram definitions to be distinctDuncan P. N. Exon Smith1-1/+1
As a follow-up to r246098, require `DISubprogram` definitions (`isDefinition: true`) to be 'distinct'. Specifically, add an assembler check, a verifier check, and bitcode upgrading logic to combat testcase bitrot after the `DIBuilder` change. While working on the testcases, I realized that test/Linker/subprogram-linkonce-weak-odr.ll isn't relevant anymore. Its purpose was to check for a corner case in PR22792 where two subprogram definitions match exactly and share the same metadata node. The new verifier check, requiring that subprogram definitions are 'distinct', precludes that possibility. I updated almost all the IR with the following script: git grep -l -E -e '= !DISubprogram\(.* isDefinition: true' | grep -v test/Bitcode | xargs sed -i '' -e 's/= \(!DISubprogram(.*, isDefinition: true\)/= distinct \1/' Likely some variant of would work for out-of-tree testcases. llvm-svn: 246327
2015-08-06Update docs for accessing !dbg attachmentsDuncan P. N. Exon Smith1-6/+5
llvm-svn: 244238
2015-07-31DI: Remove DW_TAG_arg_variable and DW_TAG_auto_variableDuncan P. N. Exon Smith1-3/+3
Remove the fake `DW_TAG_auto_variable` and `DW_TAG_arg_variable` tags, using `DW_TAG_variable` in their place Stop exposing the `tag:` field at all in the assembly format for `DILocalVariable`. Most of the testcase updates were generated by the following sed script: find test/ -name "*.ll" -o -name "*.mir" | xargs grep -l 'DILocalVariable' | xargs sed -i '' \ -e 's/tag: DW_TAG_arg_variable, //' \ -e 's/tag: DW_TAG_auto_variable, //' There were only a handful of tests in `test/Assembly` that I needed to update by hand. (Note: a follow-up could change `DILocalVariable::DILocalVariable()` to set the tag to `DW_TAG_formal_parameter` instead of `DW_TAG_variable` (as appropriate), instead of having that logic magically in the backend in `DbgVariable`. I've added a FIXME to that effect.) llvm-svn: 243774
2015-05-14Fixed some typos and broken links in source level debugging docs.Michael Kuperstein1-10/+10
llvm-svn: 237357
2015-04-29IR: Give 'DI' prefix to debug info metadataDuncan P. N. Exon Smith1-35/+35
Finish off PR23080 by renaming the debug info IR constructs from `MD*` to `DI*`. The last of the `DIDescriptor` classes were deleted in r235356, and the last of the related typedefs removed in r235413, so this has all baked for about a week. Note: If you have out-of-tree code (like a frontend), I recommend that you get everything compiling and tests passing with the *previous* commit before updating to this one. It'll be easier to keep track of what code is using the `DIDescriptor` hierarchy and what you've already updated, and I think you're extremely unlikely to insert bugs. YMMV of course. Back to *this* commit: I did this using the rename-md-di-nodes.sh upgrade script I've attached to PR23080 (both code and testcases) and filtered through clang-format-diff.py. I edited the tests for test/Assembler/invalid-generic-debug-node-*.ll by hand since the columns were off-by-three. It should work on your out-of-tree testcases (and code, if you've followed the advice in the previous paragraph). Some of the tests are in badly named files now (e.g., test/Assembler/invalid-mdcompositetype-missing-tag.ll should be 'dicompositetype'); I'll come back and move the files in a follow-up commit. llvm-svn: 236120
2015-03-17docs: Update LangRef and SourceLevelDebuggingDuncan P. N. Exon Smith1-667/+108
Cleanup some bitrot in SourceLevelDebugging.rst. - Pull the still-relevant details about individual descriptors into LangRef.rst. Cut a lot of it to avoid over-describing the fields, as the C++ classes and assembly format are mostly self-describing now. If there's anything specific that I shouldn't have cut, let me know and I'll add it back. - Rewrite the remaining sections to refer to the new debug info hierarchy in LangRef.rst. llvm-svn: 232566
2015-02-09DebugInfo: Remove DW_TAG_constantDuncan P. N. Exon Smith1-1/+0
Remove handling for DW_TAG_constant. We started producing it in r110656, but reverted that in r110876 without dropping the support. Finish the job. llvm-svn: 228623
2014-10-08Update dwarf::ApplePropertyAttributes enum to meaningful values.Frederic Riss1-15/+27
Summary: We currently emit an DW_AT_APPLE_property_attribute with a value that is a bitfield describing the various attributes applied to an ObjectiveC property. While trying to add testing to one of my dwarfdump patches that would pretty print that, I realized this information looks totally broken and has maybe never been correct. As with every DWARF info, we have some enum in Dwarf.h that describes this attribute (enum ApplePropertyAttributes). It seems however that the attribute value is set from another definition of these flags in Sema/DeclSpec.h (enum ObjCPropertyAttributeKind). And these 2 enums aren't in sync. This patch updates the Dwarf.h values to the ones we are (and have been for a very long time) emitting. We change some publicly (and even documented in SourceLevelDebugging.rst) values, but I doubt this could be an issue as the information has been wrong for so long... Reviewers: echristo, dblaikie, aprantl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5653 llvm-svn: 219311
2014-10-04DI: Fixup global syntax in exampleDuncan P. N. Exon Smith1-1/+1
llvm-svn: 219056
2014-10-04DI: Line up comments in examplesDuncan P. N. Exon Smith1-27/+27
llvm-svn: 219055
2014-10-04DI: Fixup example IR from r219051Duncan P. N. Exon Smith1-3/+4
llvm-svn: 219054
2014-10-04DI: Prune another exampleDuncan P. N. Exon Smith1-62/+0
llvm-svn: 219053
2014-10-04DI: Update and prune metadata examplesDuncan P. N. Exon Smith1-502/+86
Update a couple of the examples of debug info metadata, and prune the rest. Point to the true reference implementation in the source. llvm-svn: 219051
2014-10-03Revert "Revert "DI: Fold constant arguments into a single MDString""Duncan P. N. Exon Smith1-90/+111
This reverts commit r218918, effectively reapplying r218914 after fixing an Ocaml bindings test and an Asan crash. The root cause of the latter was a tightened-up check in `DILexicalBlock::Verify()`, so I'll file a PR to investigate who requires the loose check (and why). Original commit message follows. -- This patch addresses the first stage of PR17891 by folding constant arguments together into a single MDString. Integers are stringified and a `\0` character is used as a separator. Part of PR17891. Note: I've attached my testcases upgrade scripts to the PR. If I've just broken your out-of-tree testcases, they might help. llvm-svn: 219010
2014-10-02Revert "DI: Fold constant arguments into a single MDString"Duncan P. N. Exon Smith1-111/+90
This reverts commit r218914 while I investigate some bots. llvm-svn: 218918
2014-10-02DI: Fold constant arguments into a single MDStringDuncan P. N. Exon Smith1-90/+111
This patch addresses the first stage of PR17891 by folding constant arguments together into a single MDString. Integers are stringified and a `\0` character is used as a separator. Part of PR17891. Note: I've attached my testcases upgrade scripts to the PR. If I've just broken your out-of-tree testcases, they might help. llvm-svn: 218914
2014-10-01Move the complex address expression out of DIVariable and into an extraAdrian Prantl1-2/+15
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
2014-10-01Revert r218778 while investigating buldbot breakage.Adrian Prantl1-15/+2
"Move the complex address expression out of DIVariable and into an extra" llvm-svn: 218782
2014-10-01Move the complex address expression out of DIVariable and into an extraAdrian Prantl1-2/+15
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
2014-08-21Use DILexicalBlockFile, rather than DILexicalBlock, to track discriminator ↵David Blaikie1-5/+3
changes to ensure discriminator changes don't introduce new DWARF DW_TAG_lexical_blocks. Somewhat unnoticed in the original implementation of discriminators, but it could cause instructions to end up in new, small, DW_TAG_lexical_blocks due to the use of DILexicalBlock to track discriminator changes. Instead, use DILexicalBlockFile which we already use to track file changes without introducing new scopes, so it works well to track discriminator changes in the same way. llvm-svn: 216239
2014-08-04Correct the emission kind constants committed in r214771David Blaikie1-1/+1
llvm-svn: 214772
2014-08-04Document the "emission kind" field of the DICompileUnit in LLVM's Source ↵David Blaikie1-0/+3
Level Debugging metadata. llvm-svn: 214771
2014-08-01Debug info: Infrastructure to support debug locations for fragmentedAdrian Prantl1-0/+6
variables (for example, by-value struct arguments passed in registers, or large integer values split across several smaller registers). On the IR level, this adds a new type of complex address operation OpPiece to DIVariable that describes size and offset of a variable fragment. On the DWARF emitter level, all pieces describing the same variable are collected, sorted and emitted as DWARF expressions using the DW_OP_piece and DW_OP_bit_piece operators. http://reviews.llvm.org/D3373 rdar://problem/15928306 What this patch doesn't do / Future work: - This patch only adds the backend machinery to make this work, patches that change SROA and SelectionDAG's type legalizer to actually create such debug info will follow. (http://reviews.llvm.org/D2680) - Making the DIVariable complex expressions into an argument of dbg.value will reduce the memory footprint of the debug metadata. - The sorting/uniquing of pieces should be moved into DebugLocEntry, to facilitate the merging of multi-piece entries. llvm-svn: 214576
2014-06-30Debug info: split out complex DIVariable address expressions into aAdrian Prantl1-0/+1
separate MDNode so they can be uniqued via folding set magic. To conserve space, DIVariable nodes are still variable-length, with the last two fields being optional. No functional change. http://reviews.llvm.org/D3526 llvm-svn: 212050
2014-06-09[docs] Fix typo, align comments, fix syntax highlightingJeroen Ketema1-17/+17
llvm-svn: 210462
2014-03-18Switch the type field in DIVariable and DIGlobalVariable over to DITypeRefs.Adrian Prantl1-1/+1
This allows us to catch more opportunities for ODR-based type uniquing during LTO. Paired commit with CFE which updates some testcases to verify the new DIBuilder behavior. llvm-svn: 204106
2014-03-03Add DWARF discriminator support to DILexicalBlocks.Diego Novillo1-2/+5
This adds support for emitting discriminators from DILexicalBlocks. llvm-svn: 202736
2013-12-05Correct word hyphenationsAlp Toker1-1/+1
This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities and contractions in nearby lines. llvm-svn: 196471
2013-10-29Fix common typos in the docs.Benjamin Kramer1-1/+1
llvm-svn: 193632
2013-10-27Update to current output.Bill Wendling1-64/+65
PR14039 llvm-svn: 193494
2013-08-29Add unique identifier field to Composite Types and Format.Manman Ren1-5/+6
llvm-svn: 189593
2013-05-29Debug Info: Update documentation to match recent (& not so recent) schema ↵David Blaikie1-204/+238
changes This updates the debug info metadata schema documentation for various schema changes made recently surrounding filename information for scopes and the representation of imported entities. llvm-svn: 182817
2013-03-19Formatting fixups.Eric Christopher1-14/+14
llvm-svn: 177458
2013-03-18Make the fields in the diagram match the descriptive text above them.Eric Christopher1-3/+3
llvm-svn: 177314
2013-02-16Documentation: correct syntax (one missing comma, one extra comma)Dmitri Gribenko1-2/+2
llvm-svn: 175375
2013-02-13This is actually located at the end, not the middle.Eric Christopher1-1/+1
llvm-svn: 175041
2013-01-10remove the rest of the "written by" lines in the documentation. It isChris Lattner1-2/+0
against the developer policy to include this sort of thing as SVN blame already captures this in a far more fine-grained way. llvm-svn: 172109
2013-01-08Remove the llvm-local DW_TAG_vector_type tag and add a test toEric Christopher1-3/+2
make sure that vector types do work. llvm-svn: 171833
2013-01-08Remove what appears to be a dead llvm-specific debug tag.Eric Christopher1-3/+1
llvm-svn: 171821
2013-01-07Documentation updates for pointer-to-member debug info added in r171698.David Blaikie1-9/+11
llvm-svn: 171701
2012-11-28Some grammar fixesEli Bendersky1-4/+3
llvm-svn: 168752
2012-11-22Documentation: convert SourceLevelDebugging.html to reSTDmitri Gribenko1-0/+2285
llvm-svn: 168493