diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2014-03-05 16:11:54 +0100 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2014-03-06 07:59:47 +0100 |
| commit | a5b4d94e3daa0fc2ea59785cb6480e421c4bd8e6 (patch) | |
| tree | 6ba1ff98f6caeead21bc5c3f4c8d0df9897d1215 /src | |
| parent | e15fd400baa37ac22be9c2e2d9664b7cf3df2dbf (diff) | |
| download | rust-a5b4d94e3daa0fc2ea59785cb6480e421c4bd8e6.tar.gz rust-a5b4d94e3daa0fc2ea59785cb6480e421c4bd8e6.zip | |
debuginfo: Add test case for limited debuginfo
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/debug-info/limited-debuginfo.rs | 52 |
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 |
