diff options
author | Enrico Granata <egranata@apple.com> | 2016-10-26 19:17:49 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2016-10-26 19:17:49 +0000 |
commit | 73418dfe61df18bf724139fe0dd92036c8a5e2fa (patch) | |
tree | df955e175dd6fca7df64ec987f21023121532ad7 /lldb/packages/Python/lldbsuite | |
parent | 0f45998bc60563e51580f9339e93da816341bebd (diff) | |
download | bcm5719-llvm-73418dfe61df18bf724139fe0dd92036c8a5e2fa.tar.gz bcm5719-llvm-73418dfe61df18bf724139fe0dd92036c8a5e2fa.zip |
Fix an issue where frame variable -s <varname> would not show the scope even though the user asked for it
Part of rdar://28434047
llvm-svn: 285226
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
4 files changed, 30 insertions, 1 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 =']) +} diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py index cbb53d8b0f5..0189a65bec3 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py @@ -55,9 +55,9 @@ class UnsignedTypesTestCase(TestBase): self.expect( "frame variable --show-types --no-args", VARIABLES_DISPLAYED_CORRECTLY, - startstr="(unsigned char) the_unsigned_char = 'c'", patterns=["\((short unsigned int|unsigned short)\) the_unsigned_short = 99"], substrs=[ + "(unsigned char) the_unsigned_char = 'c'", "(unsigned int) the_unsigned_int = 99", "(unsigned long) the_unsigned_long = 99", "(unsigned long long) the_unsigned_long_long = 99", |