summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2012-09-05 20:41:26 +0000
committerEnrico Granata <egranata@apple.com>2012-09-05 20:41:26 +0000
commitd4439aa9ed02cd7445d2edff4e30a5472bc379c1 (patch)
tree426849abc4056cc71b8f1553c1ee0a11a8816dc6 /lldb/source/Commands
parentd0855e180ded62d29faea57635063e8de8687011 (diff)
downloadbcm5719-llvm-d4439aa9ed02cd7445d2edff4e30a5472bc379c1.tar.gz
bcm5719-llvm-d4439aa9ed02cd7445d2edff4e30a5472bc379c1.zip
Implementing an Options class for EvaluateExpression() in order to make the signature more compact and make it easy to 'just run an expression'
llvm-svn: 163239
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp14
-rw-r--r--lldb/source/Commands/CommandObjectWatchpoint.cpp16
2 files changed, 15 insertions, 15 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index d192c072b94..23c9dc10373 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -298,15 +298,17 @@ CommandObjectExpression::EvaluateExpression
break;
}
+ Target::EvaluateExpressionOptions options;
+ options.SetCoerceToId(m_command_options.print_object)
+ .SetUnwindOnError(m_command_options.unwind_on_error)
+ .SetKeepInMemory(keep_in_memory)
+ .SetUseDynamic(use_dynamic)
+ .SetSingleThreadTimeoutUsec(0);
+
exe_results = target->EvaluateExpression (expr,
m_interpreter.GetExecutionContext().GetFramePtr(),
- eExecutionPolicyOnlyWhenNeeded,
- m_command_options.print_object,
- m_command_options.unwind_on_error,
- keep_in_memory,
- use_dynamic,
result_valobj_sp,
- 0 /* no timeout */);
+ options);
if (exe_results == eExecutionInterrupted && !m_command_options.unwind_on_error)
{
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp
index ff59e318d8d..f7f4b69ea73 100644
--- a/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -1201,18 +1201,16 @@ protected:
}
// Use expression evaluation to arrive at the address to watch.
- const bool coerce_to_id = true;
- const bool unwind_on_error = true;
- const bool keep_in_memory = false;
+ Target::EvaluateExpressionOptions options;
+ options.SetCoerceToId(false)
+ .SetUnwindOnError(true)
+ .SetKeepInMemory(false)
+ .SetSingleThreadTimeoutUsec(0);
+
ExecutionResults expr_result = target->EvaluateExpression (expr_str.c_str(),
frame,
- eExecutionPolicyOnlyWhenNeeded,
- coerce_to_id,
- unwind_on_error,
- keep_in_memory,
- eNoDynamicValues,
valobj_sp,
- 0 /* no timeout */);
+ options);
if (expr_result != eExecutionCompleted) {
result.GetErrorStream().Printf("error: expression evaluation of address to watch failed\n");
result.GetErrorStream().Printf("expression evaluated: %s\n", expr_str.c_str());
OpenPOWER on IntegriCloud