File tree 2 files changed +48
-0
lines changed
2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ //@ ignore-lldb
2
+
3
+ // Test that static debug info is not collapsed with #[collapse_debuginfo(external)]
4
+
5
+ //@ compile-flags:-g
6
+
7
+ // === GDB TESTS ===================================================================================
8
+
9
+ // gdb-command:info line collapse_debuginfo_static_external::FOO
10
+ // gdb-check:[...]Line 15[...]
11
+
12
+ #[ collapse_debuginfo( external) ]
13
+ macro_rules! decl_foo {
14
+ ( ) => {
15
+ static FOO : u32 = 0 ;
16
+ } ;
17
+ }
18
+
19
+ decl_foo ! ( ) ;
20
+
21
+ fn main ( ) {
22
+ // prevent FOO from getting optimized out
23
+ std:: hint:: black_box ( & FOO ) ;
24
+ }
Original file line number Diff line number Diff line change
1
+ //@ ignore-lldb
2
+
3
+ // Test that static debug info is collapsed with #[collapse_debuginfo(yes)]
4
+
5
+ //@ compile-flags:-g
6
+
7
+ // === GDB TESTS ===================================================================================
8
+
9
+ // gdb-command:info line collapse_debuginfo_static::FOO
10
+ // gdb-check:[...]Line 19[...]
11
+
12
+ #[ collapse_debuginfo( yes) ]
13
+ macro_rules! decl_foo {
14
+ ( ) => {
15
+ static FOO : u32 = 0 ;
16
+ } ;
17
+ }
18
+
19
+ decl_foo ! ( ) ;
20
+
21
+ fn main ( ) {
22
+ // prevent FOO from getting optimized out
23
+ std:: hint:: black_box ( & FOO ) ;
24
+ }
You can’t perform that action at this time.
0 commit comments