]>
git.proxmox.com Git - rustc.git/blob - src/test/debuginfo/lexical-scope-with-macro.rs
1 // Copyright 2013-2014 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.
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.
11 // min-lldb-version: 310
12 // ignore-macos FIXME #48807
14 // compile-flags:-g -Zdebug-macros
16 // === GDB TESTS ===================================================================================
20 // gdb-command:print a
22 // gdb-command:print b
24 // gdb-command:continue
26 // gdb-command:print a
27 // gdb-check:$3 = 890242
28 // gdb-command:print b
30 // gdb-command:continue
32 // gdb-command:print a
34 // gdb-command:print b
36 // gdb-command:continue
38 // gdb-command:print a
40 // gdb-command:print b
42 // gdb-command:continue
44 // gdb-command:print a
46 // gdb-command:print b
48 // gdb-command:continue
50 // gdb-command:print a
52 // gdb-command:print b
54 // gdb-command:continue
56 // gdb-command:print a
58 // gdb-command:print b
60 // gdb-command:print c
61 // gdb-check:$15 = 400
62 // gdb-command:continue
65 // === LLDB TESTS ==================================================================================
69 // lldb-command:print a
70 // lldb-check:[...]$0 = 10
71 // lldb-command:print b
72 // lldb-check:[...]$1 = 34
73 // lldb-command:continue
75 // lldb-command:print a
76 // lldb-check:[...]$2 = 890242
77 // lldb-command:print b
78 // lldb-check:[...]$3 = 34
79 // lldb-command:continue
81 // lldb-command:print a
82 // lldb-check:[...]$4 = 10
83 // lldb-command:print b
84 // lldb-check:[...]$5 = 34
85 // lldb-command:continue
87 // lldb-command:print a
88 // lldb-check:[...]$6 = 102
89 // lldb-command:print b
90 // lldb-check:[...]$7 = 34
91 // lldb-command:continue
93 // lldb-command:print a
94 // lldb-check:[...]$8 = 110
95 // lldb-command:print b
96 // lldb-check:[...]$9 = 34
97 // lldb-command:continue
99 // lldb-command:print a
100 // lldb-check:[...]$10 = 10
101 // lldb-command:print b
102 // lldb-check:[...]$11 = 34
103 // lldb-command:continue
105 // lldb-command:print a
106 // lldb-check:[...]$12 = 10
107 // lldb-command:print b
108 // lldb-check:[...]$13 = 34
109 // lldb-command:print c
110 // lldb-check:[...]$14 = 400
111 // lldb-command:continue
114 #![feature(omit_gdb_pretty_printer_section)]
115 #![omit_gdb_pretty_printer_section]
117 macro_rules
! trivial
{
121 macro_rules
! no_new_scope
{
122 ($e1
:expr
) => (($e1
+ 2) - 1)
125 macro_rules
! new_scope
{
133 macro_rules
! shadow_within_macro
{
148 macro_rules
! dup_expr
{
149 ($e1
:expr
) => (($e1
) + ($e1
))
155 let a
= trivial
!(10);
156 let b
= no_new_scope
!(33);
166 shadow_within_macro
!(100);
171 let c
= dup_expr
!(10 * 20);