summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectCall.cpp
diff options
context:
space:
mode:
authorCaroline Tice <ctice@apple.com>2010-10-04 22:28:36 +0000
committerCaroline Tice <ctice@apple.com>2010-10-04 22:28:36 +0000
commit405fe67f1424284173459575b1081f42935c50fd (patch)
tree5110616e8a6ebcd9138f08209dbacf041b50a37a /lldb/source/Commands/CommandObjectCall.cpp
parent3703ff41632ea5f5749f35fe380edc8872f34d6d (diff)
downloadbcm5719-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/CommandObjectCall.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectCall.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectCall.cpp b/lldb/source/Commands/CommandObjectCall.cpp
index 3e938fccaa6..26746687d9d 100644
--- a/lldb/source/Commands/CommandObjectCall.cpp
+++ b/lldb/source/Commands/CommandObjectCall.cpp
@@ -110,9 +110,42 @@ CommandObjectCall::CommandObjectCall () :
CommandObject (
"call",
"Call a function.",
- "call <return_type> <function-name> [[<arg1-type> <arg1-value>] ... <argn-type> <argn-value>] [<cmd-options>]",
+ //"call <return_type> <function-name> [[<arg1-type> <arg1-value>] ... <argn-type> <argn-value>] [<cmd-options>]",
+ NULL,
eFlagProcessMustBeLaunched | eFlagProcessMustBePaused)
{
+ CommandArgumentEntry arg1;
+ CommandArgumentEntry arg2;
+ CommandArgumentEntry arg3;
+ CommandArgumentData return_type_arg;
+ CommandArgumentData function_name_arg;
+ CommandArgumentData arg_type_arg;
+ CommandArgumentData arg_value_arg;
+
+ // Define the first (and only) variant of this arg.
+ return_type_arg.arg_type = eArgTypeType;
+ return_type_arg.arg_repetition = eArgRepeatPlain;
+
+ arg1.push_back (return_type_arg);
+
+ function_name_arg.arg_type = eArgTypeFunctionName;
+ function_name_arg.arg_repetition = eArgTypePlain;
+
+ arg2.push_back (function_name_arg);
+
+ arg_type_arg.arg_type = eArgTypeArgType;
+ arg_type_arg.arg_repetition = eArgRepeatPairRangeOptional;
+
+ arg_value_arg.arg_type = eArgTypeValue;
+ arg_value_arg.arg_repetition = eArgRepeatPairRangeOptional;
+
+ arg3.push_back (arg_type_arg);
+ arg3.push_back (arg_value_arg);
+
+ // Push the data for the first argument into the m_arguments vector.
+ m_arguments.push_back (arg1);
+ m_arguments.push_back (arg2);
+ m_arguments.push_back (arg3);
}
CommandObjectCall::~CommandObjectCall ()
OpenPOWER on IntegriCloud