Modify existing commands with arguments to use the new argument mechanism
(for standardized argument names, argument help, etc.)
llvm-svn: 115570
diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp
index 3c40849..63d319ee 100644
--- a/lldb/source/Commands/CommandObjectSource.cpp
+++ b/lldb/source/Commands/CommandObjectSource.cpp
@@ -231,8 +231,20 @@
CommandObject (interpreter,
"source list",
"Display source code (as specified) based on the current executable's debug info.",
- "source list [<cmd-options>] [<filename>]")
+ NULL)
{
+ CommandArgumentEntry arg;
+ CommandArgumentData file_arg;
+
+ // Define the first (and only) variant of this arg.
+ file_arg.arg_type = eArgTypeFilename;
+ file_arg.arg_repetition = eArgRepeatOptional;
+
+ // There is only one variant this argument could be; put it into the argument entry.
+ arg.push_back (file_arg);
+
+ // Push the data for the first argument into the m_arguments vector.
+ m_arguments.push_back (arg);
}
~CommandObjectSourceList ()