diff options
author | Caroline Tice <ctice@apple.com> | 2010-10-04 22:28:36 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2010-10-04 22:28:36 +0000 |
commit | 405fe67f1424284173459575b1081f42935c50fd (patch) | |
tree | 5110616e8a6ebcd9138f08209dbacf041b50a37a /lldb/source/Commands/CommandObjectExpression.cpp | |
parent | 3703ff41632ea5f5749f35fe380edc8872f34d6d (diff) | |
download | bcm5719-llvm-405fe67f1424284173459575b1081f42935c50fd.tar.gz bcm5719-llvm-405fe67f1424284173459575b1081f42935c50fd.zip |
Modify existing commands with arguments to use the new argument mechanism
(for standardized argument names, argument help, etc.)
llvm-svn: 115570
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectExpression.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index 886bc8ba66d..adc8eb153eb 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -106,7 +106,7 @@ CommandObjectExpression::CommandObjectExpression (CommandInterpreter &interprete CommandObject (interpreter, "expression", "Evaluate a C/ObjC/C++ expression in the current program context, using variables currently in scope.", - "expression [<cmd-options>] <expr>"), + NULL), m_expr_line_count (0), m_expr_lines () { @@ -116,6 +116,19 @@ CommandObjectExpression::CommandObjectExpression (CommandInterpreter &interprete expr my_struct->a = my_array[3] \n\ expr -f bin -- (index * 8) + 5 \n\ expr char c[] = \"foo\"; c[0]\n"); + + CommandArgumentEntry arg; + CommandArgumentData expression_arg; + + // Define the first (and only) variant of this arg. + expression_arg.arg_type = eArgTypeExpression; + expression_arg.arg_repetition = eArgRepeatPlain; + + // There is only one variant this argument could be; put it into the argument entry. + arg.push_back (expression_arg); + + // Push the data for the first argument into the m_arguments vector. + m_arguments.push_back (arg); } CommandObjectExpression::~CommandObjectExpression () |