diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-08-22 22:22:00 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-08-22 22:22:00 +0000 |
| commit | 81ab3f5d314f7b640deef77e2b9f2ec7444107d7 (patch) | |
| tree | 0bf1c6aa2115284c1af6d21bc15ae9d3fb1845b8 /lldb | |
| parent | 30123f114aa2b78b0e4164fe1c40c645761dadfc (diff) | |
| download | bcm5719-llvm-81ab3f5d314f7b640deef77e2b9f2ec7444107d7.tar.gz bcm5719-llvm-81ab3f5d314f7b640deef77e2b9f2ec7444107d7.zip | |
Fix the 'target variable' help syntax to output one or more <variable-name>'s.
Add a simple test case for that.
llvm-svn: 138281
Diffstat (limited to 'lldb')
| -rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 13 | ||||
| -rw-r--r-- | lldb/test/help/TestHelp.py | 5 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index cebe9afc523..93ed631dc21 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -538,6 +538,19 @@ public: m_option_shared_libraries (LLDB_OPT_SET_1, false, "shlib",'s', 0, eArgTypePath, "A basename or fullpath to a shared library to use in the search for global variables. This option can be specified multiple times."), m_varobj_options() { + CommandArgumentEntry arg; + CommandArgumentData var_name_arg; + + // Define the first (and only) variant of this arg. + var_name_arg.arg_type = eArgTypeVarName; + var_name_arg.arg_repetition = eArgRepeatPlus; + + // There is only one variant this argument could be; put it into the argument entry. + arg.push_back (var_name_arg); + + // Push the data for the first argument into the m_arguments vector. + m_arguments.push_back (arg); + m_option_group.Append (&m_varobj_options, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1); m_option_group.Append (&m_option_variable, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1); m_option_group.Append (&m_option_compile_units, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1); diff --git a/lldb/test/help/TestHelp.py b/lldb/test/help/TestHelp.py index 2430a2ea098..3c338a762a4 100644 --- a/lldb/test/help/TestHelp.py +++ b/lldb/test/help/TestHelp.py @@ -93,6 +93,11 @@ class HelpCommandTestCase(TestBase): self.expect("help image du line", substrs = ['Dump the debug symbol file for one or more target modules']) + def test_help_target_variable_syntax(self): + """Command 'help target variable' should display <variable-name> ...""" + self.expect("help target variable", + substrs = ['<variable-name> [<variable-name> [...]]']) + if __name__ == '__main__': import atexit |

