2024-02-22 12:10:29 +00:00
|
|
|
//@ ignore-android
|
2024-08-10 02:33:40 +00:00
|
|
|
//@ ignore-test: #128971
|
2016-10-19 07:25:03 +00:00
|
|
|
|
|
|
|
#![allow(unused)]
|
|
|
|
|
2024-08-10 02:33:40 +00:00
|
|
|
//@ compile-flags:-g
|
2016-10-19 07:25:03 +00:00
|
|
|
|
|
|
|
// This test checks that drop glue code gets attributed to scope's closing brace,
|
|
|
|
// and function epilogues - to function's closing brace.
|
|
|
|
|
|
|
|
// === GDB TESTS ===================================================================================
|
|
|
|
|
|
|
|
// gdb-command:run
|
|
|
|
// gdb-command:next
|
|
|
|
// gdb-command:frame
|
|
|
|
// gdb-check:[...]#loc1[...]
|
|
|
|
// gdb-command:next
|
|
|
|
// gdb-command:frame
|
|
|
|
// gdb-check:[...]#loc2[...]
|
|
|
|
// gdb-command:next
|
|
|
|
// gdb-command:frame
|
|
|
|
// gdb-check:[...]#loc3[...]
|
|
|
|
// gdb-command:next
|
|
|
|
// gdb-command:frame
|
|
|
|
// gdb-check:[...]#loc4[...]
|
|
|
|
// gdb-command:next
|
|
|
|
// gdb-command:frame
|
|
|
|
// gdb-check:[...]#loc5[...]
|
|
|
|
// gdb-command:next
|
|
|
|
// gdb-command:frame
|
|
|
|
// gdb-check:[...]#loc6[...]
|
|
|
|
|
|
|
|
// === LLDB TESTS ==================================================================================
|
|
|
|
|
|
|
|
// lldb-command:set set stop-line-count-before 0
|
|
|
|
// lldb-command:set set stop-line-count-after 1
|
|
|
|
// Can't set both to zero or lldb will stop printing source at all. So it will output the current
|
|
|
|
// line and the next. We deal with this by having at least 2 lines between the #loc's
|
|
|
|
|
|
|
|
// lldb-command:run
|
|
|
|
// lldb-command:next
|
|
|
|
// lldb-command:frame select
|
2024-03-10 13:55:58 +00:00
|
|
|
// lldb-check:[...] #loc1 [...]
|
2016-10-19 07:25:03 +00:00
|
|
|
// lldb-command:next
|
|
|
|
// lldb-command:frame select
|
2024-03-10 13:55:58 +00:00
|
|
|
// lldb-check:[...] #loc2 [...]
|
2016-10-19 07:25:03 +00:00
|
|
|
// lldb-command:next
|
|
|
|
// lldb-command:frame select
|
2024-03-10 13:55:58 +00:00
|
|
|
// lldb-check:[...] #loc3 [...]
|
2016-10-19 07:25:03 +00:00
|
|
|
// lldb-command:next
|
|
|
|
// lldb-command:frame select
|
2024-03-10 13:55:58 +00:00
|
|
|
// lldb-check:[...] #loc4 [...]
|
2016-10-19 07:25:03 +00:00
|
|
|
// lldb-command:next
|
|
|
|
// lldb-command:frame select
|
2024-03-10 13:55:58 +00:00
|
|
|
// lldb-check:[...] #loc5 [...]
|
2016-10-19 07:25:03 +00:00
|
|
|
// lldb-command:next
|
|
|
|
// lldb-command:frame select
|
2024-03-10 13:55:58 +00:00
|
|
|
// lldb-check:[...] #loc6 [...]
|
2016-10-19 07:25:03 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
|
|
|
foo();
|
|
|
|
|
|
|
|
zzz(); // #loc5
|
|
|
|
|
|
|
|
} // #loc6
|
|
|
|
|
|
|
|
fn foo() {
|
|
|
|
{
|
|
|
|
let s = String::from("s"); // #break
|
|
|
|
|
|
|
|
zzz(); // #loc1
|
|
|
|
|
|
|
|
} // #loc2
|
|
|
|
|
|
|
|
zzz(); // #loc3
|
|
|
|
|
|
|
|
} // #loc4
|
|
|
|
|
|
|
|
fn zzz() {()}
|