diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2014-04-24 11:35:48 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2014-05-07 19:58:07 +0200 |
| commit | 55a8bd56e5a89f98aa9d4ed998cb8c686d447805 (patch) | |
| tree | e49ddf2a659d8129ad336baff052daa881f6f505 /src/test/debug-info | |
| parent | 445988b47811679144d0fa9b3a2ccf2348752850 (diff) | |
debuginfo: Split debuginfo autotests into debuginfo-gdb and debuginfo-lldb
Diffstat (limited to 'src/test/debug-info')
94 files changed, 0 insertions, 8566 deletions
diff --git a/src/test/debug-info/basic-types-globals-metadata.rs b/src/test/debug-info/basic-types-globals-metadata.rs deleted file mode 100644 index bf6d63f2ca9..00000000000 --- a/src/test/debug-info/basic-types-globals-metadata.rs +++ /dev/null @@ -1,73 +0,0 @@ -// 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-win32: FIXME #13256 -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish -// debugger:whatis 'basic-types-globals-metadata::B' -// check:type = bool -// debugger:whatis 'basic-types-globals-metadata::I' -// check:type = int -// debugger:whatis 'basic-types-globals-metadata::C' -// check:type = char -// debugger:whatis 'basic-types-globals-metadata::I8' -// check:type = i8 -// debugger:whatis 'basic-types-globals-metadata::I16' -// check:type = i16 -// debugger:whatis 'basic-types-globals-metadata::I32' -// check:type = i32 -// debugger:whatis 'basic-types-globals-metadata::I64' -// check:type = i64 -// debugger:whatis 'basic-types-globals-metadata::U' -// check:type = uint -// debugger:whatis 'basic-types-globals-metadata::U8' -// check:type = u8 -// debugger:whatis 'basic-types-globals-metadata::U16' -// check:type = u16 -// debugger:whatis 'basic-types-globals-metadata::U32' -// check:type = u32 -// debugger:whatis 'basic-types-globals-metadata::U64' -// check:type = u64 -// debugger:whatis 'basic-types-globals-metadata::F32' -// check:type = f32 -// debugger:whatis 'basic-types-globals-metadata::F64' -// check:type = f64 -// debugger:continue - -#![allow(unused_variable)] -#![allow(dead_code)] - - -static B: bool = false; -static I: int = -1; -static C: char = 'a'; -static I8: i8 = 68; -static I16: i16 = -16; -static I32: i32 = -32; -static I64: i64 = -64; -static U: uint = 1; -static U8: u8 = 100; -static U16: u16 = 16; -static U32: u32 = 32; -static U64: u64 = 64; -static F32: f32 = 2.5; -static F64: f64 = 3.5; - -fn main() { - _zzz(); - - let a = (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64); -} - -fn _zzz() {()} diff --git a/src/test/debug-info/basic-types-globals.rs b/src/test/debug-info/basic-types-globals.rs deleted file mode 100644 index cdc3132ca60..00000000000 --- a/src/test/debug-info/basic-types-globals.rs +++ /dev/null @@ -1,77 +0,0 @@ -// 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. - -// Caveats - gdb prints any 8-bit value (meaning rust I8 and u8 values) -// as its numerical value along with its associated ASCII char, there -// doesn't seem to be any way around this. Also, gdb doesn't know -// about UTF-32 character encoding and will print a rust char as only -// its numerical value. - -// ignore-win32: FIXME #13256 -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish -// debugger:print 'basic-types-globals::B' -// check:$1 = false -// debugger:print 'basic-types-globals::I' -// check:$2 = -1 -// debugger:print 'basic-types-globals::C' -// check:$3 = 97 -// debugger:print/d 'basic-types-globals::I8' -// check:$4 = 68 -// debugger:print 'basic-types-globals::I16' -// check:$5 = -16 -// debugger:print 'basic-types-globals::I32' -// check:$6 = -32 -// debugger:print 'basic-types-globals::I64' -// check:$7 = -64 -// debugger:print 'basic-types-globals::U' -// check:$8 = 1 -// debugger:print/d 'basic-types-globals::U8' -// check:$9 = 100 -// debugger:print 'basic-types-globals::U16' -// check:$10 = 16 -// debugger:print 'basic-types-globals::U32' -// check:$11 = 32 -// debugger:print 'basic-types-globals::U64' -// check:$12 = 64 -// debugger:print 'basic-types-globals::F32' -// check:$13 = 2.5 -// debugger:print 'basic-types-globals::F64' -// check:$14 = 3.5 -// debugger:continue - -#![allow(unused_variable)] - -static B: bool = false; -static I: int = -1; -static C: char = 'a'; -static I8: i8 = 68; -static I16: i16 = -16; -static I32: i32 = -32; -static I64: i64 = -64; -static U: uint = 1; -static U8: u8 = 100; -static U16: u16 = 16; -static U32: u32 = 32; -static U64: u64 = 64; -static F32: f32 = 2.5; -static F64: f64 = 3.5; - -fn main() { - _zzz(); - - let a = (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64); -} - -fn _zzz() {()} diff --git a/src/test/debug-info/basic-types-metadata.rs b/src/test/debug-info/basic-types-metadata.rs deleted file mode 100644 index ae5d3a84b96..00000000000 --- a/src/test/debug-info/basic-types-metadata.rs +++ /dev/null @@ -1,74 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish -// debugger:whatis unit -// check:type = () -// debugger:whatis b -// check:type = bool -// debugger:whatis i -// check:type = int -// debugger:whatis c -// check:type = char -// debugger:whatis i8 -// check:type = i8 -// debugger:whatis i16 -// check:type = i16 -// debugger:whatis i32 -// check:type = i32 -// debugger:whatis i64 -// check:type = i64 -// debugger:whatis u -// check:type = uint -// debugger:whatis u8 -// check:type = u8 -// debugger:whatis u16 -// check:type = u16 -// debugger:whatis u32 -// check:type = u32 -// debugger:whatis u64 -// check:type = u64 -// debugger:whatis f32 -// check:type = f32 -// debugger:whatis f64 -// check:type = f64 -// debugger:info functions _yyy -// check:[...]![...]_yyy([...])([...]); -// debugger:continue - -#![allow(unused_variable)] - -fn main() { - let unit: () = (); - let b: bool = false; - let i: int = -1; - let c: char = 'a'; - let i8: i8 = 68; - let i16: i16 = -16; - let i32: i32 = -32; - let i64: i64 = -64; - let u: uint = 1; - let u8: u8 = 100; - let u16: u16 = 16; - let u32: u32 = 32; - let u64: u64 = 64; - let f32: f32 = 2.5; - let f64: f64 = 3.5; - _zzz(); - if 1 == 1 { _yyy(); } -} - -fn _zzz() {()} -fn _yyy() -> ! {fail!()} diff --git a/src/test/debug-info/basic-types-mut-globals.rs b/src/test/debug-info/basic-types-mut-globals.rs deleted file mode 100644 index 1580f734617..00000000000 --- a/src/test/debug-info/basic-types-mut-globals.rs +++ /dev/null @@ -1,129 +0,0 @@ -// 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. - -// Caveats - gdb prints any 8-bit value (meaning rust I8 and u8 values) -// as its numerical value along with its associated ASCII char, there -// doesn't seem to be any way around this. Also, gdb doesn't know -// about UTF-32 character encoding and will print a rust char as only -// its numerical value. - -// ignore-win32: FIXME #13256 -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// Check initializers -// debugger:print 'basic-types-mut-globals::B' -// check:$1 = false -// debugger:print 'basic-types-mut-globals::I' -// check:$2 = -1 -// debugger:print 'basic-types-mut-globals::C' -// check:$3 = 97 -// debugger:print/d 'basic-types-mut-globals::I8' -// check:$4 = 68 -// debugger:print 'basic-types-mut-globals::I16' -// check:$5 = -16 -// debugger:print 'basic-types-mut-globals::I32' -// check:$6 = -32 -// debugger:print 'basic-types-mut-globals::I64' -// check:$7 = -64 -// debugger:print 'basic-types-mut-globals::U' -// check:$8 = 1 -// debugger:print/d 'basic-types-mut-globals::U8' -// check:$9 = 100 -// debugger:print 'basic-types-mut-globals::U16' -// check:$10 = 16 -// debugger:print 'basic-types-mut-globals::U32' -// check:$11 = 32 -// debugger:print 'basic-types-mut-globals::U64' -// check:$12 = 64 -// debugger:print 'basic-types-mut-globals::F32' -// check:$13 = 2.5 -// debugger:print 'basic-types-mut-globals::F64' -// check:$14 = 3.5 -// debugger:continue - -// Check new values -// debugger:print 'basic-types-mut-globals'::B -// check:$15 = true -// debugger:print 'basic-types-mut-globals'::I -// check:$16 = 2 -// debugger:print 'basic-types-mut-globals'::C -// check:$17 = 102 -// debugger:print/d 'basic-types-mut-globals'::I8 -// check:$18 = 78 -// debugger:print 'basic-types-mut-globals'::I16 -// check:$19 = -26 -// debugger:print 'basic-types-mut-globals'::I32 -// check:$20 = -12 -// debugger:print 'basic-types-mut-globals'::I64 -// check:$21 = -54 -// debugger:print 'basic-types-mut-globals'::U -// check:$22 = 5 -// debugger:print/d 'basic-types-mut-globals'::U8 -// check:$23 = 20 -// debugger:print 'basic-types-mut-globals'::U16 -// check:$24 = 32 -// debugger:print 'basic-types-mut-globals'::U32 -// check:$25 = 16 -// debugger:print 'basic-types-mut-globals'::U64 -// check:$26 = 128 -// debugger:print 'basic-types-mut-globals'::F32 -// check:$27 = 5.75 -// debugger:print 'basic-types-mut-globals'::F64 -// check:$28 = 9.25 - -// debugger:detach -// debugger:quit - -#![allow(unused_variable)] - -static mut B: bool = false; -static mut I: int = -1; -static mut C: char = 'a'; -static mut I8: i8 = 68; -static mut I16: i16 = -16; -static mut I32: i32 = -32; -static mut I64: i64 = -64; -static mut U: uint = 1; -static mut U8: u8 = 100; -static mut U16: u16 = 16; -static mut U32: u32 = 32; -static mut U64: u64 = 64; -static mut F32: f32 = 2.5; -static mut F64: f64 = 3.5; - -fn main() { - _zzz(); - - unsafe { - B = true; - I = 2; - C = 'f'; - I8 = 78; - I16 = -26; - I32 = -12; - I64 = -54; - U = 5; - U8 = 20; - U16 = 32; - U32 = 16; - U64 = 128; - F32 = 5.75; - F64 = 9.25; - } - - _zzz(); -} - -fn _zzz() {()} diff --git a/src/test/debug-info/basic-types.rs b/src/test/debug-info/basic-types.rs deleted file mode 100644 index 9c32fcfb945..00000000000 --- a/src/test/debug-info/basic-types.rs +++ /dev/null @@ -1,72 +0,0 @@ -// 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. - -// Caveats - gdb prints any 8-bit value (meaning rust i8 and u8 values) -// as its numerical value along with its associated ASCII char, there -// doesn't seem to be any way around this. Also, gdb doesn't know -// about UTF-32 character encoding and will print a rust char as only -// its numerical value. - -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish -// debugger:print b -// check:$1 = false -// debugger:print i -// check:$2 = -1 -// debugger:print c -// check:$3 = 97 -// debugger:print/d i8 -// check:$4 = 68 -// debugger:print i16 -// check:$5 = -16 -// debugger:print i32 -// check:$6 = -32 -// debugger:print i64 -// check:$7 = -64 -// debugger:print u -// check:$8 = 1 -// debugger:print/d u8 -// check:$9 = 100 -// debugger:print u16 -// check:$10 = 16 -// debugger:print u32 -// check:$11 = 32 -// debugger:print u64 -// check:$12 = 64 -// debugger:print f32 -// check:$13 = 2.5 -// debugger:print f64 -// check:$14 = 3.5 - -#![allow(unused_variable)] - -fn main() { - let b: bool = false; - let i: int = -1; - let c: char = 'a'; - let i8: i8 = 68; - let i16: i16 = -16; - let i32: i32 = -32; - let i64: i64 = -64; - let u: uint = 1; - let u8: u8 = 100; - let u16: u16 = 16; - let u32: u32 = 32; - let u64: u64 = 64; - let f32: f32 = 2.5; - let f64: f64 = 3.5; - _zzz(); -} - -fn _zzz() {()} diff --git a/src/test/debug-info/borrowed-basic.rs b/src/test/debug-info/borrowed-basic.rs deleted file mode 100644 index 3d0f6632e50..00000000000 --- a/src/test/debug-info/borrowed-basic.rs +++ /dev/null @@ -1,109 +0,0 @@ -// 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) - -// Gdb doesn't know about UTF-32 character encoding and will print a rust char as only -// its numerical value. - -// compile-flags:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish -// debugger:print *bool_ref -// check:$1 = true - -// debugger:print *int_ref -// check:$2 = -1 - -// debugger:print *char_ref -// check:$3 = 97 - -// debugger:print *i8_ref -// check:$4 = 68 'D' - -// debugger:print *i16_ref -// check:$5 = -16 - -// debugger:print *i32_ref -// check:$6 = -32 - -// debugger:print *i64_ref -// check:$7 = -64 - -// debugger:print *uint_ref -// check:$8 = 1 - -// debugger:print *u8_ref -// check:$9 = 100 'd' - -// debugger:print *u16_ref -// check:$10 = 16 - -// debugger:print *u32_ref -// check:$11 = 32 - -// debugger:print *u64_ref -// check:$12 = 64 - -// debugger:print *f32_ref -// check:$13 = 2.5 - -// debugger:print *f64_ref -// check:$14 = 3.5 - -#![allow(unused_variable)] - -fn main() { - let bool_val: bool = true; - let bool_ref: &bool = &bool_val; - - let int_val: int = -1; - let int_ref: &int = &int_val; - - let char_val: char = 'a'; - let char_ref: &char = &char_val; - - let i8_val: i8 = 68; - let i8_ref: &i8 = &i8_val; - - let i16_val: i16 = -16; - let i16_ref: &i16 = &i16_val; - - let i32_val: i32 = -32; - let i32_ref: &i32 = &i32_val; - - let uint_val: i64 = -64; - let i64_ref: &i64 = &uint_val; - - let uint_val: uint = 1; - let uint_ref: &uint = &uint_val; - - let u8_val: u8 = 100; - let u8_ref: &u8 = &u8_val; - - let u16_val: u16 = 16; - let u16_ref: &u16 = &u16_val; - - let u32_val: u32 = 32; - let u32_ref: &u32 = &u32_val; - - let u64_val: u64 = 64; - let u64_ref: &u64 = &u64_val; - - let f32_val: f32 = 2.5; - let f32_ref: &f32 = &f32_val; - - let f64_val: f64 = 3.5; - let f64_ref: &f64 = &f64_val; - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/borrowed-c-style-enum.rs b/src/test/debug-info/borrowed-c-style-enum.rs deleted file mode 100644 index 4007e35dec3..00000000000 --- a/src/test/debug-info/borrowed-c-style-enum.rs +++ /dev/null @@ -1,44 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print *the_a_ref -// check:$1 = TheA - -// debugger:print *the_b_ref -// check:$2 = TheB - -// debugger:print *the_c_ref -// check:$3 = TheC - -#![allow(unused_variable)] - -enum ABC { TheA, TheB, TheC } - -fn main() { - let the_a = TheA; - let the_a_ref: &ABC = &the_a; - - let the_b = TheB; - let the_b_ref: &ABC = &the_b; - - let the_c = TheC; - let the_c_ref: &ABC = &the_c; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/borrowed-enum.rs b/src/test/debug-info/borrowed-enum.rs deleted file mode 100644 index 3512bc63395..00000000000 --- a/src/test/debug-info/borrowed-enum.rs +++ /dev/null @@ -1,65 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print *the_a_ref -// check:$1 = {{TheA, x = 0, y = 8970181431921507452}, {TheA, 0, 2088533116, 2088533116}} - -// debugger:print *the_b_ref -// check:$2 = {{TheB, x = 0, y = 1229782938247303441}, {TheB, 0, 286331153, 286331153}} - -// debugger:print *univariant_ref -// check:$3 = {4820353753753434} - -#![allow(unused_variable)] -#![feature(struct_variant)] - -// The first element is to ensure proper alignment, irrespective of the machines word size. Since -// the size of the discriminant value is machine dependent, this has be taken into account when -// datatype layout should be predictable as in this case. -enum ABC { - TheA { x: i64, y: i64 }, - TheB (i64, i32, i32), -} - -// This is a special case since it does not have the implicit discriminant field. -enum Univariant { - TheOnlyCase(i64) -} - -fn main() { - - // 0b0111110001111100011111000111110001111100011111000111110001111100 = 8970181431921507452 - // 0b01111100011111000111110001111100 = 2088533116 - // 0b0111110001111100 = 31868 - // 0b01111100 = 124 - let the_a = TheA { x: 0, y: 8970181431921507452 }; - let the_a_ref: &ABC = &the_a; - - // 0b0001000100010001000100010001000100010001000100010001000100010001 = 1229782938247303441 - // 0b00010001000100010001000100010001 = 286331153 - // 0b0001000100010001 = 4369 - // 0b00010001 = 17 - let the_b = TheB (0, 286331153, 286331153); - let the_b_ref: &ABC = &the_b; - - let univariant = TheOnlyCase(4820353753753434); - let univariant_ref: &Univariant = &univariant; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/borrowed-managed-basic.rs b/src/test/debug-info/borrowed-managed-basic.rs deleted file mode 100644 index e12ebe643a4..00000000000 --- a/src/test/debug-info/borrowed-managed-basic.rs +++ /dev/null @@ -1,111 +0,0 @@ -// 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) - -#![feature(managed_boxes)] - -// Gdb doesn't know about UTF-32 character encoding and will print a rust char as only -// its numerical value. - -// compile-flags:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish -// debugger:print *bool_ref -// check:$1 = true - -// debugger:print *int_ref -// check:$2 = -1 - -// debugger:print *char_ref -// check:$3 = 97 - -// debugger:print/d *i8_ref -// check:$4 = 68 - -// debugger:print *i16_ref -// check:$5 = -16 - -// debugger:print *i32_ref -// check:$6 = -32 - -// debugger:print *i64_ref -// check:$7 = -64 - -// debugger:print *uint_ref -// check:$8 = 1 - -// debugger:print/d *u8_ref -// check:$9 = 100 - -// debugger:print *u16_ref -// check:$10 = 16 - -// debugger:print *u32_ref -// check:$11 = 32 - -// debugger:print *u64_ref -// check:$12 = 64 - -// debugger:print *f32_ref -// check:$13 = 2.5 - -// debugger:print *f64_ref -// check:$14 = 3.5 - -#![allow(unused_variable)] - -fn main() { - let bool_box: @bool = @true; - let bool_ref: &bool = bool_box; - - let int_box: @int = @-1; - let int_ref: &int = int_box; - - let char_box: @char = @'a'; - let char_ref: &char = char_box; - - let i8_box: @i8 = @68; - let i8_ref: &i8 = i8_box; - - let i16_box: @i16 = @-16; - let i16_ref: &i16 = i16_box; - - let i32_box: @i32 = @-32; - let i32_ref: &i32 = i32_box; - - let i64_box: @i64 = @-64; - let i64_ref: &i64 = i64_box; - - let uint_box: @uint = @1; - let uint_ref: &uint = uint_box; - - let u8_box: @u8 = @100; - let u8_ref: &u8 = u8_box; - - let u16_box: @u16 = @16; - let u16_ref: &u16 = u16_box; - - let u32_box: @u32 = @32; - let u32_ref: &u32 = u32_box; - - let u64_box: @u64 = @64; - let u64_ref: &u64 = u64_box; - - let f32_box: @f32 = @2.5; - let f32_ref: &f32 = f32_box; - - let f64_box: @f64 = @3.5; - let f64_ref: &f64 = f64_box; - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/borrowed-struct.rs b/src/test/debug-info/borrowed-struct.rs deleted file mode 100644 index e271a221611..00000000000 --- a/src/test/debug-info/borrowed-struct.rs +++ /dev/null @@ -1,76 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print *stack_val_ref -// check:$1 = {x = 10, y = 23.5} - -// debugger:print *stack_val_interior_ref_1 -// check:$2 = 10 - -// debugger:print *stack_val_interior_ref_2 -// check:$3 = 23.5 - -// debugger:print *ref_to_unnamed -// check:$4 = {x = 11, y = 24.5} - -// debugger:print *managed_val_ref -// check:$5 = {x = 12, y = 25.5} - -// debugger:print *managed_val_interior_ref_1 -// check:$6 = 12 - -// debugger:print *managed_val_interior_ref_2 -// check:$7 = 25.5 - -// debugger:print *unique_val_ref -// check:$8 = {x = 13, y = 26.5} - -// debugger:print *unique_val_interior_ref_1 -// check:$9 = 13 - -// debugger:print *unique_val_interior_ref_2 -// check:$10 = 26.5 - -#![feature(managed_boxes)] -#![allow(unused_variable)] - -struct SomeStruct { - x: int, - y: f64 -} - -fn main() { - let stack_val: SomeStruct = SomeStruct { x: 10, y: 23.5 }; - let stack_val_ref: &SomeStruct = &stack_val; - let stack_val_interior_ref_1: &int = &stack_val.x; - let stack_val_interior_ref_2: &f64 = &stack_val.y; - let ref_to_unnamed: &SomeStruct = &SomeStruct { x: 11, y: 24.5 }; - - let managed_val = @SomeStruct { x: 12, y: 25.5 }; - let managed_val_ref: &SomeStruct = managed_val; - let managed_val_interior_ref_1: &int = &managed_val.x; - let managed_val_interior_ref_2: &f64 = &managed_val.y; - - let unique_val = box SomeStruct { x: 13, y: 26.5 }; - let unique_val_ref: &SomeStruct = unique_val; - let unique_val_interior_ref_1: &int = &unique_val.x; - let unique_val_interior_ref_2: &f64 = &unique_val.y; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/borrowed-tuple.rs b/src/test/debug-info/borrowed-tuple.rs deleted file mode 100644 index b619f8e8ba1..00000000000 --- a/src/test/debug-info/borrowed-tuple.rs +++ /dev/null @@ -1,49 +0,0 @@ -// 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) - -#![feature(managed_boxes)] - -// compile-flags:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print *stack_val_ref -// check:$1 = {-14, -19} - -// debugger:print *ref_to_unnamed -// check:$2 = {-15, -20} - -// debugger:print *managed_val_ref -// check:$3 = {-16, -21} - -// debugger:print *unique_val_ref -// check:$4 = {-17, -22} - -#![allow(unused_variable)] - - -fn main() { - let stack_val: (i16, f32) = (-14, -19f32); - let stack_val_ref: &(i16, f32) = &stack_val; - let ref_to_unnamed: &(i16, f32) = &(-15, -20f32); - - let managed_val: @(i16, f32) = @(-16, -21f32); - let managed_val_ref: &(i16, f32) = managed_val; - - let unique_val: Box<(i16, f32)> = box() (-17, -22f32); - let unique_val_ref: &(i16, f32) = unique_val; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/borrowed-unique-basic.rs b/src/test/debug-info/borrowed-unique-basic.rs deleted file mode 100644 index eaa2679e698..00000000000 --- a/src/test/debug-info/borrowed-unique-basic.rs +++ /dev/null @@ -1,110 +0,0 @@ -// 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) - -// Gdb doesn't know about UTF-32 character encoding and will print a rust char as only -// its numerical value. - -// compile-flags:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish -// debugger:print *bool_ref -// check:$1 = true - -// debugger:print *int_ref -// check:$2 = -1 - -// debugger:print *char_ref -// check:$3 = 97 - -// debugger:print/d *i8_ref -// check:$4 = 68 - -// debugger:print *i16_ref -// check:$5 = -16 - -// debugger:print *i32_ref -// check:$6 = -32 - -// debugger:print *i64_ref -// check:$7 = -64 - -// debugger:print *uint_ref -// check:$8 = 1 - -// debugger:print/d *u8_ref -// check:$9 = 100 - -// debugger:print *u16_ref -// check:$10 = 16 - -// debugger:print *u32_ref -// check:$11 = 32 - -// debugger:print *u64_ref -// check:$12 = 64 - -// debugger:print *f32_ref -// check:$13 = 2.5 - -// debugger:print *f64_ref -// check:$14 = 3.5 - -#![allow(unused_variable)] - - -fn main() { - let bool_box: Box<bool> = box true; - let bool_ref: &bool = bool_box; - - let int_box: Box<int> = box -1; - let int_ref: &int = int_box; - - let char_box: Box<char> = box 'a'; - let char_ref: &char = char_box; - - let i8_box: Box<i8> = box 68; - let i8_ref: &i8 = i8_box; - - let i16_box: Box<i16> = box -16; - let i16_ref: &i16 = i16_box; - - let i32_box: Box<i32> = box -32; - let i32_ref: &i32 = i32_box; - - let i64_box: Box<i64> = box -64; - let i64_ref: &i64 = i64_box; - - let uint_box: Box<uint> = box 1; - let uint_ref: &uint = uint_box; - - let u8_box: Box<u8> = box 100; - let u8_ref: &u8 = u8_box; - - let u16_box: Box<u16> = box 16; - let u16_ref: &u16 = u16_box; - - let u32_box: Box<u32> = box 32; - let u32_ref: &u32 = u32_box; - - let u64_box: Box<u64> = box 64; - let u64_ref: &u64 = u64_box; - - let f32_box: Box<f32> = box 2.5; - let f32_ref: &f32 = f32_box; - - let f64_box: Box<f64> = box 3.5; - let f64_ref: &f64 = f64_box; - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/box.rs b/src/test/debug-info/box.rs deleted file mode 100644 index a849a058332..00000000000 --- a/src/test/debug-info/box.rs +++ /dev/null @@ -1,38 +0,0 @@ -// 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:-g -// debugger:set print pretty off -// debugger:rbreak zzz -// debugger:run -// debugger:finish -// debugger:print *a -// check:$1 = 1 -// debugger:print *b -// check:$2 = {2, 3.5} -// debugger:print c->val -// check:$3 = 4 -// debugger:print d->val -// check:$4 = false - -#![feature(managed_boxes)] -#![allow(unused_variable)] - -fn main() { - let a = box 1; - let b = box() (2, 3.5); - let c = @4; - let d = @false; - _zzz(); -} - -fn _zzz() {()} diff --git a/src/test/debug-info/boxed-struct.rs b/src/test/debug-info/boxed-struct.rs deleted file mode 100644 index a286fca22c1..00000000000 --- a/src/test/debug-info/boxed-struct.rs +++ /dev/null @@ -1,63 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print *unique -// check:$1 = {x = 99, y = 999, z = 9999, w = 99999} - -// debugger:print managed->val -// check:$2 = {x = 88, y = 888, z = 8888, w = 88888} - -// debugger:print *unique_dtor -// check:$3 = {x = 77, y = 777, z = 7777, w = 77777} - -// debugger:print managed_dtor->val -// check:$4 = {x = 33, y = 333, z = 3333, w = 33333} - -#![feature(managed_boxes)] -#![allow(unused_variable)] - - -struct StructWithSomePadding { - x: i16, - y: i32, - z: i32, - w: i64 -} - -struct StructWithDestructor { - x: i16, - y: i32, - z: i32, - w: i64 -} - -impl Drop for StructWithDestructor { - fn drop(&mut self) {} -} - -fn main() { - - let unique = box StructWithSomePadding { x: 99, y: 999, z: 9999, w: 99999 }; - let managed = @StructWithSomePadding { x: 88, y: 888, z: 8888, w: 88888 }; - - let unique_dtor = box StructWithDestructor { x: 77, y: 777, z: 7777, w: 77777 }; - let managed_dtor = @StructWithDestructor { x: 33, y: 333, z: 3333, w: 33333 }; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/by-value-non-immediate-argument.rs b/src/test/debug-info/by-value-non-immediate-argument.rs deleted file mode 100644 index ce876e9907f..00000000000 --- a/src/test/debug-info/by-value-non-immediate-argument.rs +++ /dev/null @@ -1,103 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print s -// check:$1 = {a = 1, b = 2.5} -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$2 = {a = 3, b = 4.5} -// debugger:print y -// check:$3 = 5 -// debugger:print z -// check:$4 = 6.5 -// debugger:continue - -// debugger:finish -// debugger:print a -// check:$5 = {7, 8, 9.5, 10.5} -// debugger:continue - -// debugger:finish -// debugger:print a -// check:$6 = {11.5, 12.5, 13, 14} -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$7 = {{Case1, x = 0, y = 8970181431921507452}, {Case1, 0, 2088533116, 2088533116}} -// debugger:continue - -#![feature(struct_variant)] - -#[deriving(Clone)] -struct Struct { - a: int, - b: f64 -} - -#[deriving(Clone)] -struct StructStruct { - a: Struct, - b: Struct -} - -fn fun(s: Struct) { - zzz(); -} - -fn fun_fun(StructStruct { a: x, b: Struct { a: y, b: z } }: StructStruct) { - zzz(); -} - -fn tup(a: (int, uint, f64, f64)) { - zzz(); -} - -struct Newtype(f64, f64, int, uint); - -fn new_type(a: Newtype) { - zzz(); -} - -// The first element is to ensure proper alignment, irrespective of the machines word size. Since -// the size of the discriminant value is machine dependent, this has be taken into account when -// datatype layout should be predictable as in this case. -enum Enum { - Case1 { x: i64, y: i64 }, - Case2 (i64, i32, i32), -} - -fn by_val_enum(x: Enum) { - zzz(); -} - -fn main() { - fun(Struct { a: 1, b: 2.5 }); - fun_fun(StructStruct { a: Struct { a: 3, b: 4.5 }, b: Struct { a: 5, b: 6.5 } }); - tup((7, 8, 9.5, 10.5)); - new_type(Newtype(11.5, 12.5, 13, 14)); - - // 0b0111110001111100011111000111110001111100011111000111110001111100 = 8970181431921507452 - // 0b01111100011111000111110001111100 = 2088533116 - // 0b0111110001111100 = 31868 - // 0b01111100 = 124 - by_val_enum(Case1 { x: 0, y: 8970181431921507452 }); -} - -fn zzz() {()} diff --git a/src/test/debug-info/by-value-self-argument-in-trait-impl.rs b/src/test/debug-info/by-value-self-argument-in-trait-impl.rs deleted file mode 100644 index f8973f79c5f..00000000000 --- a/src/test/debug-info/by-value-self-argument-in-trait-impl.rs +++ /dev/null @@ -1,83 +0,0 @@ -// 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) - -#![feature(managed_boxes)] - -// compile-flags:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print self -// check:$1 = 1111 -// debugger:continue - -// debugger:finish -// debugger:print self -// check:$2 = {x = 2222, y = 3333} -// debugger:continue - -// debugger:finish -// debugger:print self -// check:$3 = {4444.5, 5555, 6666, 7777.5} -// debugger:continue - -// debugger:finish -// debugger:print self->val -// check:$4 = 8888 -// debugger:continue - -trait Trait { - fn method(self) -> Self; -} - -impl Trait for int { - fn method(self) -> int { - zzz(); - self - } -} - -struct Struct { - x: uint, - y: uint, -} - -impl Trait for Struct { - fn method(self) -> Struct { - zzz(); - self - } -} - -impl Trait for (f64, int, int, f64) { - fn method(self) -> (f64, int, int, f64) { - zzz(); - self - } -} - -impl Trait for @int { - fn method(self) -> @int { - zzz(); - self - } -} - -fn main() { - let _ = (1111 as int).method(); - let _ = Struct { x: 2222, y: 3333 }.method(); - let _ = (4444.5, 5555, 6666, 7777.5).method(); - let _ = (@8888).method(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/c-style-enum-in-composite.rs b/src/test/debug-info/c-style-enum-in-composite.rs deleted file mode 100644 index 08104c2341e..00000000000 --- a/src/test/debug-info/c-style-enum-in-composite.rs +++ /dev/null @@ -1,121 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print tuple_interior_padding -// check:$1 = {0, OneHundred} - -// debugger:print tuple_padding_at_end -// check:$2 = {{1, OneThousand}, 2} - -// debugger:print tuple_different_enums -// check:$3 = {OneThousand, MountainView, OneMillion, Vienna} - -// debugger:print padded_struct -// check:$4 = {a = 3, b = OneMillion, c = 4, d = Toronto, e = 5} - -// debugger:print packed_struct -// check:$5 = {a = 6, b = OneHundred, c = 7, d = Vienna, e = 8} - -// debugger:print non_padded_struct -// check:$6 = {a = OneMillion, b = MountainView, c = OneThousand, d = Toronto} - -// debugger:print struct_with_drop -// check:$7 = {{a = OneHundred, b = Vienna}, 9} - -#![allow(unused_variable)] - -enum AnEnum { - OneHundred = 100, - OneThousand = 1000, - OneMillion = 1000000 -} - -enum AnotherEnum { - MountainView, - Toronto, - Vienna -} - -struct PaddedStruct { - a: i16, - b: AnEnum, - c: i16, - d: AnotherEnum, - e: i16 -} - -#[packed] -struct PackedStruct { - a: i16, - b: AnEnum, - c: i16, - d: AnotherEnum, - e: i16 -} - -struct NonPaddedStruct { - a: AnEnum, - b: AnotherEnum, - c: AnEnum, - d: AnotherEnum -} - -struct StructWithDrop { - a: AnEnum, - b: AnotherEnum -} - -impl Drop for StructWithDrop { - fn drop(&mut self) {()} -} - -fn main() { - - let tuple_interior_padding = (0_i16, OneHundred); - // It will depend on the machine architecture if any padding is actually involved here - let tuple_padding_at_end = ((1_u64, OneThousand), 2_u64); - let tuple_different_enums = (OneThousand, MountainView, OneMillion, Vienna); - - let padded_struct = PaddedStruct { - a: 3, - b: OneMillion, - c: 4, - d: Toronto, - e: 5 - }; - - let packed_struct = PackedStruct { - a: 6, - b: OneHundred, - c: 7, - d: Vienna, - e: 8 - }; - - let non_padded_struct = NonPaddedStruct { - a: OneMillion, - b: MountainView, - c: OneThousand, - d: Toronto - }; - - let struct_with_drop = (StructWithDrop { a: OneHundred, b: Vienna }, 9_i64); - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/c-style-enum.rs b/src/test/debug-info/c-style-enum.rs deleted file mode 100644 index 0a207881bd3..00000000000 --- a/src/test/debug-info/c-style-enum.rs +++ /dev/null @@ -1,130 +0,0 @@ -// 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-win32: FIXME #13256 -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:rbreak zzz - -// debugger:print 'c-style-enum::SINGLE_VARIANT' -// check:$1 = TheOnlyVariant - -// debugger:print 'c-style-enum::AUTO_ONE' -// check:$2 = One - -// debugger:print 'c-style-enum::AUTO_TWO' -// check:$3 = One - -// debugger:print 'c-style-enum::AUTO_THREE' -// check:$4 = One - -// debugger:print 'c-style-enum::MANUAL_ONE' -// check:$5 = OneHundred - -// debugger:print 'c-style-enum::MANUAL_TWO' -// check:$6 = OneHundred - -// debugger:print 'c-style-enum::MANUAL_THREE' -// check:$7 = OneHundred - -// debugger:run -// debugger:finish - -// debugger:print auto_one -// check:$8 = One - -// debugger:print auto_two -// check:$9 = Two - -// debugger:print auto_three -// check:$10 = Three - -// debugger:print manual_one_hundred -// check:$11 = OneHundred - -// debugger:print manual_one_thousand -// check:$12 = OneThousand - -// debugger:print manual_one_million -// check:$13 = OneMillion - -// debugger:print single_variant -// check:$14 = TheOnlyVariant - -// debugger:print 'c-style-enum::AUTO_TWO' -// check:$15 = Two - -// debugger:print 'c-style-enum::AUTO_THREE' -// check:$16 = Three - -// debugger:print 'c-style-enum::MANUAL_TWO' -// check:$17 = OneThousand - -// debugger:print 'c-style-enum::MANUAL_THREE' -// check:$18 = OneMillion - -#![allow(unused_variable)] -#![allow(dead_code)] - -enum AutoDiscriminant { - One, - Two, - Three -} - -enum ManualDiscriminant { - OneHundred = 100, - OneThousand = 1000, - OneMillion = 1000000 -} - -enum SingleVariant { - TheOnlyVariant -} - -static SINGLE_VARIANT: SingleVariant = TheOnlyVariant; - -static mut AUTO_ONE: AutoDiscriminant = One; -static mut AUTO_TWO: AutoDiscriminant = One; -static mut AUTO_THREE: AutoDiscriminant = One; - -static mut MANUAL_ONE: ManualDiscriminant = OneHundred; -static mut MANUAL_TWO: ManualDiscriminant = OneHundred; -static mut MANUAL_THREE: ManualDiscriminant = OneHundred; - -fn main() { - - let auto_one = One; - let auto_two = Two; - let auto_three = Three; - - let manual_one_hundred = OneHundred; - let manual_one_thousand = OneThousand; - let manual_one_million = OneMillion; - - let single_variant = TheOnlyVariant; - - unsafe { - AUTO_TWO = Two; - AUTO_THREE = Three; - - MANUAL_TWO = OneThousand; - MANUAL_THREE = OneMillion; - }; - - zzz(); - - let a = SINGLE_VARIANT; - let a = unsafe { AUTO_ONE }; - let a = unsafe { MANUAL_ONE }; -} - -fn zzz() {()} diff --git a/src/test/debug-info/closure-in-generic-function.rs b/src/test/debug-info/closure-in-generic-function.rs deleted file mode 100644 index f3692e7bf96..00000000000 --- a/src/test/debug-info/closure-in-generic-function.rs +++ /dev/null @@ -1,46 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print x -// check:$1 = 0.5 -// debugger:print y -// check:$2 = 10 -// debugger:continue - -// debugger:finish -// debugger:print *x -// check:$3 = 29 -// debugger:print *y -// check:$4 = 110 -// debugger:continue - -fn some_generic_fun<T1, T2>(a: T1, b: T2) -> (T2, T1) { - - let closure = |x, y| { - zzz(); - (y, x) - }; - - closure(a, b) -} - -fn main() { - some_generic_fun(0.5, 10); - some_generic_fun(&29, box 110); -} - -fn zzz() {()} diff --git a/src/test/debug-info/destructured-fn-argument.rs b/src/test/debug-info/destructured-fn-argument.rs deleted file mode 100644 index 2f7fc961cdd..00000000000 --- a/src/test/debug-info/destructured-fn-argument.rs +++ /dev/null @@ -1,321 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print a -// check:$1 = 1 -// debugger:print b -// check:$2 = false -// debugger:continue - -// debugger:finish -// debugger:print a -// check:$3 = 2 -// debugger:print b -// check:$4 = 3 -// debugger:print c -// check:$5 = 4 -// debugger:continue - -// debugger:finish -// debugger:print a -// check:$6 = 5 -// debugger:print b -// check:$7 = {6, 7} -// debugger:continue - -// debugger:finish -// debugger:print h -// check:$8 = 8 -// debugger:print i -// check:$9 = {a = 9, b = 10} -// debugger:print j -// check:$10 = 11 -// debugger:continue - -// debugger:finish -// debugger:print k -// check:$11 = 12 -// debugger:print l -// check:$12 = 13 -// debugger:continue - -// debugger:finish -// debugger:print m -// check:$13 = 14 -// debugger:print n -// check:$14 = 16 -// debugger:continue - -// debugger:finish -// debugger:print o -// check:$15 = 18 -// debugger:continue - -// debugger:finish -// debugger:print p -// check:$16 = 19 -// debugger:print q -// check:$17 = 20 -// debugger:print r -// check:$18 = {a = 21, b = 22} -// debugger:continue - -// debugger:finish -// debugger:print s -// check:$19 = 24 -// debugger:print t -// check:$20 = 23 -// debugger:continue - -// debugger:finish -// debugger:print u -// check:$21 = 25 -// debugger:print v -// check:$22 = 26 -// debugger:print w -// check:$23 = 27 -// debugger:print x -// check:$24 = 28 -// debugger:print y -// check:$25 = 29 -// debugger:print z -// check:$26 = 30 -// debugger:print ae -// check:$27 = 31 -// debugger:print oe -// check:$28 = 32 -// debugger:print ue -// check:$29 = 33 -// debugger:continue - -// debugger:finish -// debugger:print aa -// check:$30 = {34, 35} -// debugger:continue - -// debugger:finish -// debugger:print bb -// check:$31 = {36, 37} -// debugger:continue - -// debugger:finish -// debugger:print cc -// check:$32 = 38 -// debugger:continue - -// debugger:finish -// debugger:print dd -// check:$33 = {40, 41, 42} -// debugger:continue - -// debugger:finish -// debugger:print *ee -// check:$34 = {43, 44, 45} -// debugger:continue - -// debugger:finish -// debugger:print *ff -// check:$35 = 46 -// debugger:print gg -// check:$36 = {47, 48} -// debugger:continue - -// debugger:finish -// debugger:print *hh -// check:$37 = 50 -// debugger:continue - -// debugger:finish -// debugger:print ii -// check:$38 = 51 -// debugger:continue - -// debugger:finish -// debugger:print *jj -// check:$39 = 52 -// debugger:continue - -// debugger:finish -// debugger:print kk -// check:$40 = 53 -// debugger:print ll -// check:$41 = 54 -// debugger:continue - -// debugger:finish -// debugger:print mm -// check:$42 = 55 -// debugger:print *nn -// check:$43 = 56 -// debugger:continue - -// debugger:finish -// debugger:print oo -// check:$44 = 57 -// debugger:print pp -// check:$45 = 58 -// debugger:print qq -// check:$46 = 59 -// debugger:continue - -// debugger:finish -// debugger:print rr -// check:$47 = 60 -// debugger:print ss -// check:$48 = 61 -// debugger:print tt -// check:$49 = 62 -// debugger:continue - -#![allow(unused_variable)] - - -struct Struct { - a: i64, - b: i32 -} - -enum Univariant { - Unit(i32) -} - -struct TupleStruct (f64, int); - - -fn simple_tuple((a, b): (int, bool)) { - zzz(); -} - -fn nested_tuple((a, (b, c)): (int, (u16, u16))) { - zzz(); -} - -fn destructure_only_first_level((a, b): (int, (u32, u32))) { - zzz(); -} - -fn struct_as_tuple_element((h, i, j): (i16, Struct, i16)) { - zzz(); -} - -fn struct_pattern(Struct { a: k, b: l }: Struct) { - zzz(); -} - -fn ignored_tuple_element((m, _, n): (int, u16, i32)) { - zzz(); -} - -fn ignored_struct_field(Struct { b: o, .. }: Struct) { - zzz(); -} - -fn one_struct_destructured_one_not((Struct { a: p, b: q }, r): (Struct, Struct)) { - zzz(); -} - -fn different_order_of_struct_fields(Struct { b: s, a: t }: Struct ) { - zzz(); -} - -fn complex_nesting(((u, v ), ((w, (x, Struct { a: y, b: z})), Struct { a: ae, b: oe }), ue ): - ((i16, i32), ((i64, (i32, Struct, )), Struct ), u16)) -{ - zzz(); -} - -fn managed_box(&aa: &(int, int)) { - zzz(); -} - -fn borrowed_pointer(&bb: &(int, int)) { - zzz(); -} - -fn contained_borrowed_pointer((&cc, _): (&int, int)) { - zzz(); -} - -fn unique_pointer(box dd: Box<(int, int, int)>) { - zzz(); -} - -fn ref_binding(ref ee: (int, int, int)) { - zzz(); -} - -fn ref_binding_in_tuple((ref ff, gg): (int, (int, int))) { - zzz(); -} - -fn ref_binding_in_struct(Struct { b: ref hh, .. }: Struct) { - zzz(); -} - -fn univariant_enum(Unit(ii): Univariant) { - zzz(); -} - -fn univariant_enum_with_ref_binding(Unit(ref jj): Univariant) { - zzz(); -} - -fn tuple_struct(TupleStruct(kk, ll): TupleStruct) { - zzz(); -} - -fn tuple_struct_with_ref_binding(TupleStruct(mm, ref nn): TupleStruct) { - zzz(); -} - -fn multiple_arguments((oo, pp): (int, int), qq : int) { - zzz(); -} - -fn main() { - simple_tuple((1, false)); - nested_tuple((2, (3, 4))); - destructure_only_first_level((5, (6, 7))); - struct_as_tuple_element((8, Struct { a: 9, b: 10 }, 11)); - struct_pattern(Struct { a: 12, b: 13 }); - ignored_tuple_element((14, 15, 16)); - ignored_struct_field(Struct { a: 17, b: 18 }); - one_struct_destructured_one_not((Struct { a: 19, b: 20 }, Struct { a: 21, b: 22 })); - different_order_of_struct_fields(Struct { a: 23, b: 24 }); - complex_nesting(((25, 26), ((27, (28, Struct { a: 29, b: 30})), Struct { a: 31, b: 32 }), 33)); - managed_box(&(34, 35)); - borrowed_pointer(&(36, 37)); - contained_borrowed_pointer((&38, 39)); - unique_pointer(box() (40, 41, 42)); - ref_binding((43, 44, 45)); - ref_binding_in_tuple((46, (47, 48))); - ref_binding_in_struct(Struct { a: 49, b: 50 }); - univariant_enum(Unit(51)); - univariant_enum_with_ref_binding(Unit(52)); - tuple_struct(TupleStruct(53.0, 54)); - tuple_struct_with_ref_binding(TupleStruct(55.0, 56)); - multiple_arguments((57, 58), 59); - - fn nested_function(rr: int, (ss, tt): (int, int)) { - zzz(); - } - - nested_function(60, (61, 62)); -} - - -fn zzz() {()} diff --git a/src/test/debug-info/destructured-local.rs b/src/test/debug-info/destructured-local.rs deleted file mode 100644 index 3dab6ace9a8..00000000000 --- a/src/test/debug-info/destructured-local.rs +++ /dev/null @@ -1,210 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print a -// check:$1 = 1 -// debugger:print b -// check:$2 = false - -// debugger:print c -// check:$3 = 2 -// debugger:print d -// check:$4 = 3 -// debugger:print e -// check:$5 = 4 - -// debugger:print f -// check:$6 = 5 -// debugger:print g -// check:$7 = {6, 7} - -// debugger:print h -// check:$8 = 8 -// debugger:print i -// check:$9 = {a = 9, b = 10} -// debugger:print j -// check:$10 = 11 - -// debugger:print k -// check:$11 = 12 -// debugger:print l -// check:$12 = 13 - -// debugger:print m -// check:$13 = 14 -// debugger:print n -// check:$14 = 16 - -// debugger:print o -// check:$15 = 18 - -// debugger:print p -// check:$16 = 19 -// debugger:print q -// check:$17 = 20 -// debugger:print r -// check:$18 = {a = 21, b = 22} - -// debugger:print s -// check:$19 = 24 -// debugger:print t -// check:$20 = 23 - -// debugger:print u -// check:$21 = 25 -// debugger:print v -// check:$22 = 26 -// debugger:print w -// check:$23 = 27 -// debugger:print x -// check:$24 = 28 -// debugger:print y -// check:$25 = 29 -// debugger:print z -// check:$26 = 30 -// debugger:print ae -// check:$27 = 31 -// debugger:print oe -// check:$28 = 32 -// debugger:print ue -// check:$29 = 33 - -// debugger:print aa -// check:$30 = {34, 35} - -// debugger:print bb -// check:$31 = {36, 37} - -// debugger:print cc -// check:$32 = 38 - -// debugger:print dd -// check:$33 = {40, 41, 42} - -// debugger:print *ee -// check:$34 = {43, 44, 45} - -// debugger:print *ff -// check:$35 = 46 - -// debugger:print gg -// check:$36 = {47, 48} - -// debugger:print *hh -// check:$37 = 50 - -// debugger:print ii -// check:$38 = 51 - -// debugger:print *jj -// check:$39 = 52 - -// debugger:print kk -// check:$40 = 53 - -// debugger:print ll -// check:$41 = 54 - -// debugger:print mm -// check:$42 = 55 - -// debugger:print *nn -// check:$43 = 56 - -#![allow(unused_variable)] - -struct Struct { - a: i64, - b: i32 -} - -enum Univariant { - Unit(i32) -} - -struct TupleStruct (f64, int); - - -fn main() { - // simple tuple - let (a, b) : (int, bool) = (1, false); - - // nested tuple - let (c, (d, e)) : (int, (u16, u16)) = (2, (3, 4)); - - // bind tuple-typed value to one name (destructure only first level) - let (f, g) : (int, (u32, u32)) = (5, (6, 7)); - - // struct as tuple element - let (h, i, j) : (i16, Struct, i16) = (8, Struct { a: 9, b: 10 }, 11); - - // struct pattern - let Struct { a: k, b: l } = Struct { a: 12, b: 13 }; - - // ignored tuple element - let (m, _, n) = (14, 15, 16); - - // ignored struct field - let Struct { b: o, .. } = Struct { a: 17, b: 18 }; - - // one struct destructured, one not - let (Struct { a: p, b: q }, r) = (Struct { a: 19, b: 20 }, Struct { a: 21, b: 22 }); - - // different order of struct fields - let Struct { b: s, a: t } = Struct { a: 23, b: 24 }; - - // complex nesting - let ((u, v), ((w, (x, Struct { a: y, b: z})), Struct { a: ae, b: oe }), ue) = - ((25, 26), ((27, (28, Struct { a: 29, b: 30})), Struct { a: 31, b: 32 }), 33); - - // reference - let &aa = &(34, 35); - - // reference - let &bb = &(36, 37); - - // contained reference - let (&cc, _) = (&38, 39); - - // unique pointer - let box dd = box() (40, 41, 42); - - // ref binding - let ref ee = (43, 44, 45); - - // ref binding in tuple - let (ref ff, gg) = (46, (47, 48)); - - // ref binding in struct - let Struct { b: ref hh, .. } = Struct { a: 49, b: 50 }; - - // univariant enum - let Unit(ii) = Unit(51); - - // univariant enum with ref binding - let &Unit(ref jj) = &Unit(52); - - // tuple struct - let &TupleStruct(kk, ll) = &TupleStruct(53.0, 54); - - // tuple struct with ref binding - let &TupleStruct(mm, ref nn) = &TupleStruct(55.0, 56); - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/evec-in-struct.rs b/src/test/debug-info/evec-in-struct.rs deleted file mode 100644 index bf4a4079ea8..00000000000 --- a/src/test/debug-info/evec-in-struct.rs +++ /dev/null @@ -1,90 +0,0 @@ -// 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:-g -// debugger:set print pretty off -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print no_padding1 -// check:$1 = {x = {0, 1, 2}, y = -3, z = {4.5, 5.5}} -// debugger:print no_padding2 -// check:$2 = {x = {6, 7, 8}, y = {{9, 10}, {11, 12}}} - -// debugger:print struct_internal_padding -// check:$3 = {x = {13, 14}, y = {15, 16}} - -// debugger:print single_vec -// check:$4 = {x = {17, 18, 19, 20, 21}} - -// debugger:print struct_padded_at_end -// check:$5 = {x = {22, 23}, y = {24, 25}} - -#![allow(unused_variable)] - -struct NoPadding1 { - x: [u32, ..3], - y: i32, - z: [f32, ..2] -} - -struct NoPadding2 { - x: [u32, ..3], - y: [[u32, ..2], ..2] -} - -struct StructInternalPadding { - x: [i16, ..2], - y: [i64, ..2] -} - -struct SingleVec { - x: [i16, ..5] -} - -struct StructPaddedAtEnd { - x: [i64, ..2], - y: [i16, ..2] -} - -fn main() { - - let no_padding1 = NoPadding1 { - x: [0, 1, 2], - y: -3, - z: [4.5, 5.5] - }; - - let no_padding2 = NoPadding2 { - x: [6, 7, 8], - y: [[9, 10], [11, 12]] - }; - - let struct_internal_padding = StructInternalPadding { - x: [13, 14], - y: [15, 16] - }; - - let single_vec = SingleVec { - x: [17, 18, 19, 20, 21] - }; - - let struct_padded_at_end = StructPaddedAtEnd { - x: [22, 23], - y: [24, 25] - }; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/function-arg-initialization.rs b/src/test/debug-info/function-arg-initialization.rs deleted file mode 100644 index a5e6732aaab..00000000000 --- a/src/test/debug-info/function-arg-initialization.rs +++ /dev/null @@ -1,244 +0,0 @@ -// 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) - -// This test case checks if function arguments already have the correct value when breaking at the -// first line of the function, that is if the function prologue has already been executed at the -// first line. Note that because of the __morestack part of the prologue GDB incorrectly breaks at -// before the arguments have been properly loaded when setting the breakpoint via the function name. -// Therefore the setup here sets them using line numbers (so be careful when changing this file). - -// compile-flags:-g -// debugger:set print pretty off -// debugger:break function-arg-initialization.rs:139 -// debugger:break function-arg-initialization.rs:154 -// debugger:break function-arg-initialization.rs:158 -// debugger:break function-arg-initialization.rs:162 -// debugger:break function-arg-initialization.rs:166 -// debugger:break function-arg-initialization.rs:170 -// debugger:break function-arg-initialization.rs:174 -// debugger:break function-arg-initialization.rs:178 -// debugger:break function-arg-initialization.rs:182 -// debugger:break function-arg-initialization.rs:190 -// debugger:break function-arg-initialization.rs:197 - - -// debugger:run - -// IMMEDIATE ARGS -// debugger:print a -// check:$1 = 1 -// debugger:print b -// check:$2 = true -// debugger:print c -// check:$3 = 2.5 -// debugger:continue - -// NON IMMEDIATE ARGS -// debugger:print a -// check:$4 = {a = 3, b = 4, c = 5, d = 6, e = 7, f = 8, g = 9, h = 10} -// debugger:print b -// check:$5 = {a = 11, b = 12, c = 13, d = 14, e = 15, f = 16, g = 17, h = 18} -// debugger:continue - -// BINDING -// debugger:print a -// check:$6 = 19 -// debugger:print b -// check:$7 = 20 -// debugger:print c -// check:$8 = 21.5 -// debugger:continue - -// ASSIGNMENT -// debugger:print a -// check:$9 = 22 -// debugger:print b -// check:$10 = 23 -// debugger:print c -// check:$11 = 24.5 -// debugger:continue - -// FUNCTION CALL -// debugger:print x -// check:$12 = 25 -// debugger:print y -// check:$13 = 26 -// debugger:print z -// check:$14 = 27.5 -// debugger:continue - -// EXPR -// debugger:print x -// check:$15 = 28 -// debugger:print y -// check:$16 = 29 -// debugger:print z -// check:$17 = 30.5 -// debugger:continue - -// RETURN EXPR -// debugger:print x -// check:$18 = 31 -// debugger:print y -// check:$19 = 32 -// debugger:print z -// check:$20 = 33.5 -// debugger:continue - -// ARITHMETIC EXPR -// debugger:print x -// check:$21 = 34 -// debugger:print y -// check:$22 = 35 -// debugger:print z -// check:$23 = 36.5 -// debugger:continue - -// IF EXPR -// debugger:print x -// check:$24 = 37 -// debugger:print y -// check:$25 = 38 -// debugger:print z -// check:$26 = 39.5 -// debugger:continue - -// WHILE EXPR -// debugger:print x -// check:$27 = 40 -// debugger:print y -// check:$28 = 41 -// debugger:print z -// check:$29 = 42 -// debugger:continue - -// LOOP EXPR -// debugger:print x -// check:$30 = 43 -// debugger:print y -// check:$31 = 44 -// debugger:print z -// check:$32 = 45 -// debugger:continue - -#![allow(unused_variable)] - - - - -fn immediate_args(a: int, b: bool, c: f64) { - () -} - -struct BigStruct { - a: u64, - b: u64, - c: u64, - d: u64, - e: u64, - f: u64, - g: u64, - h: u64 -} - -fn non_immediate_args(a: BigStruct, b: BigStruct) { - () -} - -fn binding(a: i64, b: u64, c: f64) { - let x = 0; -} - -fn assignment(mut a: u64, b: u64, c: f64) { - a = b; -} - -fn function_call(x: u64, y: u64, z: f64) { - std::io::stdio::print("Hi!") -} - -fn identifier(x: u64, y: u64, z: f64) -> u64 { - x -} - -fn return_expr(x: u64, y: u64, z: f64) -> u64 { - return x; -} - -fn arithmetic_expr(x: u64, y: u64, z: f64) -> u64 { - x + y -} - -fn if_expr(x: u64, y: u64, z: f64) -> u64 { - if x + y < 1000 { - x - } else { - y - } -} - -fn while_expr(mut x: u64, y: u64, z: u64) -> u64 { - while x + y < 1000 { - x += z - } - return x; -} - -fn loop_expr(mut x: u64, y: u64, z: u64) -> u64 { - loop { - x += z; - - if x + y > 1000 { - return x; - } - } -} - -fn main() { - immediate_args(1, true, 2.5); - - non_immediate_args( - BigStruct { - a: 3, - b: 4, - c: 5, - d: 6, - e: 7, - f: 8, - g: 9, - h: 10 - }, - BigStruct { - a: 11, - b: 12, - c: 13, - d: 14, - e: 15, - f: 16, - g: 17, - h: 18 - } - ); - - binding(19, 20, 21.5); - assignment(22, 23, 24.5); - function_call(25, 26, 27.5); - identifier(28, 29, 30.5); - return_expr(31, 32, 33.5); - arithmetic_expr(34, 35, 36.5); - if_expr(37, 38, 39.5); - while_expr(40, 41, 42); - loop_expr(43, 44, 45); -} - - - diff --git a/src/test/debug-info/function-arguments.rs b/src/test/debug-info/function-arguments.rs deleted file mode 100644 index d4590051077..00000000000 --- a/src/test/debug-info/function-arguments.rs +++ /dev/null @@ -1,48 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print x -// check:$1 = 111102 -// debugger:print y -// check:$2 = true - -// debugger:continue -// debugger:finish - -// debugger:print a -// check:$3 = 2000 -// debugger:print b -// check:$4 = 3000 - -fn main() { - - fun(111102, true); - nested(2000, 3000); - - fn nested(a: i32, b: i64) -> (i32, i64) { - zzz(); - (a, b) - } -} - -fn fun(x: int, y: bool) -> (int, bool) { - zzz(); - - (x, y) -} - -fn zzz() {()} diff --git a/src/test/debug-info/function-prologue-stepping-no-split-stack.rs b/src/test/debug-info/function-prologue-stepping-no-split-stack.rs deleted file mode 100644 index 6f273057a1b..00000000000 --- a/src/test/debug-info/function-prologue-stepping-no-split-stack.rs +++ /dev/null @@ -1,246 +0,0 @@ -// 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) - -// This test case checks if function arguments already have the correct value when breaking at the -// beginning of a function. Functions with the #[no_split_stack] attribute have the same prologue as -// regular C functions compiled with GCC or Clang and therefore are better handled by GDB. As a -// consequence, and as opposed to regular Rust functions, we can set the breakpoints via the -// function name (and don't have to fall back on using line numbers). - -// compile-flags:-g -// debugger:set print pretty off -// debugger:rbreak immediate_args -// debugger:rbreak binding -// debugger:rbreak assignment -// debugger:rbreak function_call -// debugger:rbreak identifier -// debugger:rbreak return_expr -// debugger:rbreak arithmetic_expr -// debugger:rbreak if_expr -// debugger:rbreak while_expr -// debugger:rbreak loop_expr -// debugger:run - -// IMMEDIATE ARGS -// debugger:print a -// check:$1 = 1 -// debugger:print b -// check:$2 = true -// debugger:print c -// check:$3 = 2.5 -// debugger:continue - -// NON IMMEDIATE ARGS -// debugger:print a -// check:$4 = {a = 3, b = 4, c = 5, d = 6, e = 7, f = 8, g = 9, h = 10} -// debugger:print b -// check:$5 = {a = 11, b = 12, c = 13, d = 14, e = 15, f = 16, g = 17, h = 18} -// debugger:continue - -// BINDING -// debugger:print a -// check:$6 = 19 -// debugger:print b -// check:$7 = 20 -// debugger:print c -// check:$8 = 21.5 -// debugger:continue - -// ASSIGNMENT -// debugger:print a -// check:$9 = 22 -// debugger:print b -// check:$10 = 23 -// debugger:print c -// check:$11 = 24.5 -// debugger:continue - -// FUNCTION CALL -// debugger:print x -// check:$12 = 25 -// debugger:print y -// check:$13 = 26 -// debugger:print z -// check:$14 = 27.5 -// debugger:continue - -// EXPR -// debugger:print x -// check:$15 = 28 -// debugger:print y -// check:$16 = 29 -// debugger:print z -// check:$17 = 30.5 -// debugger:continue - -// RETURN EXPR -// debugger:print x -// check:$18 = 31 -// debugger:print y -// check:$19 = 32 -// debugger:print z -// check:$20 = 33.5 -// debugger:continue - -// ARITHMETIC EXPR -// debugger:print x -// check:$21 = 34 -// debugger:print y -// check:$22 = 35 -// debugger:print z -// check:$23 = 36.5 -// debugger:continue - -// IF EXPR -// debugger:print x -// check:$24 = 37 -// debugger:print y -// check:$25 = 38 -// debugger:print z -// check:$26 = 39.5 -// debugger:continue - -// WHILE EXPR -// debugger:print x -// check:$27 = 40 -// debugger:print y -// check:$28 = 41 -// debugger:print z -// check:$29 = 42 -// debugger:continue - -// LOOP EXPR -// debugger:print x -// check:$30 = 43 -// debugger:print y -// check:$31 = 44 -// debugger:print z -// check:$32 = 45 -// debugger:continue - -#![allow(unused_variable)] - -#[no_split_stack] -fn immediate_args(a: int, b: bool, c: f64) { - () -} - -struct BigStruct { - a: u64, - b: u64, - c: u64, - d: u64, - e: u64, - f: u64, - g: u64, - h: u64 -} - -#[no_split_stack] -fn non_immediate_args(a: BigStruct, b: BigStruct) { - () -} - -#[no_split_stack] -fn binding(a: i64, b: u64, c: f64) { - let x = 0; -} - -#[no_split_stack] -fn assignment(mut a: u64, b: u64, c: f64) { - a = b; -} - -#[no_split_stack] -fn function_call(x: u64, y: u64, z: f64) { - std::io::stdio::print("Hi!") -} - -#[no_split_stack] -fn identifier(x: u64, y: u64, z: f64) -> u64 { - x -} - -#[no_split_stack] -fn return_expr(x: u64, y: u64, z: f64) -> u64 { - return x; -} - -#[no_split_stack] -fn arithmetic_expr(x: u64, y: u64, z: f64) -> u64 { - x + y -} - -#[no_split_stack] -fn if_expr(x: u64, y: u64, z: f64) -> u64 { - if x + y < 1000 { - x - } else { - y - } -} - -#[no_split_stack] -fn while_expr(mut x: u64, y: u64, z: u64) -> u64 { - while x + y < 1000 { - x += z - } - return x; -} - -#[no_split_stack] -fn loop_expr(mut x: u64, y: u64, z: u64) -> u64 { - loop { - x += z; - - if x + y > 1000 { - return x; - } - } -} - -fn main() { - immediate_args(1, true, 2.5); - - non_immediate_args( - BigStruct { - a: 3, - b: 4, - c: 5, - d: 6, - e: 7, - f: 8, - g: 9, - h: 10 - }, - BigStruct { - a: 11, - b: 12, - c: 13, - d: 14, - e: 15, - f: 16, - g: 17, - h: 18 - } - ); - - binding(19, 20, 21.5); - assignment(22, 23, 24.5); - function_call(25, 26, 27.5); - identifier(28, 29, 30.5); - return_expr(31, 32, 33.5); - arithmetic_expr(34, 35, 36.5); - if_expr(37, 38, 39.5); - while_expr(40, 41, 42); - loop_expr(43, 44, 45); -} diff --git a/src/test/debug-info/generic-function.rs b/src/test/debug-info/generic-function.rs deleted file mode 100644 index 6197520e793..00000000000 --- a/src/test/debug-info/generic-function.rs +++ /dev/null @@ -1,63 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print *t0 -// check:$1 = 1 -// debugger:print *t1 -// check:$2 = 2.5 -// debugger:print ret -// check:$3 = {{1, 2.5}, {2.5, 1}} -// debugger:continue - -// debugger:finish -// debugger:print *t0 -// check:$4 = 3.5 -// debugger:print *t1 -// check:$5 = 4 -// debugger:print ret -// check:$6 = {{3.5, 4}, {4, 3.5}} -// debugger:continue - -// debugger:finish -// debugger:print *t0 -// check:$7 = 5 -// debugger:print *t1 -// check:$8 = {a = 6, b = 7.5} -// debugger:print ret -// check:$9 = {{5, {a = 6, b = 7.5}}, {{a = 6, b = 7.5}, 5}} -// debugger:continue - -#[deriving(Clone)] -struct Struct { - a: int, - b: f64 -} - -fn dup_tup<T0: Clone, T1: Clone>(t0: &T0, t1: &T1) -> ((T0, T1), (T1, T0)) { - let ret = ((t0.clone(), t1.clone()), (t1.clone(), t0.clone())); - zzz(); - ret -} - -fn main() { - - let _ = dup_tup(&1, &2.5); - let _ = dup_tup(&3.5, &4_u16); - let _ = dup_tup(&5, &Struct { a: 6, b: 7.5 }); -} - -fn zzz() {()} diff --git a/src/test/debug-info/generic-functions-nested.rs b/src/test/debug-info/generic-functions-nested.rs deleted file mode 100644 index 20991ba03c2..00000000000 --- a/src/test/debug-info/generic-functions-nested.rs +++ /dev/null @@ -1,59 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print x -// check:$1 = -1 -// debugger:print y -// check:$2 = 1 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$3 = -1 -// debugger:print y -// check:$4 = 2.5 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$5 = -2.5 -// debugger:print y -// check:$6 = 1 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$7 = -2.5 -// debugger:print y -// check:$8 = 2.5 -// debugger:continue - -fn outer<TA: Clone>(a: TA) { - inner(a.clone(), 1); - inner(a.clone(), 2.5); - - fn inner<TX, TY>(x: TX, y: TY) { - zzz(); - } -} - -fn main() { - outer(-1); - outer(-2.5); -} - -fn zzz() {()} diff --git a/src/test/debug-info/generic-method-on-generic-struct.rs b/src/test/debug-info/generic-method-on-generic-struct.rs deleted file mode 100644 index 7afa8952998..00000000000 --- a/src/test/debug-info/generic-method-on-generic-struct.rs +++ /dev/null @@ -1,100 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// STACK BY REF -// debugger:finish -// debugger:print *self -// check:$1 = {x = {8888, -8888}} -// debugger:print arg1 -// check:$2 = -1 -// debugger:print/d arg2 -// check:$3 = -2 -// debugger:continue - -// STACK BY VAL -// debugger:finish -// debugger:print self -// check:$4 = {x = {8888, -8888}} -// debugger:print arg1 -// check:$5 = -3 -// debugger:print arg2 -// check:$6 = -4 -// debugger:continue - -// OWNED BY REF -// debugger:finish -// debugger:print *self -// check:$7 = {x = 1234.5} -// debugger:print arg1 -// check:$8 = -5 -// debugger:print arg2 -// check:$9 = -6 -// debugger:continue - -// OWNED BY VAL -// debugger:finish -// debugger:print self -// check:$10 = {x = 1234.5} -// debugger:print arg1 -// check:$11 = -7 -// debugger:print arg2 -// check:$12 = -8 -// debugger:continue - -// OWNED MOVED -// debugger:finish -// debugger:print *self -// check:$13 = {x = 1234.5} -// debugger:print arg1 -// check:$14 = -9 -// debugger:print arg2 -// check:$15 = -10.5 -// debugger:continue - -struct Struct<T> { - x: T -} - -impl<T1> Struct<T1> { - - fn self_by_ref<T2>(&self, arg1: int, arg2: T2) -> int { - zzz(); - arg1 - } - - fn self_by_val<T2>(self, arg1: int, arg2: T2) -> int { - zzz(); - arg1 - } - - fn self_owned<T2>(~self, arg1: int, arg2: T2) -> int { - zzz(); - arg1 - } -} - -fn main() { - let stack = Struct { x: (8888_u32, -8888_i32) }; - let _ = stack.self_by_ref(-1, -2_i8); - let _ = stack.self_by_val(-3, -4_i16); - - let owned = box Struct { x: 1234.5 }; - let _ = owned.self_by_ref(-5, -6_i32); - let _ = owned.self_by_val(-7, -8_i64); - let _ = owned.self_owned(-9, -10.5_f32); -} - -fn zzz() {()} diff --git a/src/test/debug-info/generic-static-method-on-struct-and-enum.rs b/src/test/debug-info/generic-static-method-on-struct-and-enum.rs deleted file mode 100644 index 224e7aaed21..00000000000 --- a/src/test/debug-info/generic-static-method-on-struct-and-enum.rs +++ /dev/null @@ -1,68 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// STRUCT -// debugger:finish -// debugger:print arg1 -// check:$1 = 1 -// debugger:print arg2 -// check:$2 = 2 -// debugger:continue - -// ENUM -// debugger:finish -// debugger:print arg1 -// check:$3 = -3 -// debugger:print arg2 -// check:$4 = 4.5 -// debugger:print arg3 -// check:$5 = 5 -// debugger:continue - -#![feature(struct_variant)] - -struct Struct { - x: int -} - -impl Struct { - - fn static_method<T1, T2>(arg1: T1, arg2: T2) -> int { - zzz(); - return 0; - } -} - -enum Enum { - Variant1 { x: int }, - Variant2, - Variant3(f64, int, char), -} - -impl Enum { - - fn static_method<T1, T2, T3>(arg1: T1, arg2: T2, arg3: T3) -> int { - zzz(); - return 1; - } -} - -fn main() { - Struct::static_method(1, 2); - Enum::static_method(-3, 4.5, 5); -} - -fn zzz() {()} diff --git a/src/test/debug-info/generic-struct-style-enum.rs b/src/test/debug-info/generic-struct-style-enum.rs deleted file mode 100644 index e32110a41f4..00000000000 --- a/src/test/debug-info/generic-struct-style-enum.rs +++ /dev/null @@ -1,80 +0,0 @@ -// 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-tidy-linelength -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:set print union on -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print case1 -// check:$1 = {{Case1, a = 0, b = 31868, c = 31868, d = 31868, e = 31868}, {Case1, a = 0, b = 2088533116, c = 2088533116}, {Case1, a = 0, b = 8970181431921507452}} - -// debugger:print case2 -// check:$2 = {{Case2, a = 0, b = 4369, c = 4369, d = 4369, e = 4369}, {Case2, a = 0, b = 286331153, c = 286331153}, {Case2, a = 0, b = 1229782938247303441}} - -// debugger:print case3 -// check:$3 = {{Case3, a = 0, b = 22873, c = 22873, d = 22873, e = 22873}, {Case3, a = 0, b = 1499027801, c = 1499027801}, {Case3, a = 0, b = 6438275382588823897}} - -// debugger:print univariant -// check:$4 = {a = -1} - -#![feature(struct_variant)] - -// NOTE: This is a copy of the non-generic test case. The `Txx` type parameters have to be -// substituted with something of size `xx` bits and the same alignment as an integer type of the -// same size. - -// The first element is to ensure proper alignment, irrespective of the machines word size. Since -// the size of the discriminant value is machine dependent, this has be taken into account when -// datatype layout should be predictable as in this case. -enum Regular<T16, T32, T64> { - Case1 { a: T64, b: T16, c: T16, d: T16, e: T16}, - Case2 { a: T64, b: T32, c: T32}, - Case3 { a: T64, b: T64 } -} - -enum Univariant<T> { - TheOnlyCase { a: T } -} - -fn main() { - - // In order to avoid endianess trouble all of the following test values consist of a single - // repeated byte. This way each interpretation of the union should look the same, no matter if - // this is a big or little endian machine. - - // 0b0111110001111100011111000111110001111100011111000111110001111100 = 8970181431921507452 - // 0b01111100011111000111110001111100 = 2088533116 - // 0b0111110001111100 = 31868 - // 0b01111100 = 124 - let case1: Regular<u16, u32, i64> = Case1 { a: 0, b: 31868, c: 31868, d: 31868, e: 31868 }; - - // 0b0001000100010001000100010001000100010001000100010001000100010001 = 1229782938247303441 - // 0b00010001000100010001000100010001 = 286331153 - // 0b0001000100010001 = 4369 - // 0b00010001 = 17 - let case2: Regular<i16, u32, i64> = Case2 { a: 0, b: 286331153, c: 286331153 }; - - // 0b0101100101011001010110010101100101011001010110010101100101011001 = 6438275382588823897 - // 0b01011001010110010101100101011001 = 1499027801 - // 0b0101100101011001 = 22873 - // 0b01011001 = 89 - let case3: Regular<u16, i32, u64> = Case3 { a: 0, b: 6438275382588823897 }; - - let univariant = TheOnlyCase { a: -1 }; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/generic-struct.rs b/src/test/debug-info/generic-struct.rs deleted file mode 100644 index 0fd491c55e2..00000000000 --- a/src/test/debug-info/generic-struct.rs +++ /dev/null @@ -1,42 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print int_int -// check:$1 = {key = 0, value = 1} -// debugger:print int_float -// check:$2 = {key = 2, value = 3.5} -// debugger:print float_int -// check:$3 = {key = 4.5, value = 5} -// debugger:print float_int_float -// check:$4 = {key = 6.5, value = {key = 7, value = 8.5}} - -struct AGenericStruct<TKey, TValue> { - key: TKey, - value: TValue -} - -fn main() { - - let int_int = AGenericStruct { key: 0, value: 1 }; - let int_float = AGenericStruct { key: 2, value: 3.5 }; - let float_int = AGenericStruct { key: 4.5, value: 5 }; - let float_int_float = AGenericStruct { key: 6.5, value: AGenericStruct { key: 7, value: 8.5 } }; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/generic-trait-generic-static-default-method.rs b/src/test/debug-info/generic-trait-generic-static-default-method.rs deleted file mode 100644 index fbb1ef1a02a..00000000000 --- a/src/test/debug-info/generic-trait-generic-static-default-method.rs +++ /dev/null @@ -1,53 +0,0 @@ -// ignore-test - -// 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. - -// compile-flags:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print arg1 -// check:$1 = 1000 -// debugger:print *arg2 -// check:$2 = {1, 2.5} -// debugger:continue - -// debugger:finish -// debugger:print arg1 -// check:$3 = 2000 -// debugger:print *arg2 -// check:$4 = {3.5, {4, 5, 6}} -// debugger:continue - - -struct Struct { - x: int -} - -trait Trait<T1> { - fn generic_static_default_method<T2>(arg1: int, arg2: &(T1, T2)) -> int { - zzz(); - arg1 - } -} - -impl<T> Trait<T> for Struct {} - -fn main() { - - // Is this really how to use these? - Trait::generic_static_default_method::<int, Struct, float>(1000, &(1, 2.5)); - Trait::generic_static_default_method::<float, Struct, (int, int, int)>(2000, &(3.5, (4, 5, 6))); - -} - -fn zzz() {()} diff --git a/src/test/debug-info/generic-tuple-style-enum.rs b/src/test/debug-info/generic-tuple-style-enum.rs deleted file mode 100644 index 73a46c30b34..00000000000 --- a/src/test/debug-info/generic-tuple-style-enum.rs +++ /dev/null @@ -1,79 +0,0 @@ -// 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-tidy-linelength -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:set print union on -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print case1 -// check:$1 = {{Case1, 0, 31868, 31868, 31868, 31868}, {Case1, 0, 2088533116, 2088533116}, {Case1, 0, 8970181431921507452}} - -// debugger:print case2 -// check:$2 = {{Case2, 0, 4369, 4369, 4369, 4369}, {Case2, 0, 286331153, 286331153}, {Case2, 0, 1229782938247303441}} - -// debugger:print case3 -// check:$3 = {{Case3, 0, 22873, 22873, 22873, 22873}, {Case3, 0, 1499027801, 1499027801}, {Case3, 0, 6438275382588823897}} - -// debugger:print univariant -// check:$4 = {-1} - - -// NOTE: This is a copy of the non-generic test case. The `Txx` type parameters have to be -// substituted with something of size `xx` bits and the same alignment as an integer type of the -// same size. - -// The first element is to ensure proper alignment, irrespective of the machines word size. Since -// the size of the discriminant value is machine dependent, this has be taken into account when -// datatype layout should be predictable as in this case. -enum Regular<T16, T32, T64> { - Case1(T64, T16, T16, T16, T16), - Case2(T64, T32, T32), - Case3(T64, T64) -} - -enum Univariant<T64> { - TheOnlyCase(T64) -} - -fn main() { - - // In order to avoid endianess trouble all of the following test values consist of a single - // repeated byte. This way each interpretation of the union should look the same, no matter if - // this is a big or little endian machine. - - // 0b0111110001111100011111000111110001111100011111000111110001111100 = 8970181431921507452 - // 0b01111100011111000111110001111100 = 2088533116 - // 0b0111110001111100 = 31868 - // 0b01111100 = 124 - let case1: Regular<u16, u32, u64> = Case1(0_u64, 31868_u16, 31868_u16, 31868_u16, 31868_u16); - - // 0b0001000100010001000100010001000100010001000100010001000100010001 = 1229782938247303441 - // 0b00010001000100010001000100010001 = 286331153 - // 0b0001000100010001 = 4369 - // 0b00010001 = 17 - let case2: Regular<i16, i32, i64> = Case2(0_i64, 286331153_i32, 286331153_i32); - - // 0b0101100101011001010110010101100101011001010110010101100101011001 = 6438275382588823897 - // 0b01011001010110010101100101011001 = 1499027801 - // 0b0101100101011001 = 22873 - // 0b01011001 = 89 - let case3: Regular<i16, i32, i64> = Case3(0_i64, 6438275382588823897_i64); - - let univariant = TheOnlyCase(-1_i64); - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/include_string.rs b/src/test/debug-info/include_string.rs deleted file mode 100644 index 6838af27728..00000000000 --- a/src/test/debug-info/include_string.rs +++ /dev/null @@ -1,37 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish -// debugger:print string1.length -// check:$1 = 48 -// debugger:print string2.length -// check:$2 = 48 -// debugger:print string3.length -// check:$3 = 48 -// debugger:continue - -#![allow(unused_variable)] - -// This test case makes sure that debug info does not ICE when include_str is -// used multiple times (see issue #11322). - -fn main() { - let string1 = include_str!("text-to-include-1.txt"); - let string2 = include_str!("text-to-include-2.txt"); - let string3 = include_str!("text-to-include-3.txt"); - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/issue11600.rs b/src/test/debug-info/issue11600.rs deleted file mode 100644 index 83ad5c4c7fa..00000000000 --- a/src/test/debug-info/issue11600.rs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 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. - -fn main() { - let args : ~[~str] = ::std::os::args(); - ::std::io::println(args[0]); -} - - -// ignore-android: FIXME(#10381) - -// This test case checks whether compile unit names are set correctly, so that the correct default -// source file can be found. - -// compile-flags:-g -// debugger:list -// check:1[...]fn main() { -// check:2[...]let args : ~[~str] = ::std::os::args(); -// check:3[...]::std::io::println(args[0]); -// check:4[...]} - -// 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. diff --git a/src/test/debug-info/issue12886.rs b/src/test/debug-info/issue12886.rs deleted file mode 100644 index 328ed54b5b2..00000000000 --- a/src/test/debug-info/issue12886.rs +++ /dev/null @@ -1,35 +0,0 @@ -// 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:-g -// debugger:break issue12886.rs:29 -// debugger:run -// debugger:next -// check:[...]30[...]s -// debugger:continue - -// IF YOU MODIFY THIS FILE, BE CAREFUL TO ADAPT THE LINE NUMBERS IN THE DEBUGGER COMMANDS - -// This test makes sure that gdb does not set unwanted breakpoints in inlined functions. If a -// breakpoint existed in unwrap(), then calling `next` would (when stopped at line 27) would stop -// in unwrap() instead of stepping over the function invocation. By making sure that `s` is -// contained in the output, after calling `next` just once, we can be sure that we did not stop in -// unwrap(). (The testing framework doesn't allow for checking that some text is *not* contained in -// the output, which is why we have to make the test in this kind of roundabout way) -fn bar() -> int { - let s = Some(5).unwrap(); - s -} - -fn main() { - let _ = bar(); -} diff --git a/src/test/debug-info/issue13213.rs b/src/test/debug-info/issue13213.rs deleted file mode 100644 index a03b263a692..00000000000 --- a/src/test/debug-info/issue13213.rs +++ /dev/null @@ -1,26 +0,0 @@ -// 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) - -// aux-build:issue13213aux.rs -extern crate issue13213aux; - -// compile-flags:-g - -// This tests make sure that we get no linker error when using a completely inlined static. Some -// statics that are marked with AvailableExternallyLinkage in the importing crate, may actually not -// be available because they have been optimized out from the exporting crate. -fn main() { - let b: issue13213aux::S = issue13213aux::A; - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/issue7712.rs b/src/test/debug-info/issue7712.rs deleted file mode 100644 index 8308afce08e..00000000000 --- a/src/test/debug-info/issue7712.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2013 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. - -// compile-flags:--debuginfo=1 - -pub trait TraitWithDefaultMethod { - fn method(self) { - () - } -} - -struct MyStruct; - -impl TraitWithDefaultMethod for MyStruct { } - -pub fn main() { - MyStruct.method(); -} diff --git a/src/test/debug-info/lexical-scope-in-for-loop.rs b/src/test/debug-info/lexical-scope-in-for-loop.rs deleted file mode 100644 index 75f1d779d01..00000000000 --- a/src/test/debug-info/lexical-scope-in-for-loop.rs +++ /dev/null @@ -1,77 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// FIRST ITERATION -// debugger:finish -// debugger:print x -// check:$1 = 1 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$2 = -1 -// debugger:continue - -// SECOND ITERATION -// debugger:finish -// debugger:print x -// check:$3 = 2 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$4 = -2 -// debugger:continue - -// THIRD ITERATION -// debugger:finish -// debugger:print x -// check:$5 = 3 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$6 = -3 -// debugger:continue - -// AFTER LOOP -// debugger:finish -// debugger:print x -// check:$7 = 1000000 -// debugger:continue - -fn main() { - - let range = [1, 2, 3]; - - let x = 1000000; // wan meeeljen doollaars! - - for &x in range.iter() { - zzz(); - sentinel(); - - let x = -1 * x; - - zzz(); - sentinel(); - } - - zzz(); - sentinel(); -} - -fn zzz() {()} -fn sentinel() {()} diff --git a/src/test/debug-info/lexical-scope-in-if.rs b/src/test/debug-info/lexical-scope-in-if.rs deleted file mode 100644 index 712880d50f0..00000000000 --- a/src/test/debug-info/lexical-scope-in-if.rs +++ /dev/null @@ -1,126 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// BEFORE if -// debugger:finish -// debugger:print x -// check:$1 = 999 -// debugger:print y -// check:$2 = -1 -// debugger:continue - -// AT BEGINNING of 'then' block -// debugger:finish -// debugger:print x -// check:$3 = 999 -// debugger:print y -// check:$4 = -1 -// debugger:continue - -// AFTER 1st redeclaration of 'x' -// debugger:finish -// debugger:print x -// check:$5 = 1001 -// debugger:print y -// check:$6 = -1 -// debugger:continue - -// AFTER 2st redeclaration of 'x' -// debugger:finish -// debugger:print x -// check:$7 = 1002 -// debugger:print y -// check:$8 = 1003 -// debugger:continue - -// AFTER 1st if expression -// debugger:finish -// debugger:print x -// check:$9 = 999 -// debugger:print y -// check:$10 = -1 -// debugger:continue - -// BEGINNING of else branch -// debugger:finish -// debugger:print x -// check:$11 = 999 -// debugger:print y -// check:$12 = -1 -// debugger:continue - -// BEGINNING of else branch -// debugger:finish -// debugger:print x -// check:$13 = 1004 -// debugger:print y -// check:$14 = 1005 -// debugger:continue - -// BEGINNING of else branch -// debugger:finish -// debugger:print x -// check:$15 = 999 -// debugger:print y -// check:$16 = -1 -// debugger:continue - -fn main() { - - let x = 999; - let y = -1; - - zzz(); - sentinel(); - - if x < 1000 { - zzz(); - sentinel(); - - let x = 1001; - - zzz(); - sentinel(); - - let x = 1002; - let y = 1003; - zzz(); - sentinel(); - } else { - unreachable!(); - } - - zzz(); - sentinel(); - - if x > 1000 { - unreachable!(); - } else { - zzz(); - sentinel(); - - let x = 1004; - let y = 1005; - zzz(); - sentinel(); - } - - zzz(); - sentinel(); -} - -fn zzz() {()} -fn sentinel() {()} diff --git a/src/test/debug-info/lexical-scope-in-match.rs b/src/test/debug-info/lexical-scope-in-match.rs deleted file mode 100644 index 041c8b5c13f..00000000000 --- a/src/test/debug-info/lexical-scope-in-match.rs +++ /dev/null @@ -1,148 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print shadowed -// check:$1 = 231 -// debugger:print not_shadowed -// check:$2 = 232 -// debugger:continue - -// debugger:finish -// debugger:print shadowed -// check:$3 = 233 -// debugger:print not_shadowed -// check:$4 = 232 -// debugger:print local_to_arm -// check:$5 = 234 -// debugger:continue - -// debugger:finish -// debugger:print shadowed -// check:$6 = 236 -// debugger:print not_shadowed -// check:$7 = 232 -// debugger:continue - -// debugger:finish -// debugger:print shadowed -// check:$8 = 237 -// debugger:print not_shadowed -// check:$9 = 232 -// debugger:print local_to_arm -// check:$10 = 238 -// debugger:continue - -// debugger:finish -// debugger:print shadowed -// check:$11 = 239 -// debugger:print not_shadowed -// check:$12 = 232 -// debugger:continue - -// debugger:finish -// debugger:print shadowed -// check:$13 = 241 -// debugger:print not_shadowed -// check:$14 = 232 -// debugger:continue - -// debugger:finish -// debugger:print shadowed -// check:$15 = 243 -// debugger:print *local_to_arm -// check:$16 = 244 -// debugger:continue - -// debugger:finish -// debugger:print shadowed -// check:$17 = 231 -// debugger:print not_shadowed -// check:$18 = 232 -// debugger:continue - -struct Struct { - x: int, - y: int -} - -fn main() { - - let shadowed = 231; - let not_shadowed = 232; - - zzz(); - sentinel(); - - match (233, 234) { - (shadowed, local_to_arm) => { - - zzz(); - sentinel(); - } - } - - match (235, 236) { - // with literal - (235, shadowed) => { - - zzz(); - sentinel(); - } - _ => {} - } - - match Struct { x: 237, y: 238 } { - Struct { x: shadowed, y: local_to_arm } => { - - zzz(); - sentinel(); - } - } - - match Struct { x: 239, y: 240 } { - // ignored field - Struct { x: shadowed, .. } => { - - zzz(); - sentinel(); - } - } - - match Struct { x: 241, y: 242 } { - // with literal - Struct { x: shadowed, y: 242 } => { - - zzz(); - sentinel(); - } - _ => {} - } - - match (243, 244) { - (shadowed, ref local_to_arm) => { - - zzz(); - sentinel(); - } - } - - zzz(); - sentinel(); -} - -fn zzz() {()} -fn sentinel() {()} diff --git a/src/test/debug-info/lexical-scope-in-parameterless-closure.rs b/src/test/debug-info/lexical-scope-in-parameterless-closure.rs deleted file mode 100644 index fd0a156b454..00000000000 --- a/src/test/debug-info/lexical-scope-in-parameterless-closure.rs +++ /dev/null @@ -1,21 +0,0 @@ -// 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:--debuginfo=1 -// debugger:run - -// Nothing to do here really, just make sure it compiles. See issue #8513. -fn main() { - let _ = ||(); - let _ = range(1u,3).map(|_| 5); -} - diff --git a/src/test/debug-info/lexical-scope-in-stack-closure.rs b/src/test/debug-info/lexical-scope-in-stack-closure.rs deleted file mode 100644 index 41432c66386..00000000000 --- a/src/test/debug-info/lexical-scope-in-stack-closure.rs +++ /dev/null @@ -1,79 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print x -// check:$1 = false -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$2 = false -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$3 = 1000 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$4 = 2.5 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$5 = true -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$6 = false -// debugger:continue - -fn main() { - - let x = false; - - zzz(); - sentinel(); - - let stack_closure: |int| = |x| { - zzz(); - sentinel(); - - let x = 2.5; - - zzz(); - sentinel(); - - let x = true; - - zzz(); - sentinel(); - }; - - zzz(); - sentinel(); - - stack_closure(1000); - - zzz(); - sentinel(); -} - -fn zzz() {()} -fn sentinel() {()} diff --git a/src/test/debug-info/lexical-scope-in-unconditional-loop.rs b/src/test/debug-info/lexical-scope-in-unconditional-loop.rs deleted file mode 100644 index fd217912b0a..00000000000 --- a/src/test/debug-info/lexical-scope-in-unconditional-loop.rs +++ /dev/null @@ -1,127 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// FIRST ITERATION -// debugger:finish -// debugger:print x -// check:$1 = 0 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$2 = 1 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$3 = 101 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$4 = 101 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$5 = -987 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$6 = 101 -// debugger:continue - - -// SECOND ITERATION -// debugger:finish -// debugger:print x -// check:$7 = 1 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$8 = 2 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$9 = 102 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$10 = 102 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$11 = -987 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$12 = 102 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$13 = 2 -// debugger:continue - -fn main() { - - let mut x = 0; - - loop { - if x >= 2 { - break; - } - - zzz(); - sentinel(); - - x += 1; - zzz(); - sentinel(); - - // Shadow x - let x = x + 100; - zzz(); - sentinel(); - - // open scope within loop's top level scope - { - zzz(); - sentinel(); - - let x = -987; - - zzz(); - sentinel(); - } - - // Check that we get the x before the inner scope again - zzz(); - sentinel(); - } - - zzz(); - sentinel(); -} - -fn zzz() {()} -fn sentinel() {()} diff --git a/src/test/debug-info/lexical-scope-in-unique-closure.rs b/src/test/debug-info/lexical-scope-in-unique-closure.rs deleted file mode 100644 index e0ab21221e5..00000000000 --- a/src/test/debug-info/lexical-scope-in-unique-closure.rs +++ /dev/null @@ -1,79 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print x -// check:$1 = false -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$2 = false -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$3 = 1000 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$4 = 2.5 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$5 = true -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$6 = false -// debugger:continue - -fn main() { - - let x = false; - - zzz(); - sentinel(); - - let unique_closure: proc(int) = proc(x) { - zzz(); - sentinel(); - - let x = 2.5; - - zzz(); - sentinel(); - - let x = true; - - zzz(); - sentinel(); - }; - - zzz(); - sentinel(); - - unique_closure(1000); - - zzz(); - sentinel(); -} - -fn zzz() {()} -fn sentinel() {()} diff --git a/src/test/debug-info/lexical-scope-in-while.rs b/src/test/debug-info/lexical-scope-in-while.rs deleted file mode 100644 index a47343467a9..00000000000 --- a/src/test/debug-info/lexical-scope-in-while.rs +++ /dev/null @@ -1,123 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// FIRST ITERATION -// debugger:finish -// debugger:print x -// check:$1 = 0 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$2 = 1 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$3 = 101 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$4 = 101 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$5 = -987 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$6 = 101 -// debugger:continue - - -// SECOND ITERATION -// debugger:finish -// debugger:print x -// check:$7 = 1 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$8 = 2 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$9 = 102 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$10 = 102 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$11 = -987 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$12 = 102 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$13 = 2 -// debugger:continue - -fn main() { - - let mut x = 0; - - while x < 2 { - zzz(); - sentinel(); - - x += 1; - zzz(); - sentinel(); - - // Shadow x - let x = x + 100; - zzz(); - sentinel(); - - // open scope within loop's top level scope - { - zzz(); - sentinel(); - - let x = -987; - - zzz(); - sentinel(); - } - - // Check that we get the x before the inner scope again - zzz(); - sentinel(); - } - - zzz(); - sentinel(); -} - -fn zzz() {()} -fn sentinel() {()} diff --git a/src/test/debug-info/lexical-scope-with-macro.rs b/src/test/debug-info/lexical-scope-with-macro.rs deleted file mode 100644 index 6cbaedfde65..00000000000 --- a/src/test/debug-info/lexical-scope-with-macro.rs +++ /dev/null @@ -1,131 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print a -// check:$1 = 10 -// debugger:print b -// check:$2 = 34 -// debugger:continue - -// debugger:finish -// debugger:print a -// check:$3 = 890242 -// debugger:print b -// check:$4 = 34 -// debugger:continue - -// debugger:finish -// debugger:print a -// check:$5 = 10 -// debugger:print b -// check:$6 = 34 -// debugger:continue - -// debugger:finish -// debugger:print a -// check:$7 = 102 -// debugger:print b -// check:$8 = 34 -// debugger:continue - -// debugger:finish -// debugger:print a -// check:$9 = 110 -// debugger:print b -// check:$10 = 34 -// debugger:continue - -// debugger:finish -// debugger:print a -// check:$11 = 10 -// debugger:print b -// check:$12 = 34 -// debugger:continue - -// debugger:finish -// debugger:print a -// check:$13 = 10 -// debugger:print b -// check:$14 = 34 -// debugger:print c -// check:$15 = 400 -// debugger:continue - -#![feature(macro_rules)] - -macro_rules! trivial( - ($e1:expr) => ($e1) -) - -macro_rules! no_new_scope( - ($e1:expr) => (($e1 + 2) - 1) -) - -macro_rules! new_scope( - () => ({ - let a = 890242; - zzz(); - sentinel(); - }) -) - -macro_rules! shadow_within_macro( - ($e1:expr) => ({ - let a = $e1 + 2; - - zzz(); - sentinel(); - - let a = $e1 + 10; - - zzz(); - sentinel(); - }) -) - - -macro_rules! dup_expr( - ($e1:expr) => (($e1) + ($e1)) -) - - -fn main() { - - let a = trivial!(10); - let b = no_new_scope!(33); - - zzz(); - sentinel(); - - new_scope!(); - - zzz(); - sentinel(); - - shadow_within_macro!(100); - - zzz(); - sentinel(); - - let c = dup_expr!(10 * 20); - - zzz(); - sentinel(); -} - -fn zzz() {()} -fn sentinel() {()} diff --git a/src/test/debug-info/lexical-scopes-in-block-expression.rs b/src/test/debug-info/lexical-scopes-in-block-expression.rs deleted file mode 100644 index 6626d75dc0c..00000000000 --- a/src/test/debug-info/lexical-scopes-in-block-expression.rs +++ /dev/null @@ -1,377 +0,0 @@ -// 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-win32: FIXME #13256 -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:print 'lexical-scopes-in-block-expression::MUT_INT' -// check:$1 = 0 - -// STRUCT EXPRESSION -// debugger:finish -// debugger:print val -// check:$2 = -1 -// debugger:print ten -// check:$3 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$4 = 11 -// debugger:print 'lexical-scopes-in-block-expression::MUT_INT' -// check:$5 = 1 -// debugger:print ten -// check:$6 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$7 = -1 -// debugger:print ten -// check:$8 = 10 -// debugger:continue - -// FUNCTION CALL -// debugger:finish -// debugger:print val -// check:$9 = -1 -// debugger:print ten -// check:$10 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$11 = 12 -// debugger:print 'lexical-scopes-in-block-expression::MUT_INT' -// check:$12 = 2 -// debugger:print ten -// check:$13 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$14 = -1 -// debugger:print ten -// check:$15 = 10 -// debugger:continue - -// TUPLE EXPRESSION -// debugger:finish -// debugger:print val -// check:$16 = -1 -// debugger:print ten -// check:$17 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$18 = 13 -// debugger:print 'lexical-scopes-in-block-expression::MUT_INT' -// check:$19 = 3 -// debugger:print ten -// check:$20 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$21 = -1 -// debugger:print ten -// check:$22 = 10 -// debugger:continue - -// VEC EXPRESSION -// debugger:finish -// debugger:print val -// check:$23 = -1 -// debugger:print ten -// check:$24 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$25 = 14 -// debugger:print 'lexical-scopes-in-block-expression::MUT_INT' -// check:$26 = 4 -// debugger:print ten -// check:$27 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$28 = -1 -// debugger:print ten -// check:$29 = 10 -// debugger:continue - -// REPEAT VEC EXPRESSION -// debugger:finish -// debugger:print val -// check:$30 = -1 -// debugger:print ten -// check:$31 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$32 = 15 -// debugger:print 'lexical-scopes-in-block-expression::MUT_INT' -// check:$33 = 5 -// debugger:print ten -// check:$34 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$35 = -1 -// debugger:print ten -// check:$36 = 10 -// debugger:continue - -// ASSIGNMENT EXPRESSION -// debugger:finish -// debugger:print val -// check:$37 = -1 -// debugger:print ten -// check:$38 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$39 = 16 -// debugger:print 'lexical-scopes-in-block-expression::MUT_INT' -// check:$40 = 6 -// debugger:print ten -// check:$41 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$42 = -1 -// debugger:print ten -// check:$43 = 10 -// debugger:continue - - -// ARITHMETIC EXPRESSION -// debugger:finish -// debugger:print val -// check:$44 = -1 -// debugger:print ten -// check:$45 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$46 = 17 -// debugger:print 'lexical-scopes-in-block-expression::MUT_INT' -// check:$47 = 7 -// debugger:print ten -// check:$48 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$49 = -1 -// debugger:print ten -// check:$50 = 10 -// debugger:continue - -// INDEX EXPRESSION -// debugger:finish -// debugger:print val -// check:$51 = -1 -// debugger:print ten -// check:$52 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$53 = 18 -// debugger:print 'lexical-scopes-in-block-expression::MUT_INT' -// check:$54 = 8 -// debugger:print ten -// check:$55 = 10 -// debugger:continue - -// debugger:finish -// debugger:print val -// check:$56 = -1 -// debugger:print ten -// check:$57 = 10 -// debugger:continue - -#![allow(unused_variable)] -#![allow(dead_assignment)] - -static mut MUT_INT: int = 0; - -struct Point { - x: int, - y: int -} - -fn a_function(x: int) -> int { - x + 1 -} - -fn main() { - - let val = -1; - let ten = 10; - - // surrounded by struct expression - let point = Point { - x: { - zzz(); - sentinel(); - - let val = ten + 1; - unsafe {MUT_INT = 1;}; - - zzz(); - sentinel(); - - val - }, - y: 10 - }; - - zzz(); - sentinel(); - - // surrounded by function call - let _ = a_function({ - zzz(); - sentinel(); - - let val = ten + 2; - unsafe {MUT_INT = 2;}; - - zzz(); - sentinel(); - - val - }); - - zzz(); - sentinel(); - - - // surrounded by tup - let _ = ({ - zzz(); - sentinel(); - - let val = ten + 3; - unsafe {MUT_INT = 3;}; - - zzz(); - sentinel(); - - val - }, 0); - - zzz(); - sentinel(); - - // surrounded by vec - let _ = [{ - zzz(); - sentinel(); - - let val = ten + 4; - unsafe {MUT_INT = 4;}; - - zzz(); - sentinel(); - - val - }, 0, 0]; - - zzz(); - sentinel(); - - // surrounded by repeat vec - let _ = [{ - zzz(); - sentinel(); - - let val = ten + 5; - unsafe {MUT_INT = 5;}; - - zzz(); - sentinel(); - - val - }, ..10]; - - zzz(); - sentinel(); - - // assignment expression - let mut var = 0; - var = { - zzz(); - sentinel(); - - let val = ten + 6; - unsafe {MUT_INT = 6;}; - - zzz(); - sentinel(); - - val - }; - - zzz(); - sentinel(); - - // arithmetic expression - var = 10 + -{ - zzz(); - sentinel(); - - let val = ten + 7; - unsafe {MUT_INT = 7;}; - - zzz(); - sentinel(); - - val - } * 5; - - zzz(); - sentinel(); - - // index expression - let a_vector = [10, ..20]; - let _ = a_vector[{ - zzz(); - sentinel(); - - let val = ten + 8; - unsafe {MUT_INT = 8;}; - - zzz(); - sentinel(); - - val as uint - }]; - - zzz(); - sentinel(); -} - -fn zzz() {()} -fn sentinel() {()} diff --git a/src/test/debug-info/limited-debuginfo.rs b/src/test/debug-info/limited-debuginfo.rs deleted file mode 100644 index 51d9aa75e07..00000000000 --- a/src/test/debug-info/limited-debuginfo.rs +++ /dev/null @@ -1,53 +0,0 @@ -// 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:--debuginfo=1 - -// Make sure functions have proper names -// debugger:info functions -// check:[...]void[...]main([...]); -// check:[...]void[...]some_function([...]); -// check:[...]void[...]some_other_function([...]); -// check:[...]void[...]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); - some_other_function(1, 2); -} - - -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 } diff --git a/src/test/debug-info/managed-enum.rs b/src/test/debug-info/managed-enum.rs deleted file mode 100644 index a7fb3b3022e..00000000000 --- a/src/test/debug-info/managed-enum.rs +++ /dev/null @@ -1,66 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print the_a->val -// check:$1 = {{TheA, x = 0, y = 8970181431921507452}, {TheA, 0, 2088533116, 2088533116}} - -// debugger:print the_b->val -// check:$2 = {{TheB, x = 0, y = 1229782938247303441}, {TheB, 0, 286331153, 286331153}} - -// debugger:print univariant->val -// check:$3 = {-9747455} - -#![allow(unused_variable)] -#![feature(struct_variant, managed_boxes)] - -// The first element is to ensure proper alignment, irrespective of the machines word size. Since -// the size of the discriminant value is machine dependent, this has be taken into account when -// datatype layout should be predictable as in this case. -enum ABC { - TheA { x: i64, y: i64 }, - TheB (i64, i32, i32), -} - -// This is a special case since it does not have the implicit discriminant field. -enum Univariant { - TheOnlyCase(i64) -} - -fn main() { - - // In order to avoid endianess trouble all of the following test values consist of a single - // repeated byte. This way each interpretation of the union should look the same, no matter if - // this is a big or little endian machine. - - // 0b0111110001111100011111000111110001111100011111000111110001111100 = 8970181431921507452 - // 0b01111100011111000111110001111100 = 2088533116 - // 0b0111110001111100 = 31868 - // 0b01111100 = 124 - let the_a = @TheA { x: 0, y: 8970181431921507452 }; - - // 0b0001000100010001000100010001000100010001000100010001000100010001 = 1229782938247303441 - // 0b00010001000100010001000100010001 = 286331153 - // 0b0001000100010001 = 4369 - // 0b00010001 = 17 - let the_b = @TheB (0, 286331153, 286331153); - - let univariant = @TheOnlyCase(-9747455); - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/managed-pointer-within-unique-vec.rs b/src/test/debug-info/managed-pointer-within-unique-vec.rs deleted file mode 100644 index 45989fd0d2b..00000000000 --- a/src/test/debug-info/managed-pointer-within-unique-vec.rs +++ /dev/null @@ -1,41 +0,0 @@ -// 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) - -#![feature(managed_boxes)] - -// compile-flags:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print unique.ptr[0]->val -// check:$1 = 10 - -// debugger:print unique.ptr[1]->val -// check:$2 = 11 - -// debugger:print unique.ptr[2]->val -// check:$3 = 12 - -// debugger:print unique.ptr[3]->val -// check:$4 = 13 - -#![allow(unused_variable)] - -fn main() { - - let unique: Vec<@i64> = vec!(@10, @11, @12, @13); - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/managed-pointer-within-unique.rs b/src/test/debug-info/managed-pointer-within-unique.rs deleted file mode 100644 index 2207b3ef798..00000000000 --- a/src/test/debug-info/managed-pointer-within-unique.rs +++ /dev/null @@ -1,45 +0,0 @@ -// 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) - -#![feature(managed_boxes)] - -// compile-flags:-g -// debugger:set print pretty off -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print *ordinary_unique -// check:$1 = {-1, -2} - -// debugger:print managed_within_unique->x -// check:$2 = -3 - -// debugger:print managed_within_unique->y->val -// check:$3 = -4 - -#![allow(unused_variable)] - -struct ContainsManaged { - x: int, - y: @int -} - -fn main() { - let ordinary_unique = box() (-1, -2); - - let managed_within_unique = box ContainsManaged { x: -3, y: @-4 }; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/method-on-enum.rs b/src/test/debug-info/method-on-enum.rs deleted file mode 100644 index 9c8718a4295..00000000000 --- a/src/test/debug-info/method-on-enum.rs +++ /dev/null @@ -1,103 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// STACK BY REF -// debugger:finish -// debugger:print *self -// check:$1 = {{Variant2, [...]}, {Variant2, 117901063}} -// debugger:print arg1 -// check:$2 = -1 -// debugger:print arg2 -// check:$3 = -2 -// debugger:continue - -// STACK BY VAL -// debugger:finish -// debugger:print self -// check:$4 = {{Variant2, [...]}, {Variant2, 117901063}} -// debugger:print arg1 -// check:$5 = -3 -// debugger:print arg2 -// check:$6 = -4 -// debugger:continue - -// OWNED BY REF -// debugger:finish -// debugger:print *self -// check:$7 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}} -// debugger:print arg1 -// check:$8 = -5 -// debugger:print arg2 -// check:$9 = -6 -// debugger:continue - -// OWNED BY VAL -// debugger:finish -// debugger:print self -// check:$10 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}} -// debugger:print arg1 -// check:$11 = -7 -// debugger:print arg2 -// check:$12 = -8 -// debugger:continue - -// OWNED MOVED -// debugger:finish -// debugger:print *self -// check:$13 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}} -// debugger:print arg1 -// check:$14 = -9 -// debugger:print arg2 -// check:$15 = -10 -// debugger:continue - -#![feature(struct_variant)] - -enum Enum { - Variant1 { x: u16, y: u16 }, - Variant2 (u32) -} - -impl Enum { - - fn self_by_ref(&self, arg1: int, arg2: int) -> int { - zzz(); - arg1 + arg2 - } - - fn self_by_val(self, arg1: int, arg2: int) -> int { - zzz(); - arg1 + arg2 - } - - fn self_owned(~self, arg1: int, arg2: int) -> int { - zzz(); - arg1 + arg2 - } -} - -fn main() { - let stack = Variant2(117901063); - let _ = stack.self_by_ref(-1, -2); - let _ = stack.self_by_val(-3, -4); - - let owned = box Variant1{ x: 1799, y: 1799 }; - let _ = owned.self_by_ref(-5, -6); - let _ = owned.self_by_val(-7, -8); - let _ = owned.self_owned(-9, -10); -} - -fn zzz() {()} diff --git a/src/test/debug-info/method-on-generic-struct.rs b/src/test/debug-info/method-on-generic-struct.rs deleted file mode 100644 index f2cdadd8aad..00000000000 --- a/src/test/debug-info/method-on-generic-struct.rs +++ /dev/null @@ -1,100 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// STACK BY REF -// debugger:finish -// debugger:print *self -// check:$1 = {x = {8888, -8888}} -// debugger:print arg1 -// check:$2 = -1 -// debugger:print arg2 -// check:$3 = -2 -// debugger:continue - -// STACK BY VAL -// debugger:finish -// debugger:print self -// check:$4 = {x = {8888, -8888}} -// debugger:print arg1 -// check:$5 = -3 -// debugger:print arg2 -// check:$6 = -4 -// debugger:continue - -// OWNED BY REF -// debugger:finish -// debugger:print *self -// check:$7 = {x = 1234.5} -// debugger:print arg1 -// check:$8 = -5 -// debugger:print arg2 -// check:$9 = -6 -// debugger:continue - -// OWNED BY VAL -// debugger:finish -// debugger:print self -// check:$10 = {x = 1234.5} -// debugger:print arg1 -// check:$11 = -7 -// debugger:print arg2 -// check:$12 = -8 -// debugger:continue - -// OWNED MOVED -// debugger:finish -// debugger:print *self -// check:$13 = {x = 1234.5} -// debugger:print arg1 -// check:$14 = -9 -// debugger:print arg2 -// check:$15 = -10 -// debugger:continue - -struct Struct<T> { - x: T -} - -impl<T> Struct<T> { - - fn self_by_ref(&self, arg1: int, arg2: int) -> int { - zzz(); - arg1 + arg2 - } - - fn self_by_val(self, arg1: int, arg2: int) -> int { - zzz(); - arg1 + arg2 - } - - fn self_owned(~self, arg1: int, arg2: int) -> int { - zzz(); - arg1 + arg2 - } -} - -fn main() { - let stack = Struct { x: (8888_u32, -8888_i32) }; - let _ = stack.self_by_ref(-1, -2); - let _ = stack.self_by_val(-3, -4); - - let owned = box Struct { x: 1234.5 }; - let _ = owned.self_by_ref(-5, -6); - let _ = owned.self_by_val(-7, -8); - let _ = owned.self_owned(-9, -10); -} - -fn zzz() {()} diff --git a/src/test/debug-info/method-on-struct.rs b/src/test/debug-info/method-on-struct.rs deleted file mode 100644 index dcd285b0a14..00000000000 --- a/src/test/debug-info/method-on-struct.rs +++ /dev/null @@ -1,100 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// STACK BY REF -// debugger:finish -// debugger:print *self -// check:$1 = {x = 100} -// debugger:print arg1 -// check:$2 = -1 -// debugger:print arg2 -// check:$3 = -2 -// debugger:continue - -// STACK BY VAL -// debugger:finish -// debugger:print self -// check:$4 = {x = 100} -// debugger:print arg1 -// check:$5 = -3 -// debugger:print arg2 -// check:$6 = -4 -// debugger:continue - -// OWNED BY REF -// debugger:finish -// debugger:print *self -// check:$7 = {x = 200} -// debugger:print arg1 -// check:$8 = -5 -// debugger:print arg2 -// check:$9 = -6 -// debugger:continue - -// OWNED BY VAL -// debugger:finish -// debugger:print self -// check:$10 = {x = 200} -// debugger:print arg1 -// check:$11 = -7 -// debugger:print arg2 -// check:$12 = -8 -// debugger:continue - -// OWNED MOVED -// debugger:finish -// debugger:print *self -// check:$13 = {x = 200} -// debugger:print arg1 -// check:$14 = -9 -// debugger:print arg2 -// check:$15 = -10 -// debugger:continue - -struct Struct { - x: int -} - -impl Struct { - - fn self_by_ref(&self, arg1: int, arg2: int) -> int { - zzz(); - self.x + arg1 + arg2 - } - - fn self_by_val(self, arg1: int, arg2: int) -> int { - zzz(); - self.x + arg1 + arg2 - } - - fn self_owned(~self, arg1: int, arg2: int) -> int { - zzz(); - self.x + arg1 + arg2 - } -} - -fn main() { - let stack = Struct { x: 100 }; - let _ = stack.self_by_ref(-1, -2); - let _ = stack.self_by_val(-3, -4); - - let owned = box Struct { x: 200 }; - let _ = owned.self_by_ref(-5, -6); - let _ = owned.self_by_val(-7, -8); - let _ = owned.self_owned(-9, -10); -} - -fn zzz() {()} diff --git a/src/test/debug-info/method-on-trait.rs b/src/test/debug-info/method-on-trait.rs deleted file mode 100644 index 6e1f8e6c72d..00000000000 --- a/src/test/debug-info/method-on-trait.rs +++ /dev/null @@ -1,106 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// STACK BY REF -// debugger:finish -// debugger:print *self -// check:$1 = {x = 100} -// debugger:print arg1 -// check:$2 = -1 -// debugger:print arg2 -// check:$3 = -2 -// debugger:continue - -// STACK BY VAL -// debugger:finish -// debugger:print self -// check:$4 = {x = 100} -// debugger:print arg1 -// check:$5 = -3 -// debugger:print arg2 -// check:$6 = -4 -// debugger:continue - -// OWNED BY REF -// debugger:finish -// debugger:print *self -// check:$7 = {x = 200} -// debugger:print arg1 -// check:$8 = -5 -// debugger:print arg2 -// check:$9 = -6 -// debugger:continue - -// OWNED BY VAL -// debugger:finish -// debugger:print self -// check:$10 = {x = 200} -// debugger:print arg1 -// check:$11 = -7 -// debugger:print arg2 -// check:$12 = -8 -// debugger:continue - -// OWNED MOVED -// debugger:finish -// debugger:print *self -// check:$13 = {x = 200} -// debugger:print arg1 -// check:$14 = -9 -// debugger:print arg2 -// check:$15 = -10 -// debugger:continue - -struct Struct { - x: int -} - -trait Trait { - fn self_by_ref(&self, arg1: int, arg2: int) -> int; - fn self_by_val(self, arg1: int, arg2: int) -> int; - fn self_owned(~self, arg1: int, arg2: int) -> int; -} - -impl Trait for Struct { - - fn self_by_ref(&self, arg1: int, arg2: int) -> int { - zzz(); - self.x + arg1 + arg2 - } - - fn self_by_val(self, arg1: int, arg2: int) -> int { - zzz(); - self.x + arg1 + arg2 - } - - fn self_owned(~self, arg1: int, arg2: int) -> int { - zzz(); - self.x + arg1 + arg2 - } -} - -fn main() { - let stack = Struct { x: 100 }; - let _ = stack.self_by_ref(-1, -2); - let _ = stack.self_by_val(-3, -4); - - let owned = box Struct { x: 200 }; - let _ = owned.self_by_ref(-5, -6); - let _ = owned.self_by_val(-7, -8); - let _ = owned.self_owned(-9, -10); -} - -fn zzz() {()} diff --git a/src/test/debug-info/method-on-tuple-struct.rs b/src/test/debug-info/method-on-tuple-struct.rs deleted file mode 100644 index 184bee99d87..00000000000 --- a/src/test/debug-info/method-on-tuple-struct.rs +++ /dev/null @@ -1,98 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// STACK BY REF -// debugger:finish -// debugger:print *self -// check:$1 = {100, -100.5} -// debugger:print arg1 -// check:$2 = -1 -// debugger:print arg2 -// check:$3 = -2 -// debugger:continue - -// STACK BY VAL -// debugger:finish -// debugger:print self -// check:$4 = {100, -100.5} -// debugger:print arg1 -// check:$5 = -3 -// debugger:print arg2 -// check:$6 = -4 -// debugger:continue - -// OWNED BY REF -// debugger:finish -// debugger:print *self -// check:$7 = {200, -200.5} -// debugger:print arg1 -// check:$8 = -5 -// debugger:print arg2 -// check:$9 = -6 -// debugger:continue - -// OWNED BY VAL -// debugger:finish -// debugger:print self -// check:$10 = {200, -200.5} -// debugger:print arg1 -// check:$11 = -7 -// debugger:print arg2 -// check:$12 = -8 -// debugger:continue - -// OWNED MOVED -// debugger:finish -// debugger:print *self -// check:$13 = {200, -200.5} -// debugger:print arg1 -// check:$14 = -9 -// debugger:print arg2 -// check:$15 = -10 -// debugger:continue - -struct TupleStruct(int, f64); - -impl TupleStruct { - - fn self_by_ref(&self, arg1: int, arg2: int) -> int { - zzz(); - arg1 + arg2 - } - - fn self_by_val(self, arg1: int, arg2: int) -> int { - zzz(); - arg1 + arg2 - } - - fn self_owned(~self, arg1: int, arg2: int) -> int { - zzz(); - arg1 + arg2 - } -} - -fn main() { - let stack = TupleStruct(100, -100.5); - let _ = stack.self_by_ref(-1, -2); - let _ = stack.self_by_val(-3, -4); - - let owned = box TupleStruct(200, -200.5); - let _ = owned.self_by_ref(-5, -6); - let _ = owned.self_by_val(-7, -8); - let _ = owned.self_owned(-9, -10); -} - -fn zzz() {()} diff --git a/src/test/debug-info/multiple-functions-equal-var-names.rs b/src/test/debug-info/multiple-functions-equal-var-names.rs deleted file mode 100644 index 524974a0001..00000000000 --- a/src/test/debug-info/multiple-functions-equal-var-names.rs +++ /dev/null @@ -1,56 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print abc -// check:$1 = 10101 -// debugger:continue - -// debugger:finish -// debugger:print abc -// check:$2 = 20202 -// debugger:continue - -// debugger:finish -// debugger:print abc -// check:$3 = 30303 - -#![allow(unused_variable)] - -fn function_one() { - let abc = 10101; - zzz(); -} - -fn function_two() { - let abc = 20202; - zzz(); -} - - -fn function_three() { - let abc = 30303; - zzz(); -} - - -fn main() { - function_one(); - function_two(); - function_three(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/multiple-functions.rs b/src/test/debug-info/multiple-functions.rs deleted file mode 100644 index c93fc8b9cf2..00000000000 --- a/src/test/debug-info/multiple-functions.rs +++ /dev/null @@ -1,56 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print a -// check:$1 = 10101 -// debugger:continue - -// debugger:finish -// debugger:print b -// check:$2 = 20202 -// debugger:continue - -// debugger:finish -// debugger:print c -// check:$3 = 30303 - -#![allow(unused_variable)] - -fn function_one() { - let a = 10101; - zzz(); -} - -fn function_two() { - let b = 20202; - zzz(); -} - - -fn function_three() { - let c = 30303; - zzz(); -} - - -fn main() { - function_one(); - function_two(); - function_three(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/name-shadowing-and-scope-nesting.rs b/src/test/debug-info/name-shadowing-and-scope-nesting.rs deleted file mode 100644 index 97849bc438d..00000000000 --- a/src/test/debug-info/name-shadowing-and-scope-nesting.rs +++ /dev/null @@ -1,95 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print x -// check:$1 = false -// debugger:print y -// check:$2 = true -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$3 = 10 -// debugger:print y -// check:$4 = true -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$5 = 10.5 -// debugger:print y -// check:$6 = 20 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$7 = true -// debugger:print y -// check:$8 = 2220 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$9 = 203203.5 -// debugger:print y -// check:$10 = 2220 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$11 = 10.5 -// debugger:print y -// check:$12 = 20 -// debugger:continue - -fn main() { - let x = false; - let y = true; - - zzz(); - sentinel(); - - let x = 10; - - zzz(); - sentinel(); - - let x = 10.5; - let y = 20; - - zzz(); - sentinel(); - - { - let x = true; - let y = 2220; - - zzz(); - sentinel(); - - let x = 203203.5; - - zzz(); - sentinel(); - } - - zzz(); - sentinel(); -} - -fn zzz() {()} -fn sentinel() {()} diff --git a/src/test/debug-info/nil-enum.rs b/src/test/debug-info/nil-enum.rs deleted file mode 100644 index 31bfaded88a..00000000000 --- a/src/test/debug-info/nil-enum.rs +++ /dev/null @@ -1,42 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print first -// check:$1 = {<No data fields>} - -// debugger:print second -// check:$2 = {<No data fields>} - -#![allow(unused_variable)] - -enum ANilEnum {} -enum AnotherNilEnum {} - -// I (mw) am not sure this test case makes much sense... -// Also, it relies on some implementation details: -// 1. That empty enums as well as '()' are represented as empty structs -// 2. That gdb prints the string "{<No data fields>}" for empty structs (which may change some time) -fn main() { - unsafe { - let first: ANilEnum = std::cast::transmute(()); - let second: AnotherNilEnum = std::cast::transmute(()); - - zzz(); - } -} - -fn zzz() {()} diff --git a/src/test/debug-info/option-like-enum.rs b/src/test/debug-info/option-like-enum.rs deleted file mode 100644 index b025b3a4a55..00000000000 --- a/src/test/debug-info/option-like-enum.rs +++ /dev/null @@ -1,91 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print some -// check:$1 = {0x12345678} - -// debugger:print none -// check:$2 = {0x0} - -// debugger:print full -// check:$3 = {454545, 0x87654321, 9988} - -// debugger:print empty->discr -// check:$4 = (int *) 0x0 - -// debugger:print droid -// check:$5 = {id = 675675, range = 10000001, internals = 0x43218765} - -// debugger:print void_droid->internals -// check:$6 = (int *) 0x0 - -// debugger:continue - -#![feature(struct_variant)] - -// If a struct has exactly two variants, one of them is empty, and the other one -// contains a non-nullable pointer, then this value is used as the discriminator. -// The test cases in this file make sure that something readable is generated for -// this kind of types. -// Unfortunately (for these test cases) the content of the non-discriminant fields -// in the null-case is not defined. So we just read the discriminator field in -// this case (by casting the value to a memory-equivalent struct). - -enum MoreFields<'a> { - Full(u32, &'a int, i16), - Empty -} - -struct MoreFieldsRepr<'a> { - a: u32, - discr: &'a int, - b: i16 -} - -enum NamedFields<'a> { - Droid { id: i32, range: i64, internals: &'a int }, - Void -} - -struct NamedFieldsRepr<'a> { - id: i32, - range: i64, - internals: &'a int -} - -fn main() { - - let some: Option<&u32> = Some(unsafe { std::cast::transmute(0x12345678) }); - let none: Option<&u32> = None; - - let full = Full(454545, unsafe { std::cast::transmute(0x87654321) }, 9988); - - let int_val = 0; - let empty: &MoreFieldsRepr = unsafe { std::cast::transmute(&Empty) }; - - let droid = Droid { - id: 675675, - range: 10000001, - internals: unsafe { std::cast::transmute(0x43218765) } - }; - - let void_droid: &NamedFieldsRepr = unsafe { std::cast::transmute(&Void) }; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/packed-struct-with-destructor.rs b/src/test/debug-info/packed-struct-with-destructor.rs deleted file mode 100644 index 24216929101..00000000000 --- a/src/test/debug-info/packed-struct-with-destructor.rs +++ /dev/null @@ -1,222 +0,0 @@ -// 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-tidy-linelength -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:set print pretty off -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print packed -// check:$1 = {x = 123, y = 234, z = 345} - -// debugger:print packedInPacked -// check:$2 = {a = 1111, b = {x = 2222, y = 3333, z = 4444}, c = 5555, d = {x = 6666, y = 7777, z = 8888}} - -// debugger:print packedInUnpacked -// check:$3 = {a = -1111, b = {x = -2222, y = -3333, z = -4444}, c = -5555, d = {x = -6666, y = -7777, z = -8888}} - -// debugger:print unpackedInPacked -// check:$4 = {a = 987, b = {x = 876, y = 765, z = 654}, c = {x = 543, y = 432, z = 321}, d = 210} - - -// debugger:print packedInPackedWithDrop -// check:$5 = {a = 11, b = {x = 22, y = 33, z = 44}, c = 55, d = {x = 66, y = 77, z = 88}} - -// debugger:print packedInUnpackedWithDrop -// check:$6 = {a = -11, b = {x = -22, y = -33, z = -44}, c = -55, d = {x = -66, y = -77, z = -88}} - -// debugger:print unpackedInPackedWithDrop -// check:$7 = {a = 98, b = {x = 87, y = 76, z = 65}, c = {x = 54, y = 43, z = 32}, d = 21} - -// debugger:print deeplyNested -// check:$8 = {a = {a = 1, b = {x = 2, y = 3, z = 4}, c = 5, d = {x = 6, y = 7, z = 8}}, b = {a = 9, b = {x = 10, y = 11, z = 12}, c = {x = 13, y = 14, z = 15}, d = 16}, c = {a = 17, b = {x = 18, y = 19, z = 20}, c = 21, d = {x = 22, y = 23, z = 24}}, d = {a = 25, b = {x = 26, y = 27, z = 28}, c = 29, d = {x = 30, y = 31, z = 32}}, e = {a = 33, b = {x = 34, y = 35, z = 36}, c = {x = 37, y = 38, z = 39}, d = 40}, f = {a = 41, b = {x = 42, y = 43, z = 44}, c = 45, d = {x = 46, y = 47, z = 48}}} - -#![allow(unused_variable)] - -#[packed] -struct Packed { - x: i16, - y: i32, - z: i64 -} - -impl Drop for Packed { - fn drop(&mut self) {} -} - -#[packed] -struct PackedInPacked { - a: i32, - b: Packed, - c: i64, - d: Packed -} - -struct PackedInUnpacked { - a: i32, - b: Packed, - c: i64, - d: Packed -} - -struct Unpacked { - x: i64, - y: i32, - z: i16 -} - -impl Drop for Unpacked { - fn drop(&mut self) {} -} - -#[packed] -struct UnpackedInPacked { - a: i16, - b: Unpacked, - c: Unpacked, - d: i64 -} - -#[packed] -struct PackedInPackedWithDrop { - a: i32, - b: Packed, - c: i64, - d: Packed -} - -impl Drop for PackedInPackedWithDrop { - fn drop(&mut self) {} -} - -struct PackedInUnpackedWithDrop { - a: i32, - b: Packed, - c: i64, - d: Packed -} - -impl Drop for PackedInUnpackedWithDrop { - fn drop(&mut self) {} -} - -#[packed] -struct UnpackedInPackedWithDrop { - a: i16, - b: Unpacked, - c: Unpacked, - d: i64 -} - -impl Drop for UnpackedInPackedWithDrop { - fn drop(&mut self) {} -} - -struct DeeplyNested { - a: PackedInPacked, - b: UnpackedInPackedWithDrop, - c: PackedInUnpacked, - d: PackedInUnpackedWithDrop, - e: UnpackedInPacked, - f: PackedInPackedWithDrop -} - -fn main() { - let packed = Packed { x: 123, y: 234, z: 345 }; - - let packedInPacked = PackedInPacked { - a: 1111, - b: Packed { x: 2222, y: 3333, z: 4444 }, - c: 5555, - d: Packed { x: 6666, y: 7777, z: 8888 } - }; - - let packedInUnpacked = PackedInUnpacked { - a: -1111, - b: Packed { x: -2222, y: -3333, z: -4444 }, - c: -5555, - d: Packed { x: -6666, y: -7777, z: -8888 } - }; - - let unpackedInPacked = UnpackedInPacked { - a: 987, - b: Unpacked { x: 876, y: 765, z: 654 }, - c: Unpacked { x: 543, y: 432, z: 321 }, - d: 210 - }; - - let packedInPackedWithDrop = PackedInPackedWithDrop { - a: 11, - b: Packed { x: 22, y: 33, z: 44 }, - c: 55, - d: Packed { x: 66, y: 77, z: 88 } - }; - - let packedInUnpackedWithDrop = PackedInUnpackedWithDrop { - a: -11, - b: Packed { x: -22, y: -33, z: -44 }, - c: -55, - d: Packed { x: -66, y: -77, z: -88 } - }; - - let unpackedInPackedWithDrop = UnpackedInPackedWithDrop { - a: 98, - b: Unpacked { x: 87, y: 76, z: 65 }, - c: Unpacked { x: 54, y: 43, z: 32 }, - d: 21 - }; - - let deeplyNested = DeeplyNested { - a: PackedInPacked { - a: 1, - b: Packed { x: 2, y: 3, z: 4 }, - c: 5, - d: Packed { x: 6, y: 7, z: 8 } - }, - b: UnpackedInPackedWithDrop { - a: 9, - b: Unpacked { x: 10, y: 11, z: 12 }, - c: Unpacked { x: 13, y: 14, z: 15 }, - d: 16 - }, - c: PackedInUnpacked { - a: 17, - b: Packed { x: 18, y: 19, z: 20 }, - c: 21, - d: Packed { x: 22, y: 23, z: 24 } - }, - d: PackedInUnpackedWithDrop { - a: 25, - b: Packed { x: 26, y: 27, z: 28 }, - c: 29, - d: Packed { x: 30, y: 31, z: 32 } - }, - e: UnpackedInPacked { - a: 33, - b: Unpacked { x: 34, y: 35, z: 36 }, - c: Unpacked { x: 37, y: 38, z: 39 }, - d: 40 - }, - f: PackedInPackedWithDrop { - a: 41, - b: Packed { x: 42, y: 43, z: 44 }, - c: 45, - d: Packed { x: 46, y: 47, z: 48 } - } - }; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/packed-struct.rs b/src/test/debug-info/packed-struct.rs deleted file mode 100644 index 2b7df0083d6..00000000000 --- a/src/test/debug-info/packed-struct.rs +++ /dev/null @@ -1,107 +0,0 @@ -// 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-tidy-linelength -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:set print pretty off -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print packed -// check:$1 = {x = 123, y = 234, z = 345} - -// debugger:print packedInPacked -// check:$2 = {a = 1111, b = {x = 2222, y = 3333, z = 4444}, c = 5555, d = {x = 6666, y = 7777, z = 8888}} - -// debugger:print packedInUnpacked -// check:$3 = {a = -1111, b = {x = -2222, y = -3333, z = -4444}, c = -5555, d = {x = -6666, y = -7777, z = -8888}} - -// debugger:print unpackedInPacked -// check:$4 = {a = 987, b = {x = 876, y = 765, z = 654, w = 543}, c = {x = 432, y = 321, z = 210, w = 109}, d = -98} - -// debugger:print sizeof(packed) -// check:$5 = 14 - -// debugger:print sizeof(packedInPacked) -// check:$6 = 40 - -#![allow(unused_variable)] - -#[packed] -struct Packed { - x: i16, - y: i32, - z: i64 -} - -#[packed] -struct PackedInPacked { - a: i32, - b: Packed, - c: i64, - d: Packed -} - -// layout (64 bit): aaaa bbbb bbbb bbbb bb.. .... cccc cccc dddd dddd dddd dd.. -struct PackedInUnpacked { - a: i32, - b: Packed, - c: i64, - d: Packed -} - -// layout (64 bit): xx.. yyyy zz.. .... wwww wwww -struct Unpacked { - x: i16, - y: i32, - z: i16, - w: i64 -} - -// layout (64 bit): aabb bbbb bbbb bbbb bbbb bbbb bbcc cccc cccc cccc cccc cccc ccdd dddd dd -#[packed] -struct UnpackedInPacked { - a: i16, - b: Unpacked, - c: Unpacked, - d: i64 -} - -fn main() { - let packed = Packed { x: 123, y: 234, z: 345 }; - - let packedInPacked = PackedInPacked { - a: 1111, - b: Packed { x: 2222, y: 3333, z: 4444 }, - c: 5555, - d: Packed { x: 6666, y: 7777, z: 8888 } - }; - - let packedInUnpacked = PackedInUnpacked { - a: -1111, - b: Packed { x: -2222, y: -3333, z: -4444 }, - c: -5555, - d: Packed { x: -6666, y: -7777, z: -8888 } - }; - - let unpackedInPacked = UnpackedInPacked { - a: 987, - b: Unpacked { x: 876, y: 765, z: 654, w: 543 }, - c: Unpacked { x: 432, y: 321, z: 210, w: 109 }, - d: -98 - }; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/recursive-enum.rs b/src/test/debug-info/recursive-enum.rs deleted file mode 100644 index aea8ab1b2b8..00000000000 --- a/src/test/debug-info/recursive-enum.rs +++ /dev/null @@ -1,33 +0,0 @@ -// 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:-g -// debugger:run - -// Test whether compiling a recursive enum definition crashes debug info generation. The test case -// is taken from issue #11083. - -#![allow(unused_variable)] - -pub struct Window<'a> { - callbacks: WindowCallbacks<'a> -} - -struct WindowCallbacks<'a> { - pos_callback: Option<WindowPosCallback<'a>>, -} - -pub type WindowPosCallback<'a> = |&Window, i32, i32|: 'a; - -fn main() { - let x = WindowCallbacks { pos_callback: None }; -} diff --git a/src/test/debug-info/recursive-struct.rs b/src/test/debug-info/recursive-struct.rs deleted file mode 100644 index a46a1c248ff..00000000000 --- a/src/test/debug-info/recursive-struct.rs +++ /dev/null @@ -1,320 +0,0 @@ -// 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) - -#![feature(managed_boxes)] - -// compile-flags:-g -// debugger:set print pretty off -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print stack_unique.value -// check:$1 = 0 -// debugger:print stack_unique.next.val->value -// check:$2 = 1 - -// debugger:print unique_unique->value -// check:$3 = 2 -// debugger:print unique_unique->next.val->value -// check:$4 = 3 - -// debugger:print box_unique->val.value -// check:$5 = 4 -// debugger:print box_unique->val.next.val->value -// check:$6 = 5 - -// debugger:print vec_unique[0].value -// check:$7 = 6.5 -// debugger:print vec_unique[0].next.val->value -// check:$8 = 7.5 - -// debugger:print borrowed_unique->value -// check:$9 = 8.5 -// debugger:print borrowed_unique->next.val->value -// check:$10 = 9.5 - -// MANAGED -// debugger:print stack_managed.value -// check:$11 = 10 -// debugger:print stack_managed.next.val->val.value -// check:$12 = 11 - -// debugger:print unique_managed->value -// check:$13 = 12 -// debugger:print unique_managed->next.val->val.value -// check:$14 = 13 - -// debugger:print box_managed->val.value -// check:$15 = 14 -// debugger:print box_managed->val.next.val->val.value -// check:$16 = 15 - -// debugger:print vec_managed[0].value -// check:$17 = 16.5 -// debugger:print vec_managed[0].next.val->val.value -// check:$18 = 17.5 - -// debugger:print borrowed_managed->value -// check:$19 = 18.5 -// debugger:print borrowed_managed->next.val->val.value -// check:$20 = 19.5 - -// LONG CYCLE -// debugger:print long_cycle1.value -// check:$21 = 20 -// debugger:print long_cycle1.next->value -// check:$22 = 21 -// debugger:print long_cycle1.next->next->value -// check:$23 = 22 -// debugger:print long_cycle1.next->next->next->value -// check:$24 = 23 - -// debugger:print long_cycle2.value -// check:$25 = 24 -// debugger:print long_cycle2.next->value -// check:$26 = 25 -// debugger:print long_cycle2.next->next->value -// check:$27 = 26 - -// debugger:print long_cycle3.value -// check:$28 = 27 -// debugger:print long_cycle3.next->value -// check:$29 = 28 - -// debugger:print long_cycle4.value -// check:$30 = 29.5 - -// debugger:print (*****long_cycle_w_anonymous_types).value -// check:$31 = 30 - -// debugger:print (*****((*****long_cycle_w_anonymous_types).next.val)).value -// check:$32 = 31 - -// debugger:continue - -#![allow(unused_variable)] -#![feature(struct_variant)] - - -enum Opt<T> { - Empty, - Val { val: T } -} - -struct UniqueNode<T> { - next: Opt<Box<UniqueNode<T>>>, - value: T -} - -struct ManagedNode<T> { - next: Opt<@ManagedNode<T>>, - value: T -} - -struct LongCycle1<T> { - next: Box<LongCycle2<T>>, - value: T, -} - -struct LongCycle2<T> { - next: Box<LongCycle3<T>>, - value: T, -} - -struct LongCycle3<T> { - next: Box<LongCycle4<T>>, - value: T, -} - -struct LongCycle4<T> { - next: Option<Box<LongCycle1<T>>>, - value: T, -} - -struct LongCycleWithAnonymousTypes { - next: Opt<Box<Box<Box<Box<Box<LongCycleWithAnonymousTypes>>>>>>, - value: uint, -} - -// This test case makes sure that recursive structs are properly described. The Node structs are -// generic so that we can have a new type (that newly needs to be described) for the different -// cases. The potential problem with recursive types is that the DI generation algorithm gets -// trapped in an endless loop. To make sure, we actually test this in the different cases, we have -// to operate on a new type each time, otherwise we would just hit the DI cache for all but the -// first case. - -// The different cases below (stack_*, unique_*, box_*, etc) are set up so that the type description -// algorithm will enter the type reference cycle that is created by a recursive definition from a -// different context each time. - -// The "long cycle" cases are constructed to span a longer, indirect recursion cycle between types. -// The different locals will cause the DI algorithm to enter the type reference cycle at different -// points. - -fn main() { - let stack_unique: UniqueNode<u16> = UniqueNode { - next: Val { - val: box UniqueNode { - next: Empty, - value: 1_u16, - } - }, - value: 0_u16, - }; - - let unique_unique: Box<UniqueNode<u32>> = box UniqueNode { - next: Val { - val: box UniqueNode { - next: Empty, - value: 3, - } - }, - value: 2, - }; - - let box_unique: @UniqueNode<u64> = @UniqueNode { - next: Val { - val: box UniqueNode { - next: Empty, - value: 5, - } - }, - value: 4, - }; - - let vec_unique: [UniqueNode<f32>, ..1] = [UniqueNode { - next: Val { - val: box UniqueNode { - next: Empty, - value: 7.5, - } - }, - value: 6.5, - }]; - - let borrowed_unique: &UniqueNode<f64> = &UniqueNode { - next: Val { - val: box UniqueNode { - next: Empty, - value: 9.5, - } - }, - value: 8.5, - }; - - let stack_managed: ManagedNode<u16> = ManagedNode { - next: Val { - val: @ManagedNode { - next: Empty, - value: 11, - } - }, - value: 10, - }; - - let unique_managed: Box<ManagedNode<u32>> = box ManagedNode { - next: Val { - val: @ManagedNode { - next: Empty, - value: 13, - } - }, - value: 12, - }; - - let box_managed: @ManagedNode<u64> = @ManagedNode { - next: Val { - val: @ManagedNode { - next: Empty, - value: 15, - } - }, - value: 14, - }; - - let vec_managed: [ManagedNode<f32>, ..1] = [ManagedNode { - next: Val { - val: @ManagedNode { - next: Empty, - value: 17.5, - } - }, - value: 16.5, - }]; - - let borrowed_managed: &ManagedNode<f64> = &ManagedNode { - next: Val { - val: @ManagedNode { - next: Empty, - value: 19.5, - } - }, - value: 18.5, - }; - - // LONG CYCLE - let long_cycle1: LongCycle1<u16> = LongCycle1 { - next: box LongCycle2 { - next: box LongCycle3 { - next: box LongCycle4 { - next: None, - value: 23, - }, - value: 22, - }, - value: 21 - }, - value: 20 - }; - - let long_cycle2: LongCycle2<u32> = LongCycle2 { - next: box LongCycle3 { - next: box LongCycle4 { - next: None, - value: 26, - }, - value: 25, - }, - value: 24 - }; - - let long_cycle3: LongCycle3<u64> = LongCycle3 { - next: box LongCycle4 { - next: None, - value: 28, - }, - value: 27, - }; - - let long_cycle4: LongCycle4<f32> = LongCycle4 { - next: None, - value: 29.5, - }; - - // It's important that LongCycleWithAnonymousTypes is encountered only at the end of the - // `box` chain. - let long_cycle_w_anonymous_types = box box box box box LongCycleWithAnonymousTypes { - next: Val { - val: box box box box box LongCycleWithAnonymousTypes { - next: Empty, - value: 31, - } - }, - value: 30 - }; - - zzz(); -} - -fn zzz() {()} - diff --git a/src/test/debug-info/self-in-default-method.rs b/src/test/debug-info/self-in-default-method.rs deleted file mode 100644 index 194cfc77bf3..00000000000 --- a/src/test/debug-info/self-in-default-method.rs +++ /dev/null @@ -1,101 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// STACK BY REF -// debugger:finish -// debugger:print *self -// check:$1 = {x = 100} -// debugger:print arg1 -// check:$2 = -1 -// debugger:print arg2 -// check:$3 = -2 -// debugger:continue - -// STACK BY VAL -// debugger:finish -// debugger:print self -// check:$4 = {x = 100} -// debugger:print arg1 -// check:$5 = -3 -// debugger:print arg2 -// check:$6 = -4 -// debugger:continue - -// OWNED BY REF -// debugger:finish -// debugger:print *self -// check:$7 = {x = 200} -// debugger:print arg1 -// check:$8 = -5 -// debugger:print arg2 -// check:$9 = -6 -// debugger:continue - -// OWNED BY VAL -// debugger:finish -// debugger:print self -// check:$10 = {x = 200} -// debugger:print arg1 -// check:$11 = -7 -// debugger:print arg2 -// check:$12 = -8 -// debugger:continue - -// OWNED MOVED -// debugger:finish -// debugger:print *self -// check:$13 = {x = 200} -// debugger:print arg1 -// check:$14 = -9 -// debugger:print arg2 -// check:$15 = -10 -// debugger:continue - -struct Struct { - x: int -} - -trait Trait { - fn self_by_ref(&self, arg1: int, arg2: int) -> int { - zzz(); - arg1 + arg2 - } - - fn self_by_val(self, arg1: int, arg2: int) -> int { - zzz(); - arg1 + arg2 - } - - fn self_owned(~self, arg1: int, arg2: int) -> int { - zzz(); - arg1 + arg2 - } -} - -impl Trait for Struct {} - -fn main() { - let stack = Struct { x: 100 }; - let _ = stack.self_by_ref(-1, -2); - let _ = stack.self_by_val(-3, -4); - - let owned = box Struct { x: 200 }; - let _ = owned.self_by_ref(-5, -6); - let _ = owned.self_by_val(-7, -8); - let _ = owned.self_owned(-9, -10); -} - -fn zzz() {()} diff --git a/src/test/debug-info/self-in-generic-default-method.rs b/src/test/debug-info/self-in-generic-default-method.rs deleted file mode 100644 index 9e7504be15b..00000000000 --- a/src/test/debug-info/self-in-generic-default-method.rs +++ /dev/null @@ -1,102 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// STACK BY REF -// debugger:finish -// debugger:print *self -// check:$1 = {x = 987} -// debugger:print arg1 -// check:$2 = -1 -// debugger:print/d arg2 -// check:$3 = -2 -// debugger:continue - -// STACK BY VAL -// debugger:finish -// debugger:print self -// check:$4 = {x = 987} -// debugger:print arg1 -// check:$5 = -3 -// debugger:print arg2 -// check:$6 = -4 -// debugger:continue - -// OWNED BY REF -// debugger:finish -// debugger:print *self -// check:$7 = {x = 879} -// debugger:print arg1 -// check:$8 = -5 -// debugger:print arg2 -// check:$9 = -6 -// debugger:continue - -// OWNED BY VAL -// debugger:finish -// debugger:print self -// check:$10 = {x = 879} -// debugger:print arg1 -// check:$11 = -7 -// debugger:print arg2 -// check:$12 = -8 -// debugger:continue - -// OWNED MOVED -// debugger:finish -// debugger:print *self -// check:$13 = {x = 879} -// debugger:print arg1 -// check:$14 = -9 -// debugger:print arg2 -// check:$15 = -10.5 -// debugger:continue - -struct Struct { - x: int -} - -trait Trait { - - fn self_by_ref<T>(&self, arg1: int, arg2: T) -> int { - zzz(); - arg1 - } - - fn self_by_val<T>(self, arg1: int, arg2: T) -> int { - zzz(); - arg1 - } - - fn self_owned<T>(~self, arg1: int, arg2: T) -> int { - zzz(); - arg1 - } -} - -impl Trait for Struct {} - -fn main() { - let stack = Struct { x: 987 }; - let _ = stack.self_by_ref(-1, -2_i8); - let _ = stack.self_by_val(-3, -4_i16); - - let owned = box Struct { x: 879 }; - let _ = owned.self_by_ref(-5, -6_i32); - let _ = owned.self_by_val(-7, -8_i64); - let _ = owned.self_owned(-9, -10.5_f32); -} - -fn zzz() {()} diff --git a/src/test/debug-info/shadowed-argument.rs b/src/test/debug-info/shadowed-argument.rs deleted file mode 100644 index cd3934e2a29..00000000000 --- a/src/test/debug-info/shadowed-argument.rs +++ /dev/null @@ -1,59 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print x -// check:$1 = false -// debugger:print y -// check:$2 = true -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$3 = 10 -// debugger:print y -// check:$4 = true -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$5 = 10.5 -// debugger:print y -// check:$6 = 20 -// debugger:continue - -fn a_function(x: bool, y: bool) { - zzz(); - sentinel(); - - let x = 10; - - zzz(); - sentinel(); - - let x = 10.5; - let y = 20; - - zzz(); - sentinel(); -} - -fn main() { - a_function(false, true); -} - -fn zzz() {()} -fn sentinel() {()} diff --git a/src/test/debug-info/shadowed-variable.rs b/src/test/debug-info/shadowed-variable.rs deleted file mode 100644 index 99edb7001ed..00000000000 --- a/src/test/debug-info/shadowed-variable.rs +++ /dev/null @@ -1,58 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print x -// check:$1 = false -// debugger:print y -// check:$2 = true -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$3 = 10 -// debugger:print y -// check:$4 = true -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$5 = 10.5 -// debugger:print y -// check:$6 = 20 -// debugger:continue - -fn main() { - let x = false; - let y = true; - - zzz(); - sentinel(); - - let x = 10; - - zzz(); - sentinel(); - - let x = 10.5; - let y = 20; - - zzz(); - sentinel(); -} - -fn zzz() {()} -fn sentinel() {()} diff --git a/src/test/debug-info/simd.rs b/src/test/debug-info/simd.rs deleted file mode 100644 index 98397277416..00000000000 --- a/src/test/debug-info/simd.rs +++ /dev/null @@ -1,70 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print/d i8x16 -// check:$1 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} -// debugger:print/d i16x8 -// check:$2 = {16, 17, 18, 19, 20, 21, 22, 23} -// debugger:print/d i32x4 -// check:$3 = {24, 25, 26, 27} -// debugger:print/d i64x2 -// check:$4 = {28, 29} - -// debugger:print/d u8x16 -// check:$5 = {30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45} -// debugger:print/d u16x8 -// check:$6 = {46, 47, 48, 49, 50, 51, 52, 53} -// debugger:print/d u32x4 -// check:$7 = {54, 55, 56, 57} -// debugger:print/d u64x2 -// check:$8 = {58, 59} - -// debugger:print f32x4 -// check:$9 = {60.5, 61.5, 62.5, 63.5} -// debugger:print f64x2 -// check:$10 = {64.5, 65.5} - -// debugger:continue - -#![allow(experimental)] -#![allow(unused_variable)] - -use std::unstable::simd::{i8x16, i16x8,i32x4,i64x2,u8x16,u16x8,u32x4,u64x2,f32x4,f64x2}; - -fn main() { - - let i8x16 = i8x16(0i8, 1i8, 2i8, 3i8, 4i8, 5i8, 6i8, 7i8, - 8i8, 9i8, 10i8, 11i8, 12i8, 13i8, 14i8, 15i8); - - let i16x8 = i16x8(16i16, 17i16, 18i16, 19i16, 20i16, 21i16, 22i16, 23i16); - let i32x4 = i32x4(24i32, 25i32, 26i32, 27i32); - let i64x2 = i64x2(28i64, 29i64); - - let u8x16 = u8x16(30u8, 31u8, 32u8, 33u8, 34u8, 35u8, 36u8, 37u8, - 38u8, 39u8, 40u8, 41u8, 42u8, 43u8, 44u8, 45u8); - let u16x8 = u16x8(46u16, 47u16, 48u16, 49u16, 50u16, 51u16, 52u16, 53u16); - let u32x4 = u32x4(54u32, 55u32, 56u32, 57u32); - let u64x2 = u64x2(58u64, 59u64); - - let f32x4 = f32x4(60.5f32, 61.5f32, 62.5f32, 63.5f32); - let f64x2 = f64x2(64.5f64, 65.5f64); - - zzz(); -} - -#[inline(never)] -fn zzz() { () } diff --git a/src/test/debug-info/simple-lexical-scope.rs b/src/test/debug-info/simple-lexical-scope.rs deleted file mode 100644 index 21ce21efc22..00000000000 --- a/src/test/debug-info/simple-lexical-scope.rs +++ /dev/null @@ -1,87 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print x -// check:$1 = false -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$2 = false -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$3 = 10 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$4 = 10 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$5 = 10.5 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$6 = 10 -// debugger:continue - -// debugger:finish -// debugger:print x -// check:$7 = false -// debugger:continue - - -fn main() { - let x = false; - - zzz(); - sentinel(); - - { - zzz(); - sentinel(); - - let x = 10; - - zzz(); - sentinel(); - - { - zzz(); - sentinel(); - - let x = 10.5; - - zzz(); - sentinel(); - } - - zzz(); - sentinel(); - } - - zzz(); - sentinel(); -} - -fn zzz() {()} -fn sentinel() {()} diff --git a/src/test/debug-info/simple-struct.rs b/src/test/debug-info/simple-struct.rs deleted file mode 100644 index 2ac3b48f682..00000000000 --- a/src/test/debug-info/simple-struct.rs +++ /dev/null @@ -1,194 +0,0 @@ -// 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-win32: FIXME #13256 -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:set print pretty off -// debugger:rbreak zzz - -// debugger:print 'simple-struct::NO_PADDING_16' -// check:$1 = {x = 1000, y = -1001} - -// debugger:print 'simple-struct::NO_PADDING_32' -// check:$2 = {x = 1, y = 2, z = 3} - -// debugger:print 'simple-struct::NO_PADDING_64' -// check:$3 = {x = 4, y = 5, z = 6} - -// debugger:print 'simple-struct::NO_PADDING_163264' -// check:$4 = {a = 7, b = 8, c = 9, d = 10} - -// debugger:print 'simple-struct::INTERNAL_PADDING' -// check:$5 = {x = 11, y = 12} - -// debugger:print 'simple-struct::PADDING_AT_END' -// check:$6 = {x = 13, y = 14} - -// debugger:run -// debugger:finish - -// debugger:print no_padding16 -// check:$7 = {x = 10000, y = -10001} - -// debugger:print no_padding32 -// check:$8 = {x = -10002, y = -10003.5, z = 10004} - -// debugger:print no_padding64 -// check:$9 = {x = -10005.5, y = 10006, z = 10007} - -// debugger:print no_padding163264 -// check:$10 = {a = -10008, b = 10009, c = 10010, d = 10011} - -// debugger:print internal_padding -// check:$11 = {x = 10012, y = -10013} - -// debugger:print padding_at_end -// check:$12 = {x = -10014, y = 10015} - -// debugger:print 'simple-struct::NO_PADDING_16' -// check:$13 = {x = 100, y = -101} - -// debugger:print 'simple-struct::NO_PADDING_32' -// check:$14 = {x = -15, y = -16, z = 17} - -// debugger:print 'simple-struct::NO_PADDING_64' -// check:$15 = {x = -18, y = 19, z = 20} - -// debugger:print 'simple-struct::NO_PADDING_163264' -// check:$16 = {a = -21, b = 22, c = 23, d = 24} - -// debugger:print 'simple-struct::INTERNAL_PADDING' -// check:$17 = {x = 25, y = -26} - -// debugger:print 'simple-struct::PADDING_AT_END' -// check:$18 = {x = -27, y = 28} - -// debugger:print inheriting -// check:$19 = {a = 10019, b = -10020, x = -10016, y = -10017.5, z = 10018} - - -#![feature(struct_inherit)]; -#![allow(unused_variable)]; -#![allow(dead_code)]; - -struct NoPadding16 { - x: u16, - y: i16 -} - -virtual struct NoPadding32 { - x: i32, - y: f32, - z: u32 -} - -struct NoPadding64 { - x: f64, - y: i64, - z: u64 -} - -struct NoPadding163264 { - a: i16, - b: u16, - c: i32, - d: u64 -} - -struct InternalPadding { - x: u16, - y: i64 -} - -struct PaddingAtEnd { - x: i64, - y: u16 -} - -static mut NO_PADDING_16: NoPadding16 = NoPadding16 { - x: 1000, - y: -1001 -}; - -static mut NO_PADDING_32: NoPadding32 = NoPadding32 { - x: 1, - y: 2.0, - z: 3 -}; - -static mut NO_PADDING_64: NoPadding64 = NoPadding64 { - x: 4.0, - y: 5, - z: 6 -}; - -static mut NO_PADDING_163264: NoPadding163264 = NoPadding163264 { - a: 7, - b: 8, - c: 9, - d: 10 -}; - -static mut INTERNAL_PADDING: InternalPadding = InternalPadding { - x: 11, - y: 12 -}; - -static mut PADDING_AT_END: PaddingAtEnd = PaddingAtEnd { - x: 13, - y: 14 -}; - -struct Inheriting : NoPadding32 { - a: u16, - b: i16 -} - -fn main() { - let no_padding16 = NoPadding16 { x: 10000, y: -10001 }; - let no_padding32 = NoPadding32 { x: -10002, y: -10003.5, z: 10004 }; - let no_padding64 = NoPadding64 { x: -10005.5, y: 10006, z: 10007 }; - let no_padding163264 = NoPadding163264 { a: -10008, b: 10009, c: 10010, d: 10011 }; - - let internal_padding = InternalPadding { x: 10012, y: -10013 }; - let padding_at_end = PaddingAtEnd { x: -10014, y: 10015 }; - - let inheriting = Inheriting { a: 10019, b: -10020, x: -10016, y: -10017.5, z: 10018 }; - - unsafe { - NO_PADDING_16.x = 100; - NO_PADDING_16.y = -101; - - NO_PADDING_32.x = -15; - NO_PADDING_32.y = -16.0; - NO_PADDING_32.z = 17; - - NO_PADDING_64.x = -18.0; - NO_PADDING_64.y = 19; - NO_PADDING_64.z = 20; - - NO_PADDING_163264.a = -21; - NO_PADDING_163264.b = 22; - NO_PADDING_163264.c = 23; - NO_PADDING_163264.d = 24; - - INTERNAL_PADDING.x = 25; - INTERNAL_PADDING.y = -26; - - PADDING_AT_END.x = -27; - PADDING_AT_END.y = 28; - } - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/simple-tuple.rs b/src/test/debug-info/simple-tuple.rs deleted file mode 100644 index 256a34ff0ab..00000000000 --- a/src/test/debug-info/simple-tuple.rs +++ /dev/null @@ -1,113 +0,0 @@ -// 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-win32: FIXME #13256 -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:set print pretty off -// debugger:rbreak zzz - -// debugger:print/d 'simple-tuple::NO_PADDING_8' -// check:$1 = {-50, 50} -// debugger:print 'simple-tuple::NO_PADDING_16' -// check:$2 = {-1, 2, 3} -// debugger:print 'simple-tuple::NO_PADDING_32' -// check:$3 = {4, 5, 6} -// debugger:print 'simple-tuple::NO_PADDING_64' -// check:$4 = {7, 8, 9} - -// debugger:print 'simple-tuple::INTERNAL_PADDING_1' -// check:$5 = {10, 11} -// debugger:print 'simple-tuple::INTERNAL_PADDING_2' -// check:$6 = {12, 13, 14, 15} - -// debugger:print 'simple-tuple::PADDING_AT_END' -// check:$7 = {16, 17} - -// debugger:run -// debugger:finish - -// debugger:print/d noPadding8 -// check:$8 = {-100, 100} -// debugger:print noPadding16 -// check:$9 = {0, 1, 2} -// debugger:print noPadding32 -// check:$10 = {3, 4.5, 5} -// debugger:print noPadding64 -// check:$11 = {6, 7.5, 8} - -// debugger:print internalPadding1 -// check:$12 = {9, 10} -// debugger:print internalPadding2 -// check:$13 = {11, 12, 13, 14} - -// debugger:print paddingAtEnd -// check:$14 = {15, 16} - -// debugger:print/d 'simple-tuple::NO_PADDING_8' -// check:$15 = {-127, 127} -// debugger:print 'simple-tuple::NO_PADDING_16' -// check:$16 = {-10, 10, 9} -// debugger:print 'simple-tuple::NO_PADDING_32' -// check:$17 = {14, 15, 16} -// debugger:print 'simple-tuple::NO_PADDING_64' -// check:$18 = {17, 18, 19} - -// debugger:print 'simple-tuple::INTERNAL_PADDING_1' -// check:$19 = {110, 111} -// debugger:print 'simple-tuple::INTERNAL_PADDING_2' -// check:$20 = {112, 113, 114, 115} - -// debugger:print 'simple-tuple::PADDING_AT_END' -// check:$21 = {116, 117} - -#![allow(unused_variable)] -#![allow(dead_code)] - -static mut NO_PADDING_8: (i8, u8) = (-50, 50); -static mut NO_PADDING_16: (i16, i16, u16) = (-1, 2, 3); - -static mut NO_PADDING_32: (i32, f32, u32) = (4, 5.0, 6); -static mut NO_PADDING_64: (i64, f64, u64) = (7, 8.0, 9); - -static mut INTERNAL_PADDING_1: (i16, i32) = (10, 11); -static mut INTERNAL_PADDING_2: (i16, i32, u32, u64) = (12, 13, 14, 15); - -static mut PADDING_AT_END: (i32, i16) = (16, 17); - -fn main() { - let noPadding8: (i8, u8) = (-100, 100); - let noPadding16: (i16, i16, u16) = (0, 1, 2); - let noPadding32: (i32, f32, u32) = (3, 4.5, 5); - let noPadding64: (i64, f64, u64) = (6, 7.5, 8); - - let internalPadding1: (i16, i32) = (9, 10); - let internalPadding2: (i16, i32, u32, u64) = (11, 12, 13, 14); - - let paddingAtEnd: (i32, i16) = (15, 16); - - unsafe { - NO_PADDING_8 = (-127, 127); - NO_PADDING_16 = (-10, 10, 9); - - NO_PADDING_32 = (14, 15.0, 16); - NO_PADDING_64 = (17, 18.0, 19); - - INTERNAL_PADDING_1 = (110, 111); - INTERNAL_PADDING_2 = (112, 113, 114, 115); - - PADDING_AT_END = (116, 117); - } - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/static-method-on-struct-and-enum.rs b/src/test/debug-info/static-method-on-struct-and-enum.rs deleted file mode 100644 index 68bc470e6b1..00000000000 --- a/src/test/debug-info/static-method-on-struct-and-enum.rs +++ /dev/null @@ -1,68 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run - -// STRUCT -// debugger:finish -// debugger:print arg1 -// check:$1 = 1 -// debugger:print arg2 -// check:$2 = 2 -// debugger:continue - -// ENUM -// debugger:finish -// debugger:print arg1 -// check:$3 = -3 -// debugger:print arg2 -// check:$4 = 4.5 -// debugger:print arg3 -// check:$5 = 5 -// debugger:continue - -#![feature(struct_variant)] - -struct Struct { - x: int -} - -impl Struct { - - fn static_method(arg1: int, arg2: int) -> int { - zzz(); - arg1 + arg2 - } -} - -enum Enum { - Variant1 { x: int }, - Variant2, - Variant3(f64, int, char), -} - -impl Enum { - - fn static_method(arg1: int, arg2: f64, arg3: uint) -> int { - zzz(); - arg1 - } -} - -fn main() { - Struct::static_method(1, 2); - Enum::static_method(-3, 4.5, 5); -} - -fn zzz() {()} diff --git a/src/test/debug-info/struct-in-enum.rs b/src/test/debug-info/struct-in-enum.rs deleted file mode 100644 index 9b3931428bb..00000000000 --- a/src/test/debug-info/struct-in-enum.rs +++ /dev/null @@ -1,72 +0,0 @@ -// 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-tidy-linelength -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:set print union on -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print case1 -// check:$1 = {{Case1, 0, {x = 2088533116, y = 2088533116, z = 31868}}, {Case1, 0, 8970181431921507452, 31868}} - -// debugger:print case2 -// check:$2 = {{Case2, 0, {x = 286331153, y = 286331153, z = 4369}}, {Case2, 0, 1229782938247303441, 4369}} - -// debugger:print univariant -// check:$3 = {{x = 123, y = 456, z = 789}} - -#![allow(unused_variable)] - -struct Struct { - x: u32, - y: i32, - z: i16 -} - -// The first element is to ensure proper alignment, irrespective of the machines word size. Since -// the size of the discriminant value is machine dependent, this has be taken into account when -// datatype layout should be predictable as in this case. -enum Regular { - Case1(u64, Struct), - Case2(u64, u64, i16) -} - -enum Univariant { - TheOnlyCase(Struct) -} - -fn main() { - - // In order to avoid endianess trouble all of the following test values consist of a single - // repeated byte. This way each interpretation of the union should look the same, no matter if - // this is a big or little endian machine. - - // 0b0111110001111100011111000111110001111100011111000111110001111100 = 8970181431921507452 - // 0b01111100011111000111110001111100 = 2088533116 - // 0b0111110001111100 = 31868 - // 0b01111100 = 124 - let case1 = Case1(0, Struct { x: 2088533116, y: 2088533116, z: 31868 }); - - // 0b0001000100010001000100010001000100010001000100010001000100010001 = 1229782938247303441 - // 0b00010001000100010001000100010001 = 286331153 - // 0b0001000100010001 = 4369 - // 0b00010001 = 17 - let case2 = Case2(0, 1229782938247303441, 4369); - - let univariant = TheOnlyCase(Struct { x: 123, y: 456, z: 789 }); - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/struct-in-struct.rs b/src/test/debug-info/struct-in-struct.rs deleted file mode 100644 index 182fb3d0965..00000000000 --- a/src/test/debug-info/struct-in-struct.rs +++ /dev/null @@ -1,146 +0,0 @@ -// 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:-g -// debugger:set print pretty off -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print three_simple_structs -// check:$1 = {x = {x = 1}, y = {x = 2}, z = {x = 3}} - -// debugger:print internal_padding_parent -// check:$2 = {x = {x = 4, y = 5}, y = {x = 6, y = 7}, z = {x = 8, y = 9}} - -// debugger:print padding_at_end_parent -// check:$3 = {x = {x = 10, y = 11}, y = {x = 12, y = 13}, z = {x = 14, y = 15}} - -#![allow(unused_variable)] - -struct Simple { - x: i32 -} - -struct InternalPadding { - x: i32, - y: i64 -} - -struct PaddingAtEnd { - x: i64, - y: i32 -} - -struct ThreeSimpleStructs { - x: Simple, - y: Simple, - z: Simple -} - -struct InternalPaddingParent { - x: InternalPadding, - y: InternalPadding, - z: InternalPadding -} - -struct PaddingAtEndParent { - x: PaddingAtEnd, - y: PaddingAtEnd, - z: PaddingAtEnd -} - -struct Mixed { - x: PaddingAtEnd, - y: InternalPadding, - z: Simple, - w: i16 -} - -struct Bag { - x: Simple -} - -struct BagInBag { - x: Bag -} - -struct ThatsJustOverkill { - x: BagInBag -} - -struct Tree { - x: Simple, - y: InternalPaddingParent, - z: BagInBag -} - -fn main() { - - let three_simple_structs = ThreeSimpleStructs { - x: Simple { x: 1 }, - y: Simple { x: 2 }, - z: Simple { x: 3 } - }; - - let internal_padding_parent = InternalPaddingParent { - x: InternalPadding { x: 4, y: 5 }, - y: InternalPadding { x: 6, y: 7 }, - z: InternalPadding { x: 8, y: 9 } - }; - - let padding_at_end_parent = PaddingAtEndParent { - x: PaddingAtEnd { x: 10, y: 11 }, - y: PaddingAtEnd { x: 12, y: 13 }, - z: PaddingAtEnd { x: 14, y: 15 } - }; - - let mixed = Mixed { - x: PaddingAtEnd { x: 16, y: 17 }, - y: InternalPadding { x: 18, y: 19 }, - z: Simple { x: 20 }, - w: 21 - }; - - let bag = Bag { x: Simple { x: 22 } }; - let bag_in_bag = BagInBag { - x: Bag { - x: Simple { x: 23 } - } - }; - - let tjo = ThatsJustOverkill { - x: BagInBag { - x: Bag { - x: Simple { x: 24 } - } - } - }; - - let tree = Tree { - x: Simple { x: 25 }, - y: InternalPaddingParent { - x: InternalPadding { x: 26, y: 27 }, - y: InternalPadding { x: 28, y: 29 }, - z: InternalPadding { x: 30, y: 31 } - }, - z: BagInBag { - x: Bag { - x: Simple { x: 32 } - } - } - }; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/struct-style-enum.rs b/src/test/debug-info/struct-style-enum.rs deleted file mode 100644 index cb68245a48e..00000000000 --- a/src/test/debug-info/struct-style-enum.rs +++ /dev/null @@ -1,77 +0,0 @@ -// 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-tidy-linelength -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:set print union on -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print case1 -// check:$1 = {{Case1, a = 0, b = 31868, c = 31868, d = 31868, e = 31868}, {Case1, a = 0, b = 2088533116, c = 2088533116}, {Case1, a = 0, b = 8970181431921507452}} - -// debugger:print case2 -// check:$2 = {{Case2, a = 0, b = 4369, c = 4369, d = 4369, e = 4369}, {Case2, a = 0, b = 286331153, c = 286331153}, {Case2, a = 0, b = 1229782938247303441}} - -// debugger:print case3 -// check:$3 = {{Case3, a = 0, b = 22873, c = 22873, d = 22873, e = 22873}, {Case3, a = 0, b = 1499027801, c = 1499027801}, {Case3, a = 0, b = 6438275382588823897}} - -// debugger:print univariant -// check:$4 = {a = -1} - -#![allow(unused_variable)] -#![feature(struct_variant)] - -// The first element is to ensure proper alignment, irrespective of the machines word size. Since -// the size of the discriminant value is machine dependent, this has be taken into account when -// datatype layout should be predictable as in this case. -enum Regular { - Case1 { a: u64, b: u16, c: u16, d: u16, e: u16}, - Case2 { a: u64, b: u32, c: u32}, - Case3 { a: u64, b: u64 } -} - -enum Univariant { - TheOnlyCase { a: i64 } -} - -fn main() { - - // In order to avoid endianess trouble all of the following test values consist of a single - // repeated byte. This way each interpretation of the union should look the same, no matter if - // this is a big or little endian machine. - - // 0b0111110001111100011111000111110001111100011111000111110001111100 = 8970181431921507452 - // 0b01111100011111000111110001111100 = 2088533116 - // 0b0111110001111100 = 31868 - // 0b01111100 = 124 - let case1 = Case1 { a: 0, b: 31868, c: 31868, d: 31868, e: 31868 }; - - // 0b0001000100010001000100010001000100010001000100010001000100010001 = 1229782938247303441 - // 0b00010001000100010001000100010001 = 286331153 - // 0b0001000100010001 = 4369 - // 0b00010001 = 17 - let case2 = Case2 { a: 0, b: 286331153, c: 286331153 }; - - // 0b0101100101011001010110010101100101011001010110010101100101011001 = 6438275382588823897 - // 0b01011001010110010101100101011001 = 1499027801 - // 0b0101100101011001 = 22873 - // 0b01011001 = 89 - let case3 = Case3 { a: 0, b: 6438275382588823897 }; - - let univariant = TheOnlyCase { a: -1 }; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/struct-with-destructor.rs b/src/test/debug-info/struct-with-destructor.rs deleted file mode 100644 index ae439611c40..00000000000 --- a/src/test/debug-info/struct-with-destructor.rs +++ /dev/null @@ -1,127 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish -// debugger:print simple -// check:$1 = {x = 10, y = 20} - -// debugger:print noDestructor -// check:$2 = {a = {x = 10, y = 20}, guard = -1} - -// debugger:print withDestructor -// check:$3 = {a = {x = 10, y = 20}, guard = -1} - -// debugger:print nested -// check:$4 = {a = {a = {x = 7890, y = 9870}}} - -#![allow(unused_variable)] - -struct NoDestructor { - x: i32, - y: i64 -} - -struct WithDestructor { - x: i32, - y: i64 -} - -impl Drop for WithDestructor { - fn drop(&mut self) {} -} - -struct NoDestructorGuarded { - a: NoDestructor, - guard: i64 -} - -struct WithDestructorGuarded { - a: WithDestructor, - guard: i64 -} - -struct NestedInner { - a: WithDestructor -} - -impl Drop for NestedInner { - fn drop(&mut self) {} -} - -struct NestedOuter { - a: NestedInner -} - - -// The compiler adds a 'destructed' boolean field to structs implementing Drop. This field is used -// at runtime to prevent drop() to be executed more than once (see middle::trans::adt). -// This field must be incorporated by the debug info generation. Otherwise the debugger assumes a -// wrong size/layout for the struct. -fn main() { - - let simple = WithDestructor { x: 10, y: 20 }; - - let noDestructor = NoDestructorGuarded { - a: NoDestructor { x: 10, y: 20 }, - guard: -1 - }; - - // If the destructor flag field is not incorporated into the debug info for 'WithDestructor' - // then the debugger will have an invalid offset for the field 'guard' and thus should not be - // able to read its value correctly (dots are padding bytes, D is the boolean destructor flag): - // - // 64 bit - // - // NoDestructorGuarded = 0000....00000000FFFFFFFF - // <--------------><------> - // NoDestructor guard - // - // - // withDestructorGuarded = 0000....00000000D.......FFFFFFFF - // <--------------><------> // How debug info says it is - // WithDestructor guard - // - // <----------------------><------> // How it actually is - // WithDestructor guard - // - // 32 bit - // - // NoDestructorGuarded = 000000000000FFFFFFFF - // <----------><------> - // NoDestructor guard - // - // - // withDestructorGuarded = 000000000000D...FFFFFFFF - // <----------><------> // How debug info says it is - // WithDestructor guard - // - // <--------------><------> // How it actually is - // WithDestructor guard - // - let withDestructor = WithDestructorGuarded { - a: WithDestructor { x: 10, y: 20 }, - guard: -1 - }; - - // expected layout (64 bit) = xxxx....yyyyyyyyD.......D... - // <--WithDestructor------> - // <-------NestedInner--------> - // <-------NestedOuter--------> - let nested = NestedOuter { a: NestedInner { a: WithDestructor { x: 7890, y: 9870 } } }; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/text-to-include-1.txt b/src/test/debug-info/text-to-include-1.txt deleted file mode 100644 index ba055272a3f..00000000000 --- a/src/test/debug-info/text-to-include-1.txt +++ /dev/null @@ -1 +0,0 @@ -some text to include in another file as string 1 \ No newline at end of file diff --git a/src/test/debug-info/text-to-include-2.txt b/src/test/debug-info/text-to-include-2.txt deleted file mode 100644 index a2caa5e7141..00000000000 --- a/src/test/debug-info/text-to-include-2.txt +++ /dev/null @@ -1 +0,0 @@ -some text to include in another file as string 2 \ No newline at end of file diff --git a/src/test/debug-info/text-to-include-3.txt b/src/test/debug-info/text-to-include-3.txt deleted file mode 100644 index 9933e6c1b0b..00000000000 --- a/src/test/debug-info/text-to-include-3.txt +++ /dev/null @@ -1 +0,0 @@ -some text to include in another file as string 3 \ No newline at end of file diff --git a/src/test/debug-info/trait-generic-static-default-method.rs b/src/test/debug-info/trait-generic-static-default-method.rs deleted file mode 100644 index 169c84ef28f..00000000000 --- a/src/test/debug-info/trait-generic-static-default-method.rs +++ /dev/null @@ -1,53 +0,0 @@ -// ignore-test - -// 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. - -// compile-flags:-g -// debugger:rbreak zzz -// debugger:run - -// debugger:finish -// debugger:print arg1 -// check:$1 = 1000 -// debugger:print arg2 -// check:$2 = 0.5 -// debugger:continue - -// debugger:finish -// debugger:print arg1 -// check:$3 = 2000 -// debugger:print *arg2 -// check:$4 = {1, 2, 3} -// debugger:continue - - -struct Struct { - x: int -} - -trait Trait { - fn generic_static_default_method<T>(arg1: int, arg2: T) -> int { - zzz(); - arg1 - } -} - -impl Trait for Struct {} - -fn main() { - - // Is this really how to use these? - Trait::generic_static_default_method::<Struct, float>(1000, 0.5); - Trait::generic_static_default_method::<Struct, &(int, int, int)>(2000, &(1, 2, 3)); - -} - -fn zzz() {()} diff --git a/src/test/debug-info/trait-pointers.rs b/src/test/debug-info/trait-pointers.rs deleted file mode 100644 index fcb0f6082a3..00000000000 --- a/src/test/debug-info/trait-pointers.rs +++ /dev/null @@ -1,35 +0,0 @@ -// 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:-g -// debugger:run - -#![allow(unused_variable)] - - -trait Trait { - fn method(&self) -> int { 0 } -} - -struct Struct { - a: int, - b: f64 -} - -impl Trait for Struct {} - -// There is no real test here yet. Just make sure that it compiles without crashing. -fn main() { - let stack_struct = Struct { a:0, b: 1.0 }; - let reference: &Trait = &stack_struct as &Trait; - let unique: Box<Trait> = box Struct { a:2, b: 3.0 } as Box<Trait>; -} diff --git a/src/test/debug-info/tuple-in-struct.rs b/src/test/debug-info/tuple-in-struct.rs deleted file mode 100644 index 242f59ad4de..00000000000 --- a/src/test/debug-info/tuple-in-struct.rs +++ /dev/null @@ -1,153 +0,0 @@ -// 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:-g -// debugger:set print pretty off -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print no_padding1 -// check:$1 = {x = {0, 1}, y = 2, z = {3, 4, 5}} -// debugger:print no_padding2 -// check:$2 = {x = {6, 7}, y = {{8, 9}, 10}} - -// debugger:print tuple_internal_padding -// check:$3 = {x = {11, 12}, y = {13, 14}} -// debugger:print struct_internal_padding -// check:$4 = {x = {15, 16}, y = {17, 18}} -// debugger:print both_internally_padded -// check:$5 = {x = {19, 20, 21}, y = {22, 23}} - -// debugger:print single_tuple -// check:$6 = {x = {24, 25, 26}} - -// debugger:print tuple_padded_at_end -// check:$7 = {x = {27, 28}, y = {29, 30}} -// debugger:print struct_padded_at_end -// check:$8 = {x = {31, 32}, y = {33, 34}} -// debugger:print both_padded_at_end -// check:$9 = {x = {35, 36, 37}, y = {38, 39}} - -// debugger:print mixed_padding -// check:$10 = {x = {{40, 41, 42}, {43, 44}}, y = {45, 46, 47, 48}} - -#![allow(unused_variable)] - -struct NoPadding1 { - x: (i32, i32), - y: i32, - z: (i32, i32, i32) -} - -struct NoPadding2 { - x: (i32, i32), - y: ((i32, i32), i32) -} - -struct TupleInternalPadding { - x: (i16, i32), - y: (i32, i64) -} - -struct StructInternalPadding { - x: (i16, i16), - y: (i64, i64) -} - -struct BothInternallyPadded { - x: (i16, i32, i32), - y: (i32, i64) -} - -struct SingleTuple { - x: (i16, i32, i64) -} - -struct TuplePaddedAtEnd { - x: (i32, i16), - y: (i64, i32) -} - -struct StructPaddedAtEnd { - x: (i64, i64), - y: (i16, i16) -} - -struct BothPaddedAtEnd { - x: (i32, i32, i16), - y: (i64, i32) -} - -// Data-layout (padding signified by dots, one column = 2 bytes): -// [a.bbc...ddddee..ffffg.hhi...] -struct MixedPadding { - x: ((i16, i32, i16), (i64, i32)), - y: (i64, i16, i32, i16) -} - - -fn main() { - let no_padding1 = NoPadding1 { - x: (0, 1), - y: 2, - z: (3, 4, 5) - }; - - let no_padding2 = NoPadding2 { - x: (6, 7), - y: ((8, 9), 10) - }; - - let tuple_internal_padding = TupleInternalPadding { - x: (11, 12), - y: (13, 14) - }; - - let struct_internal_padding = StructInternalPadding { - x: (15, 16), - y: (17, 18) - }; - - let both_internally_padded = BothInternallyPadded { - x: (19, 20, 21), - y: (22, 23) - }; - - let single_tuple = SingleTuple { - x: (24, 25, 26) - }; - - let tuple_padded_at_end = TuplePaddedAtEnd { - x: (27, 28), - y: (29, 30) - }; - - let struct_padded_at_end = StructPaddedAtEnd { - x: (31, 32), - y: (33, 34) - }; - - let both_padded_at_end = BothPaddedAtEnd { - x: (35, 36, 37), - y: (38, 39) - }; - - let mixed_padding = MixedPadding { - x: ((40, 41, 42), (43, 44)), - y: (45, 46, 47, 48) - }; - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/tuple-in-tuple.rs b/src/test/debug-info/tuple-in-tuple.rs deleted file mode 100644 index 1008af246a0..00000000000 --- a/src/test/debug-info/tuple-in-tuple.rs +++ /dev/null @@ -1,52 +0,0 @@ -// 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:-g -// debugger:set print pretty off -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print no_padding1 -// check:$1 = {{0, 1}, 2, 3} -// debugger:print no_padding2 -// check:$2 = {4, {5, 6}, 7} -// debugger:print no_padding3 -// check:$3 = {8, 9, {10, 11}} - -// debugger:print internal_padding1 -// check:$4 = {12, {13, 14}} -// debugger:print internal_padding2 -// check:$5 = {15, {16, 17}} - -// debugger:print padding_at_end1 -// check:$6 = {18, {19, 20}} -// debugger:print padding_at_end2 -// check:$7 = {{21, 22}, 23} - -#![allow(unused_variable)] - -fn main() { - let no_padding1: ((u32, u32), u32, u32) = ((0, 1), 2, 3); - let no_padding2: (u32, (u32, u32), u32) = (4, (5, 6), 7); - let no_padding3: (u32, u32, (u32, u32)) = (8, 9, (10, 11)); - - let internal_padding1: (i16, (i32, i32)) = (12, (13, 14)); - let internal_padding2: (i16, (i16, i32)) = (15, (16, 17)); - - let padding_at_end1: (i32, (i32, i16)) = (18, (19, 20)); - let padding_at_end2: ((i32, i16), i32) = ((21, 22), 23); - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/tuple-struct.rs b/src/test/debug-info/tuple-struct.rs deleted file mode 100644 index eae0d0be608..00000000000 --- a/src/test/debug-info/tuple-struct.rs +++ /dev/null @@ -1,61 +0,0 @@ -// 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:-g -// debugger:set print pretty off -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print no_padding16 -// check:$1 = {10000, -10001} - -// debugger:print no_padding32 -// check:$2 = {-10002, -10003.5, 10004} - -// debugger:print no_padding64 -// check:$3 = {-10005.5, 10006, 10007} - -// debugger:print no_padding163264 -// check:$4 = {-10008, 10009, 10010, 10011} - -// debugger:print internal_padding -// check:$5 = {10012, -10013} - -// debugger:print padding_at_end -// check:$6 = {-10014, 10015} - - -// This test case mainly makes sure that no field names are generated for tuple structs (as opposed -// to all fields having the name "<unnamed_field>"). Otherwise they are handled the same a normal -// structs. - -struct NoPadding16(u16, i16); -struct NoPadding32(i32, f32, u32); -struct NoPadding64(f64, i64, u64); -struct NoPadding163264(i16, u16, i32, u64); -struct InternalPadding(u16, i64); -struct PaddingAtEnd(i64, u16); - -fn main() { - let no_padding16 = NoPadding16(10000, -10001); - let no_padding32 = NoPadding32(-10002, -10003.5, 10004); - let no_padding64 = NoPadding64(-10005.5, 10006, 10007); - let no_padding163264 = NoPadding163264(-10008, 10009, 10010, 10011); - - let internal_padding = InternalPadding(10012, -10013); - let padding_at_end = PaddingAtEnd(-10014, 10015); - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/tuple-style-enum.rs b/src/test/debug-info/tuple-style-enum.rs deleted file mode 100644 index 176e4b0a69f..00000000000 --- a/src/test/debug-info/tuple-style-enum.rs +++ /dev/null @@ -1,76 +0,0 @@ -// 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-tidy-linelength -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:set print union on -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print case1 -// check:$1 = {{Case1, 0, 31868, 31868, 31868, 31868}, {Case1, 0, 2088533116, 2088533116}, {Case1, 0, 8970181431921507452}} - -// debugger:print case2 -// check:$2 = {{Case2, 0, 4369, 4369, 4369, 4369}, {Case2, 0, 286331153, 286331153}, {Case2, 0, 1229782938247303441}} - -// debugger:print case3 -// check:$3 = {{Case3, 0, 22873, 22873, 22873, 22873}, {Case3, 0, 1499027801, 1499027801}, {Case3, 0, 6438275382588823897}} - -// debugger:print univariant -// check:$4 = {-1} - -#![allow(unused_variable)] - -// The first element is to ensure proper alignment, irrespective of the machines word size. Since -// the size of the discriminant value is machine dependent, this has be taken into account when -// datatype layout should be predictable as in this case. -enum Regular { - Case1(u64, u16, u16, u16, u16), - Case2(u64, u32, u32), - Case3(u64, u64) -} - -enum Univariant { - TheOnlyCase(i64) -} - -fn main() { - - // In order to avoid endianess trouble all of the following test values consist of a single - // repeated byte. This way each interpretation of the union should look the same, no matter if - // this is a big or little endian machine. - - // 0b0111110001111100011111000111110001111100011111000111110001111100 = 8970181431921507452 - // 0b01111100011111000111110001111100 = 2088533116 - // 0b0111110001111100 = 31868 - // 0b01111100 = 124 - let case1 = Case1(0, 31868, 31868, 31868, 31868); - - // 0b0001000100010001000100010001000100010001000100010001000100010001 = 1229782938247303441 - // 0b00010001000100010001000100010001 = 286331153 - // 0b0001000100010001 = 4369 - // 0b00010001 = 17 - let case2 = Case2(0, 286331153, 286331153); - - // 0b0101100101011001010110010101100101011001010110010101100101011001 = 6438275382588823897 - // 0b01011001010110010101100101011001 = 1499027801 - // 0b0101100101011001 = 22873 - // 0b01011001 = 89 - let case3 = Case3(0, 6438275382588823897); - - let univariant = TheOnlyCase(-1); - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/unique-enum.rs b/src/test/debug-info/unique-enum.rs deleted file mode 100644 index 45f0213bf8c..00000000000 --- a/src/test/debug-info/unique-enum.rs +++ /dev/null @@ -1,66 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print *the_a -// check:$1 = {{TheA, x = 0, y = 8970181431921507452}, {TheA, 0, 2088533116, 2088533116}} - -// debugger:print *the_b -// check:$2 = {{TheB, x = 0, y = 1229782938247303441}, {TheB, 0, 286331153, 286331153}} - -// debugger:print *univariant -// check:$3 = {123234} - -#![allow(unused_variable)] -#![feature(struct_variant)] - -// The first element is to ensure proper alignment, irrespective of the machines word size. Since -// the size of the discriminant value is machine dependent, this has be taken into account when -// datatype layout should be predictable as in this case. -enum ABC { - TheA { x: i64, y: i64 }, - TheB (i64, i32, i32), -} - -// This is a special case since it does not have the implicit discriminant field. -enum Univariant { - TheOnlyCase(i64) -} - -fn main() { - - // In order to avoid endianess trouble all of the following test values consist of a single - // repeated byte. This way each interpretation of the union should look the same, no matter if - // this is a big or little endian machine. - - // 0b0111110001111100011111000111110001111100011111000111110001111100 = 8970181431921507452 - // 0b01111100011111000111110001111100 = 2088533116 - // 0b0111110001111100 = 31868 - // 0b01111100 = 124 - let the_a = box TheA { x: 0, y: 8970181431921507452 }; - - // 0b0001000100010001000100010001000100010001000100010001000100010001 = 1229782938247303441 - // 0b00010001000100010001000100010001 = 286331153 - // 0b0001000100010001 = 4369 - // 0b00010001 = 17 - let the_b = box TheB (0, 286331153, 286331153); - - let univariant = box TheOnlyCase(123234); - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/var-captured-in-nested-closure.rs b/src/test/debug-info/var-captured-in-nested-closure.rs deleted file mode 100644 index 7677c9e9235..00000000000 --- a/src/test/debug-info/var-captured-in-nested-closure.rs +++ /dev/null @@ -1,90 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print variable -// check:$1 = 1 -// debugger:print constant -// check:$2 = 2 -// debugger:print a_struct -// check:$3 = {a = -3, b = 4.5, c = 5} -// debugger:print *struct_ref -// check:$4 = {a = -3, b = 4.5, c = 5} -// debugger:print *owned -// check:$5 = 6 -// debugger:print managed->val -// check:$6 = 7 -// debugger:print closure_local -// check:$7 = 8 -// debugger:continue - -// debugger:finish -// debugger:print variable -// check:$8 = 1 -// debugger:print constant -// check:$9 = 2 -// debugger:print a_struct -// check:$10 = {a = -3, b = 4.5, c = 5} -// debugger:print *struct_ref -// check:$11 = {a = -3, b = 4.5, c = 5} -// debugger:print *owned -// check:$12 = 6 -// debugger:print managed->val -// check:$13 = 7 -// debugger:print closure_local -// check:$14 = 8 -// debugger:continue - -#![feature(managed_boxes)] -#![allow(unused_variable)] - -struct Struct { - a: int, - b: f64, - c: uint -} - -fn main() { - let mut variable = 1; - let constant = 2; - - let a_struct = Struct { - a: -3, - b: 4.5, - c: 5 - }; - - let struct_ref = &a_struct; - let owned = box 6; - let managed = @7; - - let closure = || { - let closure_local = 8; - - let nested_closure = || { - zzz(); - variable = constant + a_struct.a + struct_ref.a + *owned + *managed + closure_local; - }; - - zzz(); - - nested_closure(); - }; - - closure(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/var-captured-in-sendable-closure.rs b/src/test/debug-info/var-captured-in-sendable-closure.rs deleted file mode 100644 index 4316e503a51..00000000000 --- a/src/test/debug-info/var-captured-in-sendable-closure.rs +++ /dev/null @@ -1,56 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print constant -// check:$1 = 1 -// debugger:print a_struct -// check:$2 = {a = -2, b = 3.5, c = 4} -// debugger:print *owned -// check:$3 = 5 - -#![allow(unused_variable)] - -struct Struct { - a: int, - b: f64, - c: uint -} - -fn main() { - let constant = 1; - - let a_struct = Struct { - a: -2, - b: 3.5, - c: 4 - }; - - let owned = box 5; - - let closure: proc() = proc() { - zzz(); - do_something(&constant, &a_struct.a, owned); - }; - - closure(); -} - -fn do_something(_: &int, _:&int, _:&int) { - -} - -fn zzz() {()} diff --git a/src/test/debug-info/var-captured-in-stack-closure.rs b/src/test/debug-info/var-captured-in-stack-closure.rs deleted file mode 100644 index 57dcabe90b6..00000000000 --- a/src/test/debug-info/var-captured-in-stack-closure.rs +++ /dev/null @@ -1,62 +0,0 @@ -// 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:-g -// debugger:rbreak zzz -// debugger:run -// debugger:finish - -// debugger:print variable -// check:$1 = 1 -// debugger:print constant -// check:$2 = 2 -// debugger:print a_struct -// check:$3 = {a = -3, b = 4.5, c = 5} -// debugger:print *struct_ref -// check:$4 = {a = -3, b = 4.5, c = 5} -// debugger:print *owned -// check:$5 = 6 -// debugger:print managed->val -// check:$6 = 7 - -#![feature(managed_boxes)] -#![allow(unused_variable)] - -struct Struct { - a: int, - b: f64, - c: uint -} - -fn main() { - let mut variable = 1; - let constant = 2; - - let a_struct = Struct { - a: -3, - b: 4.5, - c: 5 - }; - - let struct_ref = &a_struct; - let owned = box 6; - let managed = @7; - - let closure = || { - zzz(); - variable = constant + a_struct.a + struct_ref.a + *owned + *managed; - }; - - closure(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/vec-slices.rs b/src/test/debug-info/vec-slices.rs deleted file mode 100644 index 6171facc42b..00000000000 --- a/src/test/debug-info/vec-slices.rs +++ /dev/null @@ -1,87 +0,0 @@ -// 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-win32: FIXME #13256 -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:set print pretty off -// debugger:rbreak zzz -// debugger:run -// debugger:finish -// debugger:print empty.length -// check:$1 = 0 - -// debugger:print singleton.length -// check:$2 = 1 -// debugger:print *((int64_t[1]*)(singleton.data_ptr)) -// check:$3 = {1} - -// debugger:print multiple.length -// check:$4 = 4 -// debugger:print *((int64_t[4]*)(multiple.data_ptr)) -// check:$5 = {2, 3, 4, 5} - -// debugger:print slice_of_slice.length -// check:$6 = 2 -// debugger:print *((int64_t[2]*)(slice_of_slice.data_ptr)) -// check:$7 = {3, 4} - -// debugger:print padded_tuple.length -// check:$8 = 2 -// debugger:print padded_tuple.data_ptr[0] -// check:$9 = {6, 7} -// debugger:print padded_tuple.data_ptr[1] -// check:$10 = {8, 9} - -// debugger:print padded_struct.length -// check:$11 = 2 -// debugger:print padded_struct.data_ptr[0] -// check:$12 = {x = 10, y = 11, z = 12} -// debugger:print padded_struct.data_ptr[1] -// check:$13 = {x = 13, y = 14, z = 15} - -// debugger:print 'vec-slices::MUT_VECT_SLICE'.length -// check:$14 = 2 -// debugger:print *((int64_t[2]*)('vec-slices::MUT_VECT_SLICE'.data_ptr)) -// check:$15 = {64, 65} - -#![allow(unused_variable)] - -struct AStruct { - x: i16, - y: i32, - z: i16 -} - -static VECT_SLICE: &'static [i64] = &[64, 65]; -static mut MUT_VECT_SLICE: &'static [i64] = &[32]; - -fn main() { - let empty: &[i64] = &[]; - let singleton: &[i64] = &[1]; - let multiple: &[i64] = &[2, 3, 4, 5]; - let slice_of_slice = multiple.slice(1,3); - - let padded_tuple: &[(i32, i16)] = &[(6, 7), (8, 9)]; - - let padded_struct: &[AStruct] = &[ - AStruct { x: 10, y: 11, z: 12 }, - AStruct { x: 13, y: 14, z: 15 } - ]; - - unsafe { - MUT_VECT_SLICE = VECT_SLICE; - } - - zzz(); -} - -fn zzz() {()} diff --git a/src/test/debug-info/vec.rs b/src/test/debug-info/vec.rs deleted file mode 100644 index e1ee1ae0212..00000000000 --- a/src/test/debug-info/vec.rs +++ /dev/null @@ -1,40 +0,0 @@ -// 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-win32: FIXME #13256 -// ignore-android: FIXME(#10381) - -// compile-flags:-g -// debugger:set print pretty off -// debugger:rbreak zzz -// debugger:run -// debugger:finish -// debugger:print a -// check:$1 = {1, 2, 3} -// debugger:print vec::VECT -// check:$2 = {4, 5, 6} - -#![allow(unused_variable)] - -static mut VECT: [i32, ..3] = [1, 2, 3]; - -fn main() { - let a = [1, 2, 3]; - - unsafe { - VECT[0] = 4; - VECT[1] = 5; - VECT[2] = 6; - } - - zzz(); -} - -fn zzz() {()} |
