diff options
Diffstat (limited to 'lldb/source/Expression/UserExpression.cpp')
-rw-r--r-- | lldb/source/Expression/UserExpression.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Expression/UserExpression.cpp b/lldb/source/Expression/UserExpression.cpp index 6b97eb68b11..6f637b1db92 100644 --- a/lldb/source/Expression/UserExpression.cpp +++ b/lldb/source/Expression/UserExpression.cpp @@ -194,6 +194,11 @@ UserExpression::Evaluate (ExecutionContext &exe_ctx, if (process == NULL || !process->CanJIT()) execution_policy = eExecutionPolicyNever; + + // We need to set the expression execution thread here, turns out parse can call functions in the process of + // looking up symbols, which will escape the context set by exe_ctx passed to Execute. + lldb::ThreadSP thread_sp = exe_ctx.GetThreadSP(); + ThreadList::ExpressionExecutionThreadPusher execution_thread_pusher(thread_sp); const char *full_prefix = NULL; const char *option_prefix = options.GetPrefix(); |