about summary refs log tree commit diff
path: root/src/test/debuginfo
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-05-19 20:41:18 +0000
committerbors <bors@rust-lang.org>2017-05-19 20:41:18 +0000
commit5dfcd85fd4bae49445383baadf472fbdb414a0e6 (patch)
tree6812e7e07285e77a85e3619139280ca3cd09b0a7 /src/test/debuginfo
parent543691d0ebbbf9e3c996980d2b841794098e5e85 (diff)
parent040cd6d15dcc8c1f66726293d52df93abd2e4b76 (diff)
downloadrust-5dfcd85fd4bae49445383baadf472fbdb414a0e6.tar.gz
rust-5dfcd85fd4bae49445383baadf472fbdb414a0e6.zip
Auto merge of #42105 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 17 pull requests

- Successful merges: #41870, #41910, #41958, #41971, #42006, #42024, #42037, #42056, #42067, #42070, #42079, #42080, #42082, #42089, #42092, #42096, #42100
- Failed merges:
Diffstat (limited to 'src/test/debuginfo')
-rw-r--r--src/test/debuginfo/multi-cgu.rs67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/test/debuginfo/multi-cgu.rs b/src/test/debuginfo/multi-cgu.rs
new file mode 100644
index 00000000000..f4f9f92396f
--- /dev/null
+++ b/src/test/debuginfo/multi-cgu.rs
@@ -0,0 +1,67 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+// This test case makes sure that we get proper break points for binaries
+// compiled with multiple codegen units. (see #39160)
+
+
+// min-lldb-version: 310
+
+// compile-flags:-g -Ccodegen-units=2
+
+// === GDB TESTS ===============================================================
+
+// gdb-command:run
+
+// gdb-command:print xxx
+// gdb-check:$1 = 12345
+// gdb-command:continue
+
+// gdb-command:print yyy
+// gdb-check:$2 = 67890
+// gdb-command:continue
+
+
+// === LLDB TESTS ==============================================================
+
+// lldb-command:run
+
+// lldb-command:print xxx
+// lldb-check:[...]$0 = 12345
+// lldb-command:continue
+
+// lldb-command:print yyy
+// lldb-check:[...]$1 = 67890
+// lldb-command:continue
+
+
+#![feature(omit_gdb_pretty_printer_section)]
+#![omit_gdb_pretty_printer_section]
+
+mod a {
+    pub fn foo(xxx: u32) {
+        super::_zzz(); // #break
+    }
+}
+
+mod b {
+    pub fn bar(yyy: u64) {
+        super::_zzz(); // #break
+    }
+}
+
+fn main() {
+    a::foo(12345);
+    b::bar(67890);
+}
+
+#[inline(never)]
+fn _zzz() {}