diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-04-14 21:41:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-06-22 18:20:56 +0000 |
commit | bdd1243df58e60e85101c09001d9812a789b6bc4 (patch) | |
tree | a1ce621c7301dd47ba2ddc3b8eaa63b441389481 /contrib/llvm-project/lldb/source/Expression/UserExpression.cpp | |
parent | 781624ca2d054430052c828ba8d2c2eaf2d733e7 (diff) | |
parent | e3b557809604d036af6e00c60f012c2025b59a5e (diff) | |
download | src-bdd1243df58e60e85101c09001d9812a789b6bc4.tar.gz src-bdd1243df58e60e85101c09001d9812a789b6bc4.zip |
Merge llvm-project main llvmorg-16-init-18548-gb0daacf58f41
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-16-init-18548-gb0daacf58f41.
PR: 271047
MFC after: 1 month
Diffstat (limited to 'contrib/llvm-project/lldb/source/Expression/UserExpression.cpp')
-rw-r--r-- | contrib/llvm-project/lldb/source/Expression/UserExpression.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/contrib/llvm-project/lldb/source/Expression/UserExpression.cpp b/contrib/llvm-project/lldb/source/Expression/UserExpression.cpp index 186e414e6879..c1515b0ace81 100644 --- a/contrib/llvm-project/lldb/source/Expression/UserExpression.cpp +++ b/contrib/llvm-project/lldb/source/Expression/UserExpression.cpp @@ -194,16 +194,22 @@ UserExpression::Evaluate(ExecutionContext &exe_ctx, Process *process = exe_ctx.GetProcessPtr(); - if (process == nullptr || process->GetState() != lldb::eStateStopped) { - if (execution_policy == eExecutionPolicyAlways) { - LLDB_LOG(log, "== [UserExpression::Evaluate] Expression may not run, but " - "is not constant =="); + if (process == nullptr && execution_policy == eExecutionPolicyAlways) { + LLDB_LOG(log, "== [UserExpression::Evaluate] No process, but the policy is " + "eExecutionPolicyAlways"); - error.SetErrorString("expression needed to run but couldn't"); + error.SetErrorString("expression needed to run but couldn't: no process"); - return execution_results; - } + return execution_results; } + // Since we might need to call allocate memory and maybe call code to make + // the caller, we need to be stopped. + if (process != nullptr && process->GetState() != lldb::eStateStopped) { + error.SetErrorString("Can't make a function caller while the process is " + "running"); + return execution_results; + } + // Explicitly force the IR interpreter to evaluate the expression when the // there is no process that supports running the expression for us. Don't |