aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/functionalities/frame_var_scope/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/functionalities/frame_var_scope/main.c')
-rw-r--r--packages/Python/lldbsuite/test/functionalities/frame_var_scope/main.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/functionalities/frame_var_scope/main.c b/packages/Python/lldbsuite/test/functionalities/frame_var_scope/main.c
new file mode 100644
index 000000000000..80beb29cf34f
--- /dev/null
+++ b/packages/Python/lldbsuite/test/functionalities/frame_var_scope/main.c
@@ -0,0 +1,21 @@
+//===-- main.c --------------------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+int foo(int x, int y) {
+ int z = 3 + x;
+ return z + y; //% self.expect("frame variable -s", substrs=['ARG: (int) x = -3','ARG: (int) y = 0'])
+ //% self.expect("frame variable -s x", substrs=['ARG: (int) x = -3'])
+ //% self.expect("frame variable -s y", substrs=['ARG: (int) y = 0'])
+ //% self.expect("frame variable -s z", substrs=['LOCAL: (int) z = 0'])
+}
+
+int main (int argc, char const *argv[])
+{
+ return foo(-3,0); //% self.expect("frame variable -s argc argv", substrs=['ARG: (int) argc ='])
+}