]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/function-arguments-naked.rs
Auto merge of #75293 - poliorcetics:intra-doc-links-std-path, r=jyn514
[rust.git] / src / test / debuginfo / function-arguments-naked.rs
1 // min-lldb-version: 310
2
3 // We have to ignore android because of this issue:
4 // https://github.com/rust-lang/rust/issues/74847
5 // ignore-android
6 //
7 // We need to use inline assembly, so just use one platform
8 // only-x86_64
9
10 // compile-flags:-g
11
12 // === GDB TESTS ===================================================================================
13
14 // gdb-command:run
15
16 // gdb-command:info args
17 // gdb-check:No arguments.
18 // gdb-command:continue
19
20 // === LLDB TESTS ==================================================================================
21
22 // lldb-command:run
23
24 // lldb-command:frame variable
25 // lldbg-check:(unsigned long) = 111 (unsigned long) = 222
26 // lldbr-check:(unsigned long) = 111 (unsigned long) = 222
27 // lldb-command:continue
28
29
30 #![feature(asm)]
31 #![feature(naked_functions)]
32 #![feature(omit_gdb_pretty_printer_section)]
33 #![omit_gdb_pretty_printer_section]
34
35 fn main() {
36     naked(111, 222);
37 }
38
39 #[naked]
40 extern "C" fn naked(x: usize, y: usize) {
41     unsafe { asm!("ret"); } // #break
42 }