diff options
author | Kuba Mracek <mracek@apple.com> | 2018-12-20 23:38:19 +0000 |
---|---|---|
committer | Kuba Mracek <mracek@apple.com> | 2018-12-20 23:38:19 +0000 |
commit | 4c7f5d5c5aeeb4336da0f044ab543d76971068f4 (patch) | |
tree | caf803dbf910975503ec12e32736a4bade0f68e3 /lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/TestFrameRecognizer.py | |
parent | 3790029d9714b4b42ebb289fb1ee8670e6a1b99d (diff) | |
download | bcm5719-llvm-4c7f5d5c5aeeb4336da0f044ab543d76971068f4.tar.gz bcm5719-llvm-4c7f5d5c5aeeb4336da0f044ab543d76971068f4.zip |
[lldb] Add a "display-recognized-arguments" target setting to show recognized arguments by default
Differential Revision: https://reviews.llvm.org/D55954
llvm-svn: 349856
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/TestFrameRecognizer.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/TestFrameRecognizer.py | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/TestFrameRecognizer.py b/lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/TestFrameRecognizer.py index abd4ae8b382..1162157bad5 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/TestFrameRecognizer.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/TestFrameRecognizer.py @@ -67,9 +67,24 @@ class FrameRecognizerTestCase(TestBase): self.expect("frame variable", substrs=['(int) a = 42', '(int) b = 56']) - opts = lldb.SBVariablesOptions(); - opts.SetIncludeRecognizedArguments(True); - variables = frame.GetVariables(opts); + # Recognized arguments don't show up by default... + variables = frame.GetVariables(lldb.SBVariablesOptions()) + self.assertEqual(variables.GetSize(), 0) + + # ...unless you set target.display-recognized-arguments to 1... + self.runCmd("settings set target.display-recognized-arguments 1") + variables = frame.GetVariables(lldb.SBVariablesOptions()) + self.assertEqual(variables.GetSize(), 2) + + # ...and you can reset it back to 0 to hide them again... + self.runCmd("settings set target.display-recognized-arguments 0") + variables = frame.GetVariables(lldb.SBVariablesOptions()) + self.assertEqual(variables.GetSize(), 0) + + # ... or explicitly ask for them with SetIncludeRecognizedArguments(True). + opts = lldb.SBVariablesOptions() + opts.SetIncludeRecognizedArguments(True) + variables = frame.GetVariables(opts) self.assertEqual(variables.GetSize(), 2) self.assertEqual(variables.GetValueAtIndex(0).name, "a") |