about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/debug-info/limited-debuginfo.rs52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/test/debug-info/limited-debuginfo.rs b/src/test/debug-info/limited-debuginfo.rs
new file mode 100644
index 00000000000..ccf1506a565
--- /dev/null
+++ b/src/test/debug-info/limited-debuginfo.rs
@@ -0,0 +1,52 @@
+// Copyright 2013-2014 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.
+
+// ignore-android: FIXME(#10381)
+
+// compile-flags:-g1
+
+// Make sure functions have proper names
+// debugger:info functions
+// check:static void limited-debuginfo::main();
+// check:static void limited-debuginfo::some_function();
+// check:static void limited-debuginfo::some_other_function();
+// check:static void limited-debuginfo::zzz();
+
+// debugger:rbreak zzz
+// debugger:run
+
+// Make sure there is no information about locals
+// debugger:finish
+// debugger:info locals
+// check:No locals.
+// debugger:continue
+
+
+#[allow(unused_variable)];
+
+struct Struct {
+    a: i64,
+    b: i32
+}
+
+fn main() {
+    some_function(101, 202);
+}
+
+
+fn zzz() {()}
+
+fn some_function(a: int, b: int) {
+    let some_variable = Struct { a: 11, b: 22 };
+    let some_other_variable = 23;
+    zzz();
+}
+
+fn some_other_function(a: int, b: int) -> bool { true }
\ No newline at end of file