diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
commit | f73363f1dd94996356cefbf24388f561891acf0b (patch) | |
tree | e3c31248bdb36eaec5fd833490d4278162dba2a0 /source/Expression/FunctionCaller.cpp | |
parent | 160ee69dd7ae18978f4068116777639ea98dc951 (diff) |
Notes
Diffstat (limited to 'source/Expression/FunctionCaller.cpp')
-rw-r--r-- | source/Expression/FunctionCaller.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/source/Expression/FunctionCaller.cpp b/source/Expression/FunctionCaller.cpp index 6f60f8bf9c13..9742ed0b270e 100644 --- a/source/Expression/FunctionCaller.cpp +++ b/source/Expression/FunctionCaller.cpp @@ -48,7 +48,8 @@ FunctionCaller::FunctionCaller(ExecutionContextScope &exe_scope, m_function_return_type(return_type), m_wrapper_function_name("__lldb_caller_function"), m_wrapper_struct_name("__lldb_caller_struct"), m_wrapper_args_addrs(), - m_arg_values(arg_value_list), m_compiled(false), m_JITted(false) { + m_struct_valid(false), m_arg_values(arg_value_list), m_compiled(false), + m_JITted(false) { m_jit_process_wp = lldb::ProcessWP(exe_scope.CalculateProcess()); // Can't make a FunctionCaller without a process. assert(m_jit_process_wp.lock()); @@ -90,8 +91,12 @@ bool FunctionCaller::WriteFunctionWrapper( m_jit_start_addr, m_jit_end_addr, m_execution_unit_sp, exe_ctx, can_interpret, eExecutionPolicyAlways)); - if (!jit_error.Success()) + if (!jit_error.Success()) { + diagnostic_manager.Printf(eDiagnosticSeverityError, + "Error in PrepareForExecution: %s.", + jit_error.AsCString()); return false; + } if (m_parser->GetGenerateDebugInfo()) { lldb::ModuleSP jit_module_sp(m_execution_unit_sp->GetJITModule()); @@ -318,9 +323,9 @@ lldb::ExpressionResults FunctionCaller::ExecuteFunction( DiagnosticManager &diagnostic_manager, Value &results) { lldb::ExpressionResults return_value = lldb::eExpressionSetupError; - // FunctionCaller::ExecuteFunction execution is always just to get the result. - // Do make sure we ignore - // breakpoints, unwind on error, and don't try to debug it. + // FunctionCaller::ExecuteFunction execution is always just to get the + // result. Do make sure we ignore breakpoints, unwind on error, and don't try + // to debug it. EvaluateExpressionOptions real_options = options; real_options.SetDebug(false); real_options.SetUnwindOnError(true); @@ -355,9 +360,8 @@ lldb::ExpressionResults FunctionCaller::ExecuteFunction( return lldb::eExpressionSetupError; // We need to make sure we record the fact that we are running an expression - // here - // otherwise this fact will fail to be recorded when fetching an Objective-C - // object description + // here otherwise this fact will fail to be recorded when fetching an + // Objective-C object description if (exe_ctx.GetProcessPtr()) exe_ctx.GetProcessPtr()->SetRunningUserExpression(true); |