llvm.org GIT mirror llvm / 6a882f8
Fixed some typos and broken links in source level debugging docs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237357 91177308-0d34-0410-b5e6-96231b3b80d8 Michael Kuperstein 4 years ago
2 changed file(s) with 13 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
29602960 Files are sometimes used in ``scope:`` fields, and are the only valid target
29612961 for ``file:`` fields.
29622962
2963 .. _DILocation:
2963 .. _DIBasicType:
29642964
29652965 DIBasicType
29662966 """""""""""
32233223 !0 = !DILexicalBlock(scope: !3, file: !4, line: 7, column: 35)
32243224 !1 = !DILexicalBlockFile(scope: !0, file: !4, discriminator: 0)
32253225 !2 = !DILexicalBlockFile(scope: !0, file: !4, discriminator: 1)
3226
3227 .. _DILocation:
32263228
32273229 DILocation
32283230 """"""""""
152152 To provide basic functionality, the LLVM debugger does have to make some
153153 assumptions about the source-level language being debugged, though it keeps
154154 these to a minimum. The only common features that the LLVM debugger assumes
155 exist are `source files `_, and `program objects
156 `_. These abstract objects are used by a
155 exist are `source files `_, and `program objects
156 `_. These abstract objects are used by a
157157 debugger to form stack traces, show information about local variables, etc.
158158
159159 This section of the documentation first describes the representation aspects
176176
177177 .. code-block:: llvm
178178
179 void %llvm.dbg.declare(metadata, metadata, metadata)
179 void @llvm.dbg.declare(metadata, metadata, metadata)
180180
181181 This intrinsic provides information about a local element (e.g., variable).
182182 The first argument is metadata holding the alloca for the variable. The second
183 argument is a `local variable DILocalVariable>`_ containing a
183 argument is a `local variable dilocalvariable>`_ containing a
184184 description of the variable. The third argument is a `complex expression
185 DIExpression>`_.
185 diexpression>`_.
186186
187187 ``llvm.dbg.value``
188188 ^^^^^^^^^^^^^^^^^^
189189
190190 .. code-block:: llvm
191191
192 void %llvm.dbg.value(metadata, i64, metadata, metadata)
192 void @llvm.dbg.value(metadata, i64, metadata, metadata)
193193
194194 This intrinsic provides information when a user source variable is set to a new
195195 value. The first argument is the new value (wrapped as metadata). The second
196196 argument is the offset in the user source variable where the new value is
197197 written. The third argument is a `local variable
198 `_ containing a description of the variable. The
199 third argument is a `complex expression `_.
198 `_ containing a description of the variable. The
199 third argument is a `complex expression `_.
200200
201201 Object lifetimes and scoping
202202 ============================
309309 variables: !2)
310310
311311 Here ``!14`` is metadata providing `location information
312 `_. In this example, scope is encoded by ``!4``, a
313 `subprogram descriptor `_. This way the location
312 `_. In this example, scope is encoded by ``!4``, a
313 `subprogram descriptor `_. This way the location
314314 information attached to the intrinsics indicates that the variable ``X`` is
315315 declared at line number 2 at a function level scope in function ``foo``.
316316