summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/TestFrameVariableScope.py5
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/main.c21
3 files changed, 29 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/Makefile
new file mode 100644
index 00000000000..f5a47fcc46c
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/Makefile
@@ -0,0 +1,3 @@
+LEVEL = ../../make
+C_SOURCES := main.c
+include $(LEVEL)/Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/TestFrameVariableScope.py b/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/TestFrameVariableScope.py
new file mode 100644
index 00000000000..48e49ed009b
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/TestFrameVariableScope.py
@@ -0,0 +1,5 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(
+ __file__, globals(), [])
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/main.c b/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/main.c
new file mode 100644
index 00000000000..80beb29cf34
--- /dev/null
+++ b/lldb/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 ='])
+}
OpenPOWER on IntegriCloud