summaryrefslogtreecommitdiff
path: root/debuginfo-tests
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2017-04-17 17:57:05 +0000
committerAdrian Prantl <aprantl@apple.com>2017-04-17 17:57:05 +0000
commite95fd8c1b16e91777d03cbd489e9a6b53d3ce96a (patch)
tree459b538f21905a4f219f1d6eb606c04a7ca94fd0 /debuginfo-tests
parent863a713303675e3e8c499dd9b66a9acf9b4e6c18 (diff)
Add additional CHECKs to safestack.c.
Diffstat (limited to 'debuginfo-tests')
-rw-r--r--debuginfo-tests/safestack.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/debuginfo-tests/safestack.c b/debuginfo-tests/safestack.c
index c8c7109e668..a3b36c9838f 100644
--- a/debuginfo-tests/safestack.c
+++ b/debuginfo-tests/safestack.c
@@ -4,22 +4,32 @@
// Zorg configures the ASAN stage2 bots to not build the
// safestack compiler-rt. Only run this test on
// non-asanified configurations.
-//
-// DEBUGGER: break 19
-// DEBUGGER: r
-// DEBUGGER: p s
-//
-// CHECK: a = ([0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7)
struct S {
int a[8];
};
-int f(struct S s, unsigned i) {
- return s.a[i];
-}
+int f(struct S s, unsigned i);
int main(int argc, const char **argv) {
struct S s = {{0, 1, 2, 3, 4, 5, 6, 7}};
- return f(s, 4);
+ // DEBUGGER: break 17
+ f(s, 4);
+ // DEBUGGER: break 19
+ return 0;
+}
+
+int f(struct S s, unsigned i) {
+ // DEBUGGER: break 24
+ return s.a[i];
}
+
+// DEBUGGER: r
+// DEBUGGER: p s
+// CHECK: a = ([0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7)
+// DEBUGGER: c
+// DEBUGGER: p s
+// CHECK: a = ([0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7)
+// DEBUGGER: c
+// DEBUGGER: p s
+// CHECK: a = ([0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7)