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".
llvm-svn: 158235
diff --git a/lldb/source/Commands/CommandObjectHelp.h b/lldb/source/Commands/CommandObjectHelp.h
index ff6bd55..b66d69f 100644
--- a/lldb/source/Commands/CommandObjectHelp.h
+++ b/lldb/source/Commands/CommandObjectHelp.h
@@ -23,7 +23,7 @@
// CommandObjectHelp
//-------------------------------------------------------------------------
-class CommandObjectHelp : public CommandObject
+class CommandObjectHelp : public CommandObjectParsed
{
public:
@@ -32,10 +32,6 @@
virtual
~CommandObjectHelp ();
- virtual bool
- Execute (Args& command,
- CommandReturnObject &result);
-
virtual int
HandleCompletion (Args &input,
int &cursor_index,
@@ -102,14 +98,20 @@
bool m_show_user_defined;
};
- CommandOptions m_options;
-
virtual Options *
GetOptions ()
{
return &m_options;
}
+
+protected:
+ virtual bool
+ DoExecute (Args& command,
+ CommandReturnObject &result);
+private:
+ CommandOptions m_options;
+
};
} // namespace lldb_private