mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 21:55:39 +08:00
Compilation can end up calling functions (e.g. to resolve indirect functions) so I added
a way for compilation to take a "thread to use for compilation". If it isn't set then the compilation will use the currently selected thread. This should help keep function execution to the one thread intended. llvm-svn: 263972
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user