Skip to content

Commit 7487a3c

Browse files
---
yaml --- r: 63495 b: refs/heads/snap-stage3 c: 5d5311d h: refs/heads/master i: 63493: 98ffbac 63491: 129aa8f 63487: 70fb7a9 v: v3
1 parent d2cc52b commit 7487a3c

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 7375e94289622663ba9976e2702a4008cd0aad1a
4+
refs/heads/snap-stage3: 5d5311dc74b2bce19a754538dfd3c849e8c989ed
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/trans/debuginfo.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,32 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
/*!
12+
# Debug Info Module
13+
14+
This module serves the purpose of generating debug symbols. We use LLVM's
15+
[source level debugging](http://llvm.org/docs/SourceLevelDebugging.html) features for generating
16+
the debug information. The general principle is this:
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
21+
such as datatype layout, function signatures, block layout, variable location and scope information,
22+
etc. It is the purpose of this module to generate correct metadata and insert it into the LLVM IR.
23+
24+
As the exact format of metadata trees may change between different LLVM versions, we now use LLVM
25+
[DIBuilder](http://llvm.org/docs/doxygen/html/classllvm_1_1DIBuilder.html) which to create metadata
26+
where possible. This will hopefully ease the adaption of this module to future LLVM versions.
27+
28+
The public API of the module is a set of functions that will insert the correct metadata into the
29+
LLVM IR when called with the right parameters. The module is thus driven from an outside client with
30+
function like `debuginfo::create_local_var(bcx: block, local: @ast::local)`.
31+
32+
Internally the module will try to reuse already created metadata by utilizing a cache. All private
33+
state used by the module is stored within a DebugContext struct, which in turn is contained in the
34+
CrateContext.
35+
*/
36+
1137
use core::prelude::*;
1238

1339
use driver::session;

0 commit comments

Comments
 (0)