2014-10-09 14:31:03 +00:00
|
|
|
// min-lldb-version: 310
|
2013-08-05 09:12:40 +00:00
|
|
|
|
2014-02-07 03:57:09 +00:00
|
|
|
// compile-flags:-g
|
2014-07-09 12:46:09 +00:00
|
|
|
|
|
|
|
// === GDB TESTS ===================================================================================
|
|
|
|
|
2014-04-24 09:35:48 +00:00
|
|
|
// gdb-command:run
|
2013-08-05 09:12:40 +00:00
|
|
|
|
2014-04-24 09:35:48 +00:00
|
|
|
// gdb-command:print shadowed
|
|
|
|
// gdb-check:$1 = 231
|
|
|
|
// gdb-command:print not_shadowed
|
|
|
|
// gdb-check:$2 = 232
|
|
|
|
// gdb-command:continue
|
2013-08-05 09:12:40 +00:00
|
|
|
|
2014-04-24 09:35:48 +00:00
|
|
|
// gdb-command:print shadowed
|
|
|
|
// gdb-check:$3 = 233
|
|
|
|
// gdb-command:print not_shadowed
|
|
|
|
// gdb-check:$4 = 232
|
|
|
|
// gdb-command:print local_to_arm
|
|
|
|
// gdb-check:$5 = 234
|
|
|
|
// gdb-command:continue
|
2013-08-05 09:12:40 +00:00
|
|
|
|
2014-04-24 09:35:48 +00:00
|
|
|
// gdb-command:print shadowed
|
|
|
|
// gdb-check:$6 = 236
|
|
|
|
// gdb-command:print not_shadowed
|
|
|
|
// gdb-check:$7 = 232
|
|
|
|
// gdb-command:continue
|
2013-08-05 09:12:40 +00:00
|
|
|
|
2014-04-24 09:35:48 +00:00
|
|
|
// gdb-command:print shadowed
|
|
|
|
// gdb-check:$8 = 237
|
|
|
|
// gdb-command:print not_shadowed
|
|
|
|
// gdb-check:$9 = 232
|
|
|
|
// gdb-command:print local_to_arm
|
|
|
|
// gdb-check:$10 = 238
|
|
|
|
// gdb-command:continue
|
2013-08-05 09:12:40 +00:00
|
|
|
|
2014-04-24 09:35:48 +00:00
|
|
|
// gdb-command:print shadowed
|
|
|
|
// gdb-check:$11 = 239
|
|
|
|
// gdb-command:print not_shadowed
|
|
|
|
// gdb-check:$12 = 232
|
|
|
|
// gdb-command:continue
|
2013-08-05 09:12:40 +00:00
|
|
|
|
2014-04-24 09:35:48 +00:00
|
|
|
// gdb-command:print shadowed
|
|
|
|
// gdb-check:$13 = 241
|
|
|
|
// gdb-command:print not_shadowed
|
|
|
|
// gdb-check:$14 = 232
|
|
|
|
// gdb-command:continue
|
2013-08-05 09:12:40 +00:00
|
|
|
|
2014-04-24 09:35:48 +00:00
|
|
|
// gdb-command:print shadowed
|
|
|
|
// gdb-check:$15 = 243
|
|
|
|
// gdb-command:print *local_to_arm
|
|
|
|
// gdb-check:$16 = 244
|
|
|
|
// gdb-command:continue
|
2013-08-05 09:12:40 +00:00
|
|
|
|
2014-04-24 09:35:48 +00:00
|
|
|
// gdb-command:print shadowed
|
|
|
|
// gdb-check:$17 = 231
|
|
|
|
// gdb-command:print not_shadowed
|
|
|
|
// gdb-check:$18 = 232
|
|
|
|
// gdb-command:continue
|
2013-08-05 09:12:40 +00:00
|
|
|
|
2014-07-09 12:46:09 +00:00
|
|
|
|
|
|
|
// === LLDB TESTS ==================================================================================
|
|
|
|
|
|
|
|
// lldb-command:run
|
|
|
|
|
|
|
|
// lldb-command:print shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$0 = 231
|
|
|
|
// lldbr-check:(i32) shadowed = 231
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:print not_shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$1 = 232
|
|
|
|
// lldbr-check:(i32) not_shadowed = 232
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$2 = 233
|
|
|
|
// lldbr-check:(i32) shadowed = 233
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:print not_shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$3 = 232
|
|
|
|
// lldbr-check:(i32) not_shadowed = 232
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:print local_to_arm
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$4 = 234
|
|
|
|
// lldbr-check:(i32) local_to_arm = 234
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$5 = 236
|
|
|
|
// lldbr-check:(i32) shadowed = 236
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:print not_shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$6 = 232
|
|
|
|
// lldbr-check:(i32) not_shadowed = 232
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$7 = 237
|
|
|
|
// lldbr-check:(isize) shadowed = 237
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:print not_shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$8 = 232
|
|
|
|
// lldbr-check:(i32) not_shadowed = 232
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:print local_to_arm
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$9 = 238
|
|
|
|
// lldbr-check:(isize) local_to_arm = 238
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$10 = 239
|
|
|
|
// lldbr-check:(isize) shadowed = 239
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:print not_shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$11 = 232
|
|
|
|
// lldbr-check:(i32) not_shadowed = 232
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$12 = 241
|
|
|
|
// lldbr-check:(isize) shadowed = 241
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:print not_shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$13 = 232
|
|
|
|
// lldbr-check:(i32) not_shadowed = 232
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$14 = 243
|
|
|
|
// lldbr-check:(i32) shadowed = 243
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:print *local_to_arm
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$15 = 244
|
|
|
|
// lldbr-check:(i32) *local_to_arm = 244
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$16 = 231
|
|
|
|
// lldbr-check:(i32) shadowed = 231
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:print not_shadowed
|
2018-10-02 16:13:30 +00:00
|
|
|
// lldbg-check:[...]$17 = 232
|
|
|
|
// lldbr-check:(i32) not_shadowed = 232
|
2014-07-09 12:46:09 +00:00
|
|
|
// lldb-command:continue
|
|
|
|
|
2015-09-19 20:33:47 +00:00
|
|
|
#![feature(omit_gdb_pretty_printer_section)]
|
2014-12-03 22:48:18 +00:00
|
|
|
#![omit_gdb_pretty_printer_section]
|
2014-07-09 12:46:09 +00:00
|
|
|
|
2013-08-05 09:12:40 +00:00
|
|
|
struct Struct {
|
2015-03-26 00:06:52 +00:00
|
|
|
x: isize,
|
|
|
|
y: isize
|
2013-08-05 09:12:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
2015-01-25 21:05:03 +00:00
|
|
|
let shadowed = 231;
|
|
|
|
let not_shadowed = 232;
|
2013-08-05 09:12:40 +00:00
|
|
|
|
2014-07-09 12:46:09 +00:00
|
|
|
zzz(); // #break
|
2013-08-05 09:12:40 +00:00
|
|
|
sentinel();
|
|
|
|
|
2015-01-25 21:05:03 +00:00
|
|
|
match (233, 234) {
|
2013-08-05 09:12:40 +00:00
|
|
|
(shadowed, local_to_arm) => {
|
|
|
|
|
2014-07-09 12:46:09 +00:00
|
|
|
zzz(); // #break
|
2013-08-05 09:12:40 +00:00
|
|
|
sentinel();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-25 21:05:03 +00:00
|
|
|
match (235, 236) {
|
2013-08-05 09:12:40 +00:00
|
|
|
// with literal
|
|
|
|
(235, shadowed) => {
|
|
|
|
|
2014-07-09 12:46:09 +00:00
|
|
|
zzz(); // #break
|
2013-08-05 09:12:40 +00:00
|
|
|
sentinel();
|
|
|
|
}
|
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
|
2014-06-14 02:09:12 +00:00
|
|
|
match (Struct { x: 237, y: 238 }) {
|
2013-08-05 09:12:40 +00:00
|
|
|
Struct { x: shadowed, y: local_to_arm } => {
|
|
|
|
|
2014-07-09 12:46:09 +00:00
|
|
|
zzz(); // #break
|
2013-08-05 09:12:40 +00:00
|
|
|
sentinel();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-14 02:09:12 +00:00
|
|
|
match (Struct { x: 239, y: 240 }) {
|
2013-08-05 09:12:40 +00:00
|
|
|
// ignored field
|
2013-11-28 20:22:53 +00:00
|
|
|
Struct { x: shadowed, .. } => {
|
2013-08-05 09:12:40 +00:00
|
|
|
|
2014-07-09 12:46:09 +00:00
|
|
|
zzz(); // #break
|
2013-08-05 09:12:40 +00:00
|
|
|
sentinel();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-14 02:09:12 +00:00
|
|
|
match (Struct { x: 241, y: 242 }) {
|
2013-08-05 09:12:40 +00:00
|
|
|
// with literal
|
|
|
|
Struct { x: shadowed, y: 242 } => {
|
|
|
|
|
2014-07-09 12:46:09 +00:00
|
|
|
zzz(); // #break
|
2013-08-05 09:12:40 +00:00
|
|
|
sentinel();
|
|
|
|
}
|
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
|
2015-01-25 21:05:03 +00:00
|
|
|
match (243, 244) {
|
2013-08-05 09:12:40 +00:00
|
|
|
(shadowed, ref local_to_arm) => {
|
|
|
|
|
2014-07-09 12:46:09 +00:00
|
|
|
zzz(); // #break
|
2013-08-05 09:12:40 +00:00
|
|
|
sentinel();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-09 12:46:09 +00:00
|
|
|
zzz(); // #break
|
2013-08-05 09:12:40 +00:00
|
|
|
sentinel();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn zzz() {()}
|
|
|
|
fn sentinel() {()}
|