]> git.lizzy.rs Git - rust.git/blob - tests/debuginfo/limited-debuginfo.rs
Merge commit '7d53619064ab7045c383644cb445052d2a3d46db' into sync_cg_clif-2023-02-09
[rust.git] / tests / debuginfo / limited-debuginfo.rs
1 // ignore-lldb
2 // ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
3
4 // compile-flags:-C debuginfo=1
5
6 // Make sure functions have proper names
7 // gdb-command:info functions
8 // gdbg-check:[...]void[...]main([...]);
9 // gdbr-check:fn limited_debuginfo::main();
10 // gdbg-check:[...]void[...]some_function([...]);
11 // gdbr-check:fn limited_debuginfo::some_function();
12 // gdbg-check:[...]void[...]some_other_function([...]);
13 // gdbr-check:fn limited_debuginfo::some_other_function();
14 // gdbg-check:[...]void[...]zzz([...]);
15 // gdbr-check:fn limited_debuginfo::zzz();
16
17 // gdb-command:run
18
19 // Make sure there is no information about locals
20 // gdb-command:info locals
21 // gdb-check:No locals.
22 // gdb-command:continue
23
24
25 #![allow(unused_variables)]
26 #![feature(omit_gdb_pretty_printer_section)]
27 #![omit_gdb_pretty_printer_section]
28
29 struct Struct {
30     a: i64,
31     b: i32
32 }
33
34 fn main() {
35     some_function(101, 202);
36     some_other_function(1, 2);
37 }
38
39
40 fn zzz() {()}
41
42 fn some_function(a: isize, b: isize) {
43     let some_variable = Struct { a: 11, b: 22 };
44     let some_other_variable = 23;
45
46     for x in 0..1 {
47         zzz(); // #break
48     }
49 }
50
51 fn some_other_function(a: isize, b: isize) -> bool { true }