From d4439aa9ed02cd7445d2edff4e30a5472bc379c1 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Wed, 5 Sep 2012 20:41:26 +0000 Subject: 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 --- lldb/source/Interpreter/CommandInterpreter.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp') diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index bbd18b94c12..18db69c327b 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -1193,19 +1193,19 @@ CommandInterpreter::PreprocessCommand (std::string &command) target = Host::GetDummyTarget(GetDebugger()).get(); if (target) { - const bool coerce_to_id = false; - const bool unwind_on_error = true; - const bool keep_in_memory = false; ValueObjectSP expr_result_valobj_sp; + + Target::EvaluateExpressionOptions options; + options.SetCoerceToId(false) + .SetUnwindOnError(true) + .SetKeepInMemory(false) + .SetSingleThreadTimeoutUsec(0); + ExecutionResults expr_result = target->EvaluateExpression (expr_str.c_str(), - exe_ctx.GetFramePtr(), - eExecutionPolicyOnlyWhenNeeded, - coerce_to_id, - unwind_on_error, - keep_in_memory, - eNoDynamicValues, + exe_ctx.GetFramePtr(), expr_result_valobj_sp, - 0 /* no timeout */); + options); + if (expr_result == eExecutionCompleted) { Scalar scalar; -- cgit v1.2.3