Added the equivalent of gdb's "unwind-on-signal" to the expression command, and a parameter to control it in ClangUserExpression, and on down to ClangFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118290 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangUserExpression.cpp b/source/Expression/ClangUserExpression.cpp
index e75c323..87bf733 100644
--- a/source/Expression/ClangUserExpression.cpp
+++ b/source/Expression/ClangUserExpression.cpp
@@ -357,6 +357,7 @@
bool
ClangUserExpression::Execute (Stream &error_stream,
ExecutionContext &exe_ctx,
+ bool discard_on_error,
ClangExpressionVariable *&result)
{
if (m_dwarf_opcodes.get())
@@ -375,12 +376,15 @@
PrepareToExecuteJITExpression (error_stream, exe_ctx, struct_address, object_ptr);
+ const bool stop_others = true;
+ const bool try_all_threads = true;
ClangFunction::ExecutionResults execution_result =
ClangFunction::ExecuteFunction (exe_ctx,
m_jit_addr,
struct_address,
- true,
- true,
+ stop_others,
+ try_all_threads,
+ discard_on_error,
10000000,
error_stream,
(m_needs_object_ptr ? &object_ptr : NULL));
@@ -430,9 +434,9 @@
return *m_dwarf_opcodes.get();
}
-
lldb::ValueObjectSP
ClangUserExpression::Evaluate (ExecutionContext &exe_ctx,
+ bool discard_on_error,
const char *expr_cstr,
const char *expr_prefix)
{
@@ -479,7 +483,7 @@
error_stream.GetString().clear();
- if (!user_expression.Execute (error_stream, exe_ctx, expr_result))
+ if (!user_expression.Execute (error_stream, exe_ctx, discard_on_error, expr_result))
{
if (error_stream.GetString().empty())
error.SetErrorString ("expression failed to execute, unknown error");