about summary refs log tree commit diff
path: root/src/test/debuginfo
diff options
context:
space:
mode:
authorVadim Chugunov <vadimcn@gmail.com>2017-02-08 22:09:51 -0800
committerVadim Chugunov <vadimcn@gmail.com>2017-02-08 22:10:33 -0800
commitd113b39fbf089621c3985af9d50a888cd02dd432 (patch)
tree58abd2324e5487ac90b5548ce1677eb371171718 /src/test/debuginfo
parentc14f87e3b0823407a91a283796bf78ef83d5fe99 (diff)
downloadrust-d113b39fbf089621c3985af9d50a888cd02dd432.tar.gz
rust-d113b39fbf089621c3985af9d50a888cd02dd432.zip
Exclude top-level macro expansions from source location override.
Diffstat (limited to 'src/test/debuginfo')
-rw-r--r--src/test/debuginfo/macro-stepping.inc17
-rw-r--r--src/test/debuginfo/macro-stepping.rs26
2 files changed, 43 insertions, 0 deletions
diff --git a/src/test/debuginfo/macro-stepping.inc b/src/test/debuginfo/macro-stepping.inc
new file mode 100644
index 00000000000..6aaf7ed421e
--- /dev/null
+++ b/src/test/debuginfo/macro-stepping.inc
@@ -0,0 +1,17 @@
+// Copyright 2013-2017 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 included() {
+    foo!(); // #inc-loc1
+
+    foo2!(); // #inc-loc2
+
+    zzz(); // #inc-loc3
+}
diff --git a/src/test/debuginfo/macro-stepping.rs b/src/test/debuginfo/macro-stepping.rs
index 37355ed377b..ca2c1e0c8f0 100644
--- a/src/test/debuginfo/macro-stepping.rs
+++ b/src/test/debuginfo/macro-stepping.rs
@@ -44,6 +44,17 @@ extern crate macro_stepping; // exports new_scope!()
 // gdb-command:frame
 // gdb-check:[...]#loc6[...]
 
+// gdb-command:continue
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#inc-loc1[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#inc-loc2[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#inc-loc3[...]
+
 // === LLDB TESTS ==================================================================================
 
 // lldb-command:set set stop-line-count-before 0
@@ -68,6 +79,17 @@ extern crate macro_stepping; // exports new_scope!()
 // lldb-command:frame select
 // lldb-check:[...]#loc5[...]
 
+// lldb-command:continue
+// lldb-command:step
+// lldb-command:frame select
+// lldb-check:[...]#inc-loc1[...]
+// lldb-command:next
+// lldb-command:frame select
+// lldb-check:[...]#inc-loc2[...]
+// lldb-command:next
+// lldb-command:frame select
+// lldb-check:[...]#inc-loc3[...]
+
 macro_rules! foo {
     () => {
         let a = 1;
@@ -99,6 +121,10 @@ fn main() {
              "world");
 
     zzz(); // #loc6
+
+    included(); // #break
 }
 
 fn zzz() {()}
+
+include!("macro-stepping.inc");