Skip to content

Commit 7d52316

Browse files
---
yaml --- r: 143930 b: refs/heads/try2 c: 983cc77 h: refs/heads/master v: v3
1 parent 0376251 commit 7d52316

File tree

5 files changed

+240
-3
lines changed

5 files changed

+240
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 9c7d9eb6fdd3a14bbad65949d73a0d9b86f6ec33
8+
refs/heads/try2: 983cc777c5090df18188dd417cdfda8acfc2cb1b
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/trans/debuginfo.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ pub struct FunctionDebugContext {
128128
}
129129

130130
impl FunctionDebugContext {
131-
priv fn new() -> FunctionDebugContext {
131+
fn new() -> FunctionDebugContext {
132132
return FunctionDebugContext {
133133
scope_map: HashMap::new(),
134134
argument_counter: 1,
@@ -449,7 +449,7 @@ fn declare_local(bcx: @mut Block,
449449
let type_metadata = type_metadata(cx, variable_type, span);
450450
let scope = scope_metadata(bcx.fcx, node_id, span);
451451

452-
let var_metadata = do name.as_c_str |name| {
452+
let var_metadata = do name.to_c_str().with_ref |name| {
453453
unsafe {
454454
llvm::LLVMDIBuilderCreateLocalVariable(
455455
DIB(cx),
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// xfail-win32 Broken because of LLVM bug: http://llvm.org/bugs/show_bug.cgi?id=16249
12+
13+
// compile-flags:-Z extra-debug-info
14+
// debugger:break zzz
15+
// debugger:run
16+
17+
// debugger:finish
18+
// debugger:print x
19+
// check:$1 = false
20+
// debugger:continue
21+
22+
// debugger:finish
23+
// debugger:print x
24+
// check:$2 = false
25+
// debugger:continue
26+
27+
// debugger:finish
28+
// debugger:print x
29+
// check:$3 = 1000
30+
// debugger:continue
31+
32+
// debugger:finish
33+
// debugger:print x
34+
// check:$4 = 2.5
35+
// debugger:continue
36+
37+
// debugger:finish
38+
// debugger:print x
39+
// check:$5 = true
40+
// debugger:continue
41+
42+
// debugger:finish
43+
// debugger:print x
44+
// check:$6 = false
45+
// debugger:continue
46+
47+
fn main() {
48+
49+
let x = false;
50+
51+
zzz();
52+
sentinel();
53+
54+
let managed_closure: @fn(int) = |x| {
55+
zzz();
56+
sentinel();
57+
58+
let x = 2.5;
59+
60+
zzz();
61+
sentinel();
62+
63+
let x = true;
64+
65+
zzz();
66+
sentinel();
67+
};
68+
69+
zzz();
70+
sentinel();
71+
72+
managed_closure(1000);
73+
74+
zzz();
75+
sentinel();
76+
}
77+
78+
fn zzz() {()}
79+
fn sentinel() {()}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// xfail-win32 Broken because of LLVM bug: http://llvm.org/bugs/show_bug.cgi?id=16249
12+
13+
// compile-flags:-Z extra-debug-info
14+
// debugger:break zzz
15+
// debugger:run
16+
17+
// debugger:finish
18+
// debugger:print x
19+
// check:$1 = false
20+
// debugger:continue
21+
22+
// debugger:finish
23+
// debugger:print x
24+
// check:$2 = false
25+
// debugger:continue
26+
27+
// debugger:finish
28+
// debugger:print x
29+
// check:$3 = 1000
30+
// debugger:continue
31+
32+
// debugger:finish
33+
// debugger:print x
34+
// check:$4 = 2.5
35+
// debugger:continue
36+
37+
// debugger:finish
38+
// debugger:print x
39+
// check:$5 = true
40+
// debugger:continue
41+
42+
// debugger:finish
43+
// debugger:print x
44+
// check:$6 = false
45+
// debugger:continue
46+
47+
fn main() {
48+
49+
let x = false;
50+
51+
zzz();
52+
sentinel();
53+
54+
let stack_closure: &fn(int) = |x| {
55+
zzz();
56+
sentinel();
57+
58+
let x = 2.5;
59+
60+
zzz();
61+
sentinel();
62+
63+
let x = true;
64+
65+
zzz();
66+
sentinel();
67+
};
68+
69+
zzz();
70+
sentinel();
71+
72+
stack_closure(1000);
73+
74+
zzz();
75+
sentinel();
76+
}
77+
78+
fn zzz() {()}
79+
fn sentinel() {()}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// xfail-win32 Broken because of LLVM bug: http://llvm.org/bugs/show_bug.cgi?id=16249
12+
13+
// compile-flags:-Z extra-debug-info
14+
// debugger:break zzz
15+
// debugger:run
16+
17+
// debugger:finish
18+
// debugger:print x
19+
// check:$1 = false
20+
// debugger:continue
21+
22+
// debugger:finish
23+
// debugger:print x
24+
// check:$2 = false
25+
// debugger:continue
26+
27+
// debugger:finish
28+
// debugger:print x
29+
// check:$3 = 1000
30+
// debugger:continue
31+
32+
// debugger:finish
33+
// debugger:print x
34+
// check:$4 = 2.5
35+
// debugger:continue
36+
37+
// debugger:finish
38+
// debugger:print x
39+
// check:$5 = true
40+
// debugger:continue
41+
42+
// debugger:finish
43+
// debugger:print x
44+
// check:$6 = false
45+
// debugger:continue
46+
47+
fn main() {
48+
49+
let x = false;
50+
51+
zzz();
52+
sentinel();
53+
54+
let unique_closure: ~fn(int) = |x| {
55+
zzz();
56+
sentinel();
57+
58+
let x = 2.5;
59+
60+
zzz();
61+
sentinel();
62+
63+
let x = true;
64+
65+
zzz();
66+
sentinel();
67+
};
68+
69+
zzz();
70+
sentinel();
71+
72+
unique_closure(1000);
73+
74+
zzz();
75+
sentinel();
76+
}
77+
78+
fn zzz() {()}
79+
fn sentinel() {()}

0 commit comments

Comments
 (0)