|
11 | 11 | /*! |
12 | 12 | # Debug Info Module |
13 | 13 |
|
14 | | -This module serves the purpose of generating debug symbols. We use LLVM's |
| 14 | +This module serves the purpose of generating debug symbols. We use LLVM's |
15 | 15 | [source level debugging](http://llvm.org/docs/SourceLevelDebugging.html) features for generating |
16 | 16 | the debug information. The general principle is this: |
17 | 17 |
|
18 | | -Given the right metadata in the LLVM IR, the LLVM code generator is able to create DWARF debug |
19 | | -symbols for the given code. The [metadata](http://llvm.org/docs/LangRef.html#metadata-type) is |
20 | | -structured much like DWARF *debugging information entries* (DIE), representing type information |
| 18 | +Given the right metadata in the LLVM IR, the LLVM code generator is able to create DWARF debug |
| 19 | +symbols for the given code. The [metadata](http://llvm.org/docs/LangRef.html#metadata-type) is |
| 20 | +structured much like DWARF *debugging information entries* (DIE), representing type information |
21 | 21 | such as datatype layout, function signatures, block layout, variable location and scope information, |
22 | 22 | etc. It is the purpose of this module to generate correct metadata and insert it into the LLVM IR. |
23 | 23 |
|
24 | 24 | As the exact format of metadata trees may change between different LLVM versions, we now use LLVM |
25 | 25 | [DIBuilder](http://llvm.org/docs/doxygen/html/classllvm_1_1DIBuilder.html) to create metadata |
26 | | -where possible. This will hopefully ease the adaption of this module to future LLVM versions. |
| 26 | +where possible. This will hopefully ease the adaption of this module to future LLVM versions. |
27 | 27 |
|
28 | | -The public API of the module is a set of functions that will insert the correct metadata into the |
| 28 | +The public API of the module is a set of functions that will insert the correct metadata into the |
29 | 29 | LLVM IR when called with the right parameters. The module is thus driven from an outside client with |
30 | 30 | functions like `debuginfo::create_local_var(bcx: block, local: @ast::local)`. |
31 | 31 |
|
@@ -129,7 +129,7 @@ pub fn finalize(cx: @mut CrateContext) { |
129 | 129 |
|
130 | 130 | /// Creates debug information for the given local variable. |
131 | 131 | /// |
132 | | -/// Adds the created metadata nodes directly to the crate's IR. |
| 132 | +/// Adds the created metadata nodes directly to the crate's IR. |
133 | 133 | /// The return value should be ignored if called from outside of the debuginfo module. |
134 | 134 | pub fn create_local_var(bcx: block, local: @ast::local) -> DIVariable { |
135 | 135 | let cx = bcx.ccx(); |
@@ -182,7 +182,7 @@ pub fn create_local_var(bcx: block, local: @ast::local) -> DIVariable { |
182 | 182 |
|
183 | 183 | /// Creates debug information for the given function argument. |
184 | 184 | /// |
185 | | -/// Adds the created metadata nodes directly to the crate's IR. |
| 185 | +/// Adds the created metadata nodes directly to the crate's IR. |
186 | 186 | /// The return value should be ignored if called from outside of the debuginfo module. |
187 | 187 | pub fn create_arg(bcx: block, arg: ast::arg, span: span) -> Option<DIVariable> { |
188 | 188 | debug!("create_arg"); |
@@ -246,7 +246,7 @@ pub fn update_source_pos(bcx: block, span: span) { |
246 | 246 |
|
247 | 247 | /// Creates debug information for the given function. |
248 | 248 | /// |
249 | | -/// Adds the created metadata nodes directly to the crate's IR. |
| 249 | +/// Adds the created metadata nodes directly to the crate's IR. |
250 | 250 | /// The return value should be ignored if called from outside of the debuginfo module. |
251 | 251 | pub fn create_function(fcx: fn_ctxt) -> DISubprogram { |
252 | 252 | let cx = fcx.ccx; |
|
0 commit comments