1 // min-lldb-version: 310
2 // ignore-lldb FIXME #48807
4 // compile-flags:-g -Zdebug-macros
6 // === GDB TESTS ===================================================================================
10 // gdb-command:print a
12 // gdb-command:print b
14 // gdb-command:continue
16 // gdb-command:print a
17 // gdb-check:$3 = 890242
18 // gdb-command:print b
20 // gdb-command:continue
22 // gdb-command:print a
24 // gdb-command:print b
26 // gdb-command:continue
28 // gdb-command:print a
30 // gdb-command:print b
32 // gdb-command:continue
34 // gdb-command:print a
36 // gdb-command:print b
38 // gdb-command:continue
40 // gdb-command:print a
42 // gdb-command:print b
44 // gdb-command:continue
46 // gdb-command:print a
48 // gdb-command:print b
50 // gdb-command:print c
51 // gdb-check:$15 = 400
52 // gdb-command:continue
55 // === LLDB TESTS ==================================================================================
59 // lldb-command:print a
60 // lldbg-check:[...]$0 = 10
61 // lldbr-check:(i32) a = 10
62 // lldb-command:print b
63 // lldbg-check:[...]$1 = 34
64 // lldbr-check:(i32) b = 34
65 // lldb-command:continue
67 // lldb-command:print a
68 // lldbg-check:[...]$2 = 890242
69 // lldbr-check:(i32) a = 10
70 // lldb-command:print b
71 // lldbg-check:[...]$3 = 34
72 // lldbr-check:(i32) b = 34
73 // lldb-command:continue
75 // lldb-command:print a
76 // lldbg-check:[...]$4 = 10
77 // lldbr-check:(i32) a = 10
78 // lldb-command:print b
79 // lldbg-check:[...]$5 = 34
80 // lldbr-check:(i32) b = 34
81 // lldb-command:continue
83 // lldb-command:print a
84 // lldbg-check:[...]$6 = 102
85 // lldbr-check:(i32) a = 10
86 // lldb-command:print b
87 // lldbg-check:[...]$7 = 34
88 // lldbr-check:(i32) b = 34
89 // lldb-command:continue
91 // Don't test this with rust-enabled lldb for now; see issue #48807
92 // lldbg-command:print a
93 // lldbg-check:[...]$8 = 110
94 // lldbg-command:print b
95 // lldbg-check:[...]$9 = 34
96 // lldbg-command:continue
98 // lldbg-command:print a
99 // lldbg-check:[...]$10 = 10
100 // lldbg-command:print b
101 // lldbg-check:[...]$11 = 34
102 // lldbg-command:continue
104 // lldbg-command:print a
105 // lldbg-check:[...]$12 = 10
106 // lldbg-command:print b
107 // lldbg-check:[...]$13 = 34
108 // lldbg-command:print c
109 // lldbg-check:[...]$14 = 400
110 // lldbg-command:continue
113 #![feature(omit_gdb_pretty_printer_section)]
114 #![omit_gdb_pretty_printer_section]
116 macro_rules! trivial {
120 macro_rules! no_new_scope {
121 ($e1:expr) => (($e1 + 2) - 1)
124 macro_rules! new_scope {
132 macro_rules! shadow_within_macro {
147 macro_rules! dup_expr {
148 ($e1:expr) => (($e1) + ($e1))
154 let a = trivial!(10);
155 let b = no_new_scope!(33);
165 shadow_within_macro!(100);
170 let c = dup_expr!(10 * 20);