summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2020-08-03 14:33:06 +0000
committerpatrick <patrick@openbsd.org>2020-08-03 14:33:06 +0000
commit061da546b983eb767bad15e67af1174fb0bcf31c (patch)
tree83c78b820819d70aa40c36d90447978b300078c5 /gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope
parentImport LLVM 10.0.0 release including clang, lld and lldb. (diff)
downloadwireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.tar.xz
wireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.zip
Import LLVM 10.0.0 release including clang, lld and lldb.
ok hackroom tested by plenty
Diffstat (limited to 'gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope')
-rw-r--r--gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/TestFrameVariableScope.py5
-rw-r--r--gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/main.c20
2 files changed, 25 insertions, 0 deletions
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/TestFrameVariableScope.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/TestFrameVariableScope.py
new file mode 100644
index 00000000000..48e49ed009b
--- /dev/null
+++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/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/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/main.c
new file mode 100644
index 00000000000..71f4cb234e3
--- /dev/null
+++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/main.c
@@ -0,0 +1,20 @@
+//===-- main.c --------------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+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 ='])
+}