Make raw & parsed commands subclasses of CommandObject rather than having the raw version implement an 
Execute which was never going to get run and another ExecuteRawCommandString.  Took the knowledge of how
to prepare raw & parsed commands out of CommandInterpreter and put it in CommandObject where it belongs.

Also took all the cases where there were the subcommands of Multiword commands declared in the .h file for
the overall command and moved them into the .cpp file.

Made the CommandObject flags work for raw as well as parsed commands.

Made "expr" use the flags so that it requires you to be paused to run "expr".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158235 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectFrame.cpp b/source/Commands/CommandObjectFrame.cpp
index b59cd63..4dc4aa8 100644
--- a/source/Commands/CommandObjectFrame.cpp
+++ b/source/Commands/CommandObjectFrame.cpp
@@ -52,16 +52,16 @@
 // CommandObjectFrameInfo
 //-------------------------------------------------------------------------
 
-class CommandObjectFrameInfo : public CommandObject
+class CommandObjectFrameInfo : public CommandObjectParsed
 {
 public:
 
     CommandObjectFrameInfo (CommandInterpreter &interpreter) :
-        CommandObject (interpreter,
-                       "frame info",
-                       "List information about the currently selected frame in the current thread.",
-                       "frame info",
-                       eFlagProcessMustBeLaunched | eFlagProcessMustBePaused)
+        CommandObjectParsed (interpreter,
+                             "frame info",
+                             "List information about the currently selected frame in the current thread.",
+                             "frame info",
+                             eFlagProcessMustBeLaunched | eFlagProcessMustBePaused)
     {
     }
 
@@ -69,8 +69,9 @@
     {
     }
 
+protected:
     bool
-    Execute (Args& command,
+    DoExecute (Args& command,
              CommandReturnObject &result)
     {
         ExecutionContext exe_ctx(m_interpreter.GetExecutionContext());
@@ -95,7 +96,7 @@
 // CommandObjectFrameSelect
 //-------------------------------------------------------------------------
 
-class CommandObjectFrameSelect : public CommandObject
+class CommandObjectFrameSelect : public CommandObjectParsed
 {
 public:
 
@@ -155,11 +156,11 @@
     };
     
     CommandObjectFrameSelect (CommandInterpreter &interpreter) :
-        CommandObject (interpreter,
-                       "frame select",
-                       "Select a frame by index from within the current thread and make it the current frame.",
-                       NULL,
-                       eFlagProcessMustBeLaunched | eFlagProcessMustBePaused),
+        CommandObjectParsed (interpreter,
+                             "frame select",
+                             "Select a frame by index from within the current thread and make it the current frame.",
+                             NULL,
+                             eFlagProcessMustBeLaunched | eFlagProcessMustBePaused),
         m_options (interpreter)
     {
         CommandArgumentEntry arg;
@@ -188,8 +189,9 @@
     }
 
 
+protected:
     bool
-    Execute (Args& command,
+    DoExecute (Args& command,
              CommandReturnObject &result)
     {
         ExecutionContext exe_ctx (m_interpreter.GetExecutionContext());
@@ -319,21 +321,21 @@
 //----------------------------------------------------------------------
 // List images with associated information
 //----------------------------------------------------------------------
-class CommandObjectFrameVariable : public CommandObject
+class CommandObjectFrameVariable : public CommandObjectParsed
 {
 public:
 
     CommandObjectFrameVariable (CommandInterpreter &interpreter) :
-        CommandObject (interpreter,
-                       "frame variable",
-                       "Show frame variables. All argument and local variables "
-                       "that are in scope will be shown when no arguments are given. "
-                       "If any arguments are specified, they can be names of "
-                       "argument, local, file static and file global variables. "
-                       "Children of aggregate variables can be specified such as "
-                       "'var->child.x'.",
-                       NULL,
-                       eFlagProcessMustBeLaunched | eFlagProcessMustBePaused),
+        CommandObjectParsed (interpreter,
+                             "frame variable",
+                             "Show frame variables. All argument and local variables "
+                             "that are in scope will be shown when no arguments are given. "
+                             "If any arguments are specified, they can be names of "
+                             "argument, local, file static and file global variables. "
+                             "Children of aggregate variables can be specified such as "
+                             "'var->child.x'.",
+                             NULL,
+                             eFlagProcessMustBeLaunched | eFlagProcessMustBePaused),
         m_option_group (interpreter),
         m_option_variable(true), // Include the frame specific options by passing "true"
         m_option_format (eFormatDefault),
@@ -370,13 +372,9 @@
         return &m_option_group;
     }
 
-
+protected:
     virtual bool
-    Execute
-    (
-        Args& command,
-        CommandReturnObject &result
-    )
+    DoExecute (Args& command, CommandReturnObject &result)
     {
         ExecutionContext exe_ctx(m_interpreter.GetExecutionContext());
         StackFrame *frame = exe_ctx.GetFramePtr();