From 405fe67f1424284173459575b1081f42935c50fd Mon Sep 17 00:00:00 2001 From: Caroline Tice Date: Mon, 4 Oct 2010 22:28:36 +0000 Subject: Modify existing commands with arguments to use the new argument mechanism (for standardized argument names, argument help, etc.) llvm-svn: 115570 --- lldb/source/Commands/CommandObjectCall.cpp | 35 +++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'lldb/source/Commands/CommandObjectCall.cpp') 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 [[ ] ... ] []", + //"call [[ ] ... ] []", + 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 () -- cgit v1.2.3