summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectExpression.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2012-06-08 21:56:10 +0000
committerJim Ingham <jingham@apple.com>2012-06-08 21:56:10 +0000
commit5a988416736b906931cf6076d38f5b960110ed81 (patch)
treebbd923b8bcc49eb2e456290706df5452f4bcd250 /lldb/source/Commands/CommandObjectExpression.cpp
parentc5adccab1ae914f439593f8588a6a95669783bad (diff)
downloadbcm5719-llvm-5a988416736b906931cf6076d38f5b960110ed81.tar.gz
bcm5719-llvm-5a988416736b906931cf6076d38f5b960110ed81.zip
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
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp23
1 files changed, 6 insertions, 17 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 33ec52c8a1d..3c04eb35c9f 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -134,10 +134,11 @@ CommandObjectExpression::CommandOptions::GetDefinitions ()
}
CommandObjectExpression::CommandObjectExpression (CommandInterpreter &interpreter) :
- CommandObject (interpreter,
- "expression",
- "Evaluate a C/ObjC/C++ expression in the current program context, using variables currently in scope.",
- NULL),
+ CommandObjectRaw (interpreter,
+ "expression",
+ "Evaluate a C/ObjC/C++ expression in the current program context, using variables currently in scope.",
+ NULL,
+ eFlagProcessMustBePaused),
m_option_group (interpreter),
m_format_options (eFormatDefault),
m_command_options (),
@@ -180,18 +181,6 @@ CommandObjectExpression::GetOptions ()
return &m_option_group;
}
-
-bool
-CommandObjectExpression::Execute
-(
- Args& command,
- CommandReturnObject &result
-)
-{
- return false;
-}
-
-
size_t
CommandObjectExpression::MultiLineExpressionCallback
(
@@ -418,7 +407,7 @@ CommandObjectExpression::EvaluateExpression
}
bool
-CommandObjectExpression::ExecuteRawCommandString
+CommandObjectExpression::DoExecute
(
const char *command,
CommandReturnObject &result
OpenPOWER on IntegriCloud