Mercurial > hg > CbC > CbC_llvm
diff lldb/source/Expression/LLVMUserExpression.cpp @ 173:0572611fdcc8 llvm10 llvm12
reorgnization done
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 11:55:54 +0900 |
parents | 1d019706d866 |
children | 2e18cbf3894f |
line wrap: on
line diff
--- a/lldb/source/Expression/LLVMUserExpression.cpp Mon May 25 11:50:15 2020 +0900 +++ b/lldb/source/Expression/LLVMUserExpression.cpp Mon May 25 11:55:54 2020 +0900 @@ -134,6 +134,10 @@ return lldb::eExpressionSetupError; } + // Store away the thread ID for error reporting, in case it exits + // during execution: + lldb::tid_t expr_thread_id = exe_ctx.GetThreadRef().GetID(); + Address wrapper_address(m_jit_start_addr); std::vector<lldb::addr_t> args; @@ -223,6 +227,14 @@ "Use \"thread return -x\" to return to the state before expression " "evaluation."); return execution_result; + } else if (execution_result == lldb::eExpressionThreadVanished) { + diagnostic_manager.Printf( + eDiagnosticSeverityError, + "Couldn't complete execution; the thread " + "on which the expression was being run: 0x%" PRIx64 + " exited during its execution.", + expr_thread_id); + return execution_result; } else if (execution_result != lldb::eExpressionCompleted) { diagnostic_manager.Printf( eDiagnosticSeverityError, "Couldn't execute function; result was %s",