diff options
author | Adrian Prantl <aprantl@apple.com> | 2019-05-02 23:07:23 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2019-05-02 23:07:23 +0000 |
commit | 1db0f0ca988f95916dc553afa48387b698811ec8 (patch) | |
tree | 5679d6e2935d321e754d233f7ecd7be3ef74b1c1 /lldb/packages/Python/lldbsuite/test/lang/c | |
parent | bf29238e1a8709c3bde667f787ea4b84637fdfd4 (diff) | |
download | bcm5719-llvm-1db0f0ca988f95916dc553afa48387b698811ec8.tar.gz bcm5719-llvm-1db0f0ca988f95916dc553afa48387b698811ec8.zip |
Hide runtime support values such as clang's __vla_expr from frame variable
by respecting the "artificial" attribute on variables. Function
arguments that are artificial and useful to end-users are being
whitelisted by the language runtime.
<rdar://problem/45322477>
Differential Revision: https://reviews.llvm.org/D61451
llvm-svn: 359841
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/c')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py b/lldb/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py index f6341ec24fa..30a190b27de 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py +++ b/lldb/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py @@ -14,12 +14,23 @@ class TestVLA(TestBase): _, process, _, _ = lldbutil.run_to_source_breakpoint( self, "break here", lldb.SBFileSpec('main.c')) + # Make sure no helper expressions show up in frame variable. + var_opts = lldb.SBVariablesOptions() + var_opts.SetIncludeArguments(False) + var_opts.SetIncludeLocals(True) + var_opts.SetInScopeOnly(True) + var_opts.SetIncludeStatics(False) + var_opts.SetIncludeRuntimeSupportValues(False) + var_opts.SetUseDynamic(lldb.eDynamicCanRunTarget) + all_locals = self.frame().GetVariables(var_opts) + self.assertEqual(len(all_locals), 1) + def test(a, array): for i in range(a): self.expect("fr v vla[%d]"%i, substrs=["int", "%d"%(a-i)]) self.expect("expr vla[%d]"%i, substrs=["int", "%d"%(a-i)]) - self.expect("frame var vla", substrs=array) - self.expect("expr vla", error=True, substrs=["incomplete"]) + self.expect("fr v vla", substrs=array) + self.expect("expr vla", error=True, substrs=["incomplete"]) test(2, ["int []", "[0] = 2, [1] = 1"]) process.Continue() |