forked from OSchip/llvm-project
Rename eExecution*** to eExpression*** to be consistent with the result type.
llvm-svn: 207945
This commit is contained in:
parent
1624a2d3c8
commit
8646d3c164
|
@ -296,7 +296,7 @@ public:
|
|||
/// fails to parse, run, or evaluated.
|
||||
///
|
||||
/// @result
|
||||
/// A Process::ExpressionResults value. eExecutionCompleted for success.
|
||||
/// A Process::ExpressionResults value. eExpressionCompleted for success.
|
||||
//------------------------------------------------------------------
|
||||
static lldb::ExpressionResults
|
||||
Evaluate (ExecutionContext &exe_ctx,
|
||||
|
|
|
@ -204,15 +204,15 @@ namespace lldb {
|
|||
//----------------------------------------------------------------------
|
||||
typedef enum ExpressionResults
|
||||
{
|
||||
eExecutionCompleted = 0,
|
||||
eExecutionSetupError,
|
||||
eExecutionParseError,
|
||||
eExecutionDiscarded,
|
||||
eExecutionInterrupted,
|
||||
eExecutionHitBreakpoint,
|
||||
eExecutionTimedOut,
|
||||
eExecutionResultUnavailable,
|
||||
eExecutionStoppedForDebug
|
||||
eExpressionCompleted = 0,
|
||||
eExpressionSetupError,
|
||||
eExpressionParseError,
|
||||
eExpressionDiscarded,
|
||||
eExpressionInterrupted,
|
||||
eExpressionHitBreakpoint,
|
||||
eExpressionTimedOut,
|
||||
eExpressionResultUnavailable,
|
||||
eExpressionStoppedForDebug
|
||||
} ExpressionResults;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -1372,7 +1372,7 @@ SBFrame::EvaluateExpression (const char *expr, const SBExpressionOptions &option
|
|||
|
||||
Log *expr_log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
|
||||
|
||||
ExpressionResults exe_results = eExecutionSetupError;
|
||||
ExpressionResults exe_results = eExpressionSetupError;
|
||||
SBValue expr_result;
|
||||
|
||||
if (expr == NULL || expr[0] == '\0')
|
||||
|
|
|
@ -2611,7 +2611,7 @@ SBTarget::EvaluateExpression (const char *expr, const SBExpressionOptions &optio
|
|||
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
Log * expr_log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
|
||||
SBValue expr_result;
|
||||
ExpressionResults exe_results = eExecutionSetupError;
|
||||
ExpressionResults exe_results = eExpressionSetupError;
|
||||
ValueObjectSP expr_value_sp;
|
||||
TargetSP target_sp(GetSP());
|
||||
StackFrame *frame = NULL;
|
||||
|
|
|
@ -326,7 +326,7 @@ BreakpointLocation::ConditionSaysStop (ExecutionContext &exe_ctx, Error &error)
|
|||
|
||||
bool ret;
|
||||
|
||||
if (result_code == eExecutionCompleted)
|
||||
if (result_code == eExpressionCompleted)
|
||||
{
|
||||
if (!result_variable_sp)
|
||||
{
|
||||
|
|
|
@ -1503,12 +1503,12 @@ protected:
|
|||
options.SetUnwindOnError(true);
|
||||
options.SetUseDynamic(eNoDynamicValues);
|
||||
|
||||
ExpressionResults exe_results = eExecutionSetupError;
|
||||
ExpressionResults exe_results = eExpressionSetupError;
|
||||
exe_results = target->EvaluateExpression (command,
|
||||
frame_sp.get(),
|
||||
return_valobj_sp,
|
||||
options);
|
||||
if (exe_results != eExecutionCompleted)
|
||||
if (exe_results != eExpressionCompleted)
|
||||
{
|
||||
if (return_valobj_sp)
|
||||
result.AppendErrorWithFormat("Error evaluating result expression: %s", return_valobj_sp->GetError().AsCString());
|
||||
|
|
|
@ -1260,7 +1260,7 @@ protected:
|
|||
frame,
|
||||
valobj_sp,
|
||||
options);
|
||||
if (expr_result != eExecutionCompleted)
|
||||
if (expr_result != eExpressionCompleted)
|
||||
{
|
||||
result.GetErrorStream().Printf("error: expression evaluation of address to watch failed\n");
|
||||
result.GetErrorStream().Printf("expression evaluated: %s\n", expr);
|
||||
|
|
|
@ -85,7 +85,7 @@ lldb_private::formatters::CFBagSummaryProvider (ValueObject& valobj, Stream& str
|
|||
ValueObjectSP count_sp;
|
||||
StreamString expr;
|
||||
expr.Printf("(int)CFBagGetCount((void*)0x%" PRIx64 ")",valobj.GetPointerValue());
|
||||
if (process_sp->GetTarget().EvaluateExpression(expr.GetData(), frame_sp.get(), count_sp) != eExecutionCompleted)
|
||||
if (process_sp->GetTarget().EvaluateExpression(expr.GetData(), frame_sp.get(), count_sp) != eExpressionCompleted)
|
||||
return false;
|
||||
if (!count_sp)
|
||||
return false;
|
||||
|
@ -279,7 +279,7 @@ lldb_private::formatters::CFBinaryHeapSummaryProvider (ValueObject& valobj, Stre
|
|||
ValueObjectSP count_sp;
|
||||
StreamString expr;
|
||||
expr.Printf("(int)CFBinaryHeapGetCount((void*)0x%" PRIx64 ")",valobj.GetPointerValue());
|
||||
if (process_sp->GetTarget().EvaluateExpression(expr.GetData(), frame_sp.get(), count_sp) != eExecutionCompleted)
|
||||
if (process_sp->GetTarget().EvaluateExpression(expr.GetData(), frame_sp.get(), count_sp) != eExpressionCompleted)
|
||||
return false;
|
||||
if (!count_sp)
|
||||
return false;
|
||||
|
|
|
@ -334,7 +334,7 @@ ClangFunction::WriteFunctionArguments (ExecutionContext &exe_ctx,
|
|||
|
||||
Error error;
|
||||
using namespace clang;
|
||||
lldb::ExpressionResults return_value = lldb::eExecutionSetupError;
|
||||
lldb::ExpressionResults return_value = lldb::eExpressionSetupError;
|
||||
|
||||
Process *process = exe_ctx.GetProcessPtr();
|
||||
|
||||
|
@ -511,7 +511,7 @@ ClangFunction::ExecuteFunction(
|
|||
Value &results)
|
||||
{
|
||||
using namespace clang;
|
||||
lldb::ExpressionResults return_value = lldb::eExecutionSetupError;
|
||||
lldb::ExpressionResults return_value = lldb::eExpressionSetupError;
|
||||
|
||||
// ClangFunction::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.
|
||||
|
@ -528,12 +528,12 @@ ClangFunction::ExecuteFunction(
|
|||
args_addr = LLDB_INVALID_ADDRESS;
|
||||
|
||||
if (CompileFunction(errors) != 0)
|
||||
return lldb::eExecutionSetupError;
|
||||
return lldb::eExpressionSetupError;
|
||||
|
||||
if (args_addr == LLDB_INVALID_ADDRESS)
|
||||
{
|
||||
if (!InsertFunction(exe_ctx, args_addr, errors))
|
||||
return lldb::eExecutionSetupError;
|
||||
return lldb::eExpressionSetupError;
|
||||
}
|
||||
|
||||
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
|
||||
|
@ -546,7 +546,7 @@ ClangFunction::ExecuteFunction(
|
|||
real_options,
|
||||
errors));
|
||||
if (!call_plan_sp)
|
||||
return lldb::eExecutionSetupError;
|
||||
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
|
||||
|
@ -560,7 +560,7 @@ ClangFunction::ExecuteFunction(
|
|||
|
||||
if (log)
|
||||
{
|
||||
if (return_value != lldb::eExecutionCompleted)
|
||||
if (return_value != lldb::eExpressionCompleted)
|
||||
{
|
||||
log->Printf("== [ClangFunction::ExecuteFunction] Execution of \"%s\" completed abnormally ==", m_name.c_str());
|
||||
}
|
||||
|
@ -576,7 +576,7 @@ ClangFunction::ExecuteFunction(
|
|||
if (args_addr_ptr != NULL)
|
||||
*args_addr_ptr = args_addr;
|
||||
|
||||
if (return_value != lldb::eExecutionCompleted)
|
||||
if (return_value != lldb::eExpressionCompleted)
|
||||
return return_value;
|
||||
|
||||
FetchFunctionResults(exe_ctx, args_addr, results);
|
||||
|
@ -584,7 +584,7 @@ ClangFunction::ExecuteFunction(
|
|||
if (args_addr_ptr == NULL)
|
||||
DeallocateFunctionResults(exe_ctx, args_addr);
|
||||
|
||||
return lldb::eExecutionCompleted;
|
||||
return lldb::eExpressionCompleted;
|
||||
}
|
||||
|
||||
clang::ASTConsumer *
|
||||
|
|
|
@ -819,7 +819,7 @@ ClangUserExpression::Execute (Stream &error_stream,
|
|||
if (!PrepareToExecuteJITExpression (error_stream, exe_ctx, struct_address, object_ptr, cmd_ptr))
|
||||
{
|
||||
error_stream.Printf("Errored out in %s, couldn't PrepareToExecuteJITExpression", __FUNCTION__);
|
||||
return lldb::eExecutionSetupError;
|
||||
return lldb::eExpressionSetupError;
|
||||
}
|
||||
|
||||
lldb::addr_t function_stack_bottom = LLDB_INVALID_ADDRESS;
|
||||
|
@ -833,7 +833,7 @@ ClangUserExpression::Execute (Stream &error_stream,
|
|||
if (!module || !function)
|
||||
{
|
||||
error_stream.Printf("Supposed to interpret, but nothing is there");
|
||||
return lldb::eExecutionSetupError;
|
||||
return lldb::eExpressionSetupError;
|
||||
}
|
||||
|
||||
Error interpreter_error;
|
||||
|
@ -864,7 +864,7 @@ ClangUserExpression::Execute (Stream &error_stream,
|
|||
if (!interpreter_error.Success())
|
||||
{
|
||||
error_stream.Printf("Supposed to interpret, but failed: %s", interpreter_error.AsCString());
|
||||
return lldb::eExecutionDiscarded;
|
||||
return lldb::eExpressionDiscarded;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -872,7 +872,7 @@ ClangUserExpression::Execute (Stream &error_stream,
|
|||
if (!exe_ctx.HasThreadScope())
|
||||
{
|
||||
error_stream.Printf("ClangUserExpression::Execute called with no thread selected.");
|
||||
return lldb::eExecutionSetupError;
|
||||
return lldb::eExpressionSetupError;
|
||||
}
|
||||
|
||||
Address wrapper_address (m_jit_start_addr);
|
||||
|
@ -894,7 +894,7 @@ ClangUserExpression::Execute (Stream &error_stream,
|
|||
shared_ptr_to_me));
|
||||
|
||||
if (!call_plan_sp || !call_plan_sp->ValidatePlan (&error_stream))
|
||||
return lldb::eExecutionSetupError;
|
||||
return lldb::eExpressionSetupError;
|
||||
|
||||
lldb::addr_t function_stack_pointer = static_cast<ThreadPlanCallFunction *>(call_plan_sp.get())->GetFunctionStackPointer();
|
||||
|
||||
|
@ -918,7 +918,7 @@ ClangUserExpression::Execute (Stream &error_stream,
|
|||
if (log)
|
||||
log->Printf("-- [ClangUserExpression::Execute] Execution of expression completed --");
|
||||
|
||||
if (execution_result == lldb::eExecutionInterrupted || execution_result == lldb::eExecutionHitBreakpoint)
|
||||
if (execution_result == lldb::eExpressionInterrupted || execution_result == lldb::eExpressionHitBreakpoint)
|
||||
{
|
||||
const char *error_desc = NULL;
|
||||
|
||||
|
@ -933,8 +933,8 @@ ClangUserExpression::Execute (Stream &error_stream,
|
|||
else
|
||||
error_stream.PutCString ("Execution was interrupted.");
|
||||
|
||||
if ((execution_result == lldb::eExecutionInterrupted && options.DoesUnwindOnError())
|
||||
|| (execution_result == lldb::eExecutionHitBreakpoint && options.DoesIgnoreBreakpoints()))
|
||||
if ((execution_result == lldb::eExpressionInterrupted && options.DoesUnwindOnError())
|
||||
|| (execution_result == lldb::eExpressionHitBreakpoint && options.DoesIgnoreBreakpoints()))
|
||||
error_stream.PutCString ("\nThe process has been returned to the state before expression evaluation.");
|
||||
else
|
||||
error_stream.PutCString ("\nThe process has been left at the point where it was interrupted, "
|
||||
|
@ -942,14 +942,14 @@ ClangUserExpression::Execute (Stream &error_stream,
|
|||
|
||||
return execution_result;
|
||||
}
|
||||
else if (execution_result == lldb::eExecutionStoppedForDebug)
|
||||
else if (execution_result == lldb::eExpressionStoppedForDebug)
|
||||
{
|
||||
error_stream.PutCString ("Execution was halted at the first instruction of the expression "
|
||||
"function because \"debug\" was requested.\n"
|
||||
"Use \"thread return -x\" to return to the state before expression evaluation.");
|
||||
return execution_result;
|
||||
}
|
||||
else if (execution_result != lldb::eExecutionCompleted)
|
||||
else if (execution_result != lldb::eExpressionCompleted)
|
||||
{
|
||||
error_stream.Printf ("Couldn't execute function; result was %s\n", Process::ExecutionResultAsCString (execution_result));
|
||||
return execution_result;
|
||||
|
@ -958,17 +958,17 @@ ClangUserExpression::Execute (Stream &error_stream,
|
|||
|
||||
if (FinalizeJITExecution (error_stream, exe_ctx, result, function_stack_bottom, function_stack_top))
|
||||
{
|
||||
return lldb::eExecutionCompleted;
|
||||
return lldb::eExpressionCompleted;
|
||||
}
|
||||
else
|
||||
{
|
||||
return lldb::eExecutionResultUnavailable;
|
||||
return lldb::eExpressionResultUnavailable;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
error_stream.Printf("Expression can't be run, because there is no JIT compiled function");
|
||||
return lldb::eExecutionSetupError;
|
||||
return lldb::eExpressionSetupError;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -985,7 +985,7 @@ ClangUserExpression::Evaluate (ExecutionContext &exe_ctx,
|
|||
lldb_private::ExecutionPolicy execution_policy = options.GetExecutionPolicy();
|
||||
const lldb::LanguageType language = options.GetLanguage();
|
||||
const ResultType desired_type = options.DoesCoerceToId() ? ClangUserExpression::eResultTypeId : ClangUserExpression::eResultTypeAny;
|
||||
lldb::ExpressionResults execution_results = lldb::eExecutionSetupError;
|
||||
lldb::ExpressionResults execution_results = lldb::eExpressionSetupError;
|
||||
|
||||
Process *process = exe_ctx.GetProcessPtr();
|
||||
|
||||
|
@ -1019,7 +1019,7 @@ ClangUserExpression::Evaluate (ExecutionContext &exe_ctx,
|
|||
{
|
||||
error.SetErrorString ("expression interrupted by callback before parse");
|
||||
result_valobj_sp = ValueObjectConstResult::Create (exe_ctx.GetBestExecutionContextScope(), error);
|
||||
return lldb::eExecutionInterrupted;
|
||||
return lldb::eExpressionInterrupted;
|
||||
}
|
||||
|
||||
if (!user_expression_sp->Parse (error_stream,
|
||||
|
@ -1029,9 +1029,9 @@ ClangUserExpression::Evaluate (ExecutionContext &exe_ctx,
|
|||
generate_debug_info))
|
||||
{
|
||||
if (error_stream.GetString().empty())
|
||||
error.SetExpressionError (lldb::eExecutionParseError, "expression failed to parse, unknown error");
|
||||
error.SetExpressionError (lldb::eExpressionParseError, "expression failed to parse, unknown error");
|
||||
else
|
||||
error.SetExpressionError (lldb::eExecutionParseError, error_stream.GetString().c_str());
|
||||
error.SetExpressionError (lldb::eExpressionParseError, error_stream.GetString().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1044,15 +1044,15 @@ ClangUserExpression::Evaluate (ExecutionContext &exe_ctx,
|
|||
log->Printf("== [ClangUserExpression::Evaluate] Expression may not run, but is not constant ==");
|
||||
|
||||
if (error_stream.GetString().empty())
|
||||
error.SetExpressionError (lldb::eExecutionSetupError, "expression needed to run but couldn't");
|
||||
error.SetExpressionError (lldb::eExpressionSetupError, "expression needed to run but couldn't");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (options.InvokeCancelCallback (lldb::eExpressionEvaluationExecution))
|
||||
{
|
||||
error.SetExpressionError (lldb::eExecutionInterrupted, "expression interrupted by callback before execution");
|
||||
error.SetExpressionError (lldb::eExpressionInterrupted, "expression interrupted by callback before execution");
|
||||
result_valobj_sp = ValueObjectConstResult::Create (exe_ctx.GetBestExecutionContextScope(), error);
|
||||
return lldb::eExecutionInterrupted;
|
||||
return lldb::eExpressionInterrupted;
|
||||
}
|
||||
|
||||
error_stream.GetString().clear();
|
||||
|
@ -1066,7 +1066,7 @@ ClangUserExpression::Evaluate (ExecutionContext &exe_ctx,
|
|||
user_expression_sp,
|
||||
expr_result);
|
||||
|
||||
if (execution_results != lldb::eExecutionCompleted)
|
||||
if (execution_results != lldb::eExpressionCompleted)
|
||||
{
|
||||
if (log)
|
||||
log->Printf("== [ClangUserExpression::Evaluate] Execution completed abnormally ==");
|
||||
|
@ -1099,8 +1099,8 @@ ClangUserExpression::Evaluate (ExecutionContext &exe_ctx,
|
|||
|
||||
if (options.InvokeCancelCallback(lldb::eExpressionEvaluationComplete))
|
||||
{
|
||||
error.SetExpressionError (lldb::eExecutionInterrupted, "expression interrupted by callback after complete");
|
||||
return lldb::eExecutionInterrupted;
|
||||
error.SetExpressionError (lldb::eExpressionInterrupted, "expression interrupted by callback after complete");
|
||||
return lldb::eExpressionInterrupted;
|
||||
}
|
||||
|
||||
if (result_valobj_sp.get() == NULL)
|
||||
|
|
|
@ -823,7 +823,7 @@ Args::StringToAddress (const ExecutionContext *exe_ctx, const char *s, lldb::add
|
|||
options);
|
||||
|
||||
bool success = false;
|
||||
if (expr_result == eExecutionCompleted)
|
||||
if (expr_result == eExpressionCompleted)
|
||||
{
|
||||
// Get the address to watch.
|
||||
addr = valobj_sp->GetValueAsUnsigned(fail_value, &success);
|
||||
|
|
|
@ -1461,7 +1461,7 @@ CommandInterpreter::PreprocessCommand (std::string &command)
|
|||
expr_result_valobj_sp,
|
||||
options);
|
||||
|
||||
if (expr_result == eExecutionCompleted)
|
||||
if (expr_result == eExpressionCompleted)
|
||||
{
|
||||
Scalar scalar;
|
||||
if (expr_result_valobj_sp->ResolveValue (scalar))
|
||||
|
@ -1496,29 +1496,29 @@ CommandInterpreter::PreprocessCommand (std::string &command)
|
|||
|
||||
switch (expr_result)
|
||||
{
|
||||
case eExecutionSetupError:
|
||||
case eExpressionSetupError:
|
||||
error.SetErrorStringWithFormat("expression setup error for the expression '%s'", expr_str.c_str());
|
||||
break;
|
||||
case eExecutionParseError:
|
||||
case eExpressionParseError:
|
||||
error.SetErrorStringWithFormat ("expression parse error for the expression '%s'", expr_str.c_str());
|
||||
break;
|
||||
case eExecutionResultUnavailable:
|
||||
case eExpressionResultUnavailable:
|
||||
error.SetErrorStringWithFormat ("expression error fetching result for the expression '%s'", expr_str.c_str());
|
||||
case eExecutionCompleted:
|
||||
case eExpressionCompleted:
|
||||
break;
|
||||
case eExecutionDiscarded:
|
||||
case eExpressionDiscarded:
|
||||
error.SetErrorStringWithFormat("expression discarded for the expression '%s'", expr_str.c_str());
|
||||
break;
|
||||
case eExecutionInterrupted:
|
||||
case eExpressionInterrupted:
|
||||
error.SetErrorStringWithFormat("expression interrupted for the expression '%s'", expr_str.c_str());
|
||||
break;
|
||||
case eExecutionHitBreakpoint:
|
||||
case eExpressionHitBreakpoint:
|
||||
error.SetErrorStringWithFormat("expression hit breakpoint for the expression '%s'", expr_str.c_str());
|
||||
break;
|
||||
case eExecutionTimedOut:
|
||||
case eExpressionTimedOut:
|
||||
error.SetErrorStringWithFormat("expression timed out for the expression '%s'", expr_str.c_str());
|
||||
break;
|
||||
case eExecutionStoppedForDebug:
|
||||
case eExpressionStoppedForDebug:
|
||||
error.SetErrorStringWithFormat("expression stop at entry point for debugging for the expression '%s'", expr_str.c_str());
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ AppleObjCRuntime::GetObjectDescription (Stream &strm, Value &value, ExecutionCon
|
|||
options,
|
||||
error_stream,
|
||||
ret);
|
||||
if (results != eExecutionCompleted)
|
||||
if (results != eExpressionCompleted)
|
||||
{
|
||||
strm.Printf("Error evaluating Print Object function: %d.\n", results);
|
||||
return false;
|
||||
|
|
|
@ -1852,7 +1852,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapDynamic(RemoteNXMapTable &hash_table
|
|||
errors,
|
||||
return_value);
|
||||
|
||||
if (results == eExecutionCompleted)
|
||||
if (results == eExpressionCompleted)
|
||||
{
|
||||
// The result is the number of ClassInfo structures that were filled in
|
||||
uint32_t num_class_infos = return_value.GetScalar().ULong();
|
||||
|
@ -2102,7 +2102,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache()
|
|||
errors,
|
||||
return_value);
|
||||
|
||||
if (results == eExecutionCompleted)
|
||||
if (results == eExpressionCompleted)
|
||||
{
|
||||
// The result is the number of ClassInfo structures that were filled in
|
||||
uint32_t num_class_infos = return_value.GetScalar().ULong();
|
||||
|
|
|
@ -121,7 +121,7 @@ lldb_private::InferiorCallMmap (Process *process,
|
|||
call_plan_sp,
|
||||
options,
|
||||
error_strm);
|
||||
if (result == eExecutionCompleted)
|
||||
if (result == eExpressionCompleted)
|
||||
{
|
||||
|
||||
allocated_addr = call_plan_sp->GetReturnValueObject()->GetValueAsUnsigned(LLDB_INVALID_ADDRESS);
|
||||
|
@ -206,7 +206,7 @@ lldb_private::InferiorCallMunmap (Process *process,
|
|||
call_plan_sp,
|
||||
options,
|
||||
error_strm);
|
||||
if (result == eExecutionCompleted)
|
||||
if (result == eExpressionCompleted)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ lldb_private::InferiorCall (Process *process,
|
|||
call_plan_sp,
|
||||
options,
|
||||
error_strm);
|
||||
if (result == eExecutionCompleted)
|
||||
if (result == eExpressionCompleted)
|
||||
{
|
||||
returned_func = call_plan_sp->GetReturnValueObject()->GetValueAsUnsigned(LLDB_INVALID_ADDRESS);
|
||||
|
||||
|
|
|
@ -366,7 +366,7 @@ AppleGetItemInfoHandler::GetItemInfo (Thread &thread, uint64_t item, addr_t page
|
|||
ExpressionResults func_call_ret;
|
||||
Value results;
|
||||
func_call_ret = m_get_item_info_function->ExecuteFunction (exe_ctx, &args_addr, options, errors, results);
|
||||
if (func_call_ret != eExecutionCompleted || !error.Success())
|
||||
if (func_call_ret != eExpressionCompleted || !error.Success())
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("Unable to call __introspection_dispatch_queue_item_get_info(), got ExpressionResults %d, error contains %s", func_call_ret, error.AsCString(""));
|
||||
|
|
|
@ -371,7 +371,7 @@ AppleGetPendingItemsHandler::GetPendingItems (Thread &thread, addr_t queue, addr
|
|||
ExpressionResults func_call_ret;
|
||||
Value results;
|
||||
func_call_ret = m_get_pending_items_function->ExecuteFunction (exe_ctx, &args_addr, options, errors, results);
|
||||
if (func_call_ret != eExecutionCompleted || !error.Success())
|
||||
if (func_call_ret != eExpressionCompleted || !error.Success())
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("Unable to call __introspection_dispatch_queue_get_pending_items(), got ExpressionResults %d, error contains %s", func_call_ret, error.AsCString(""));
|
||||
|
|
|
@ -370,7 +370,7 @@ AppleGetQueuesHandler::GetCurrentQueues (Thread &thread, addr_t page_to_free, ui
|
|||
ExpressionResults func_call_ret;
|
||||
Value results;
|
||||
func_call_ret = m_get_queues_function->ExecuteFunction (exe_ctx, &args_addr, options, errors, results);
|
||||
if (func_call_ret != eExecutionCompleted || !error.Success())
|
||||
if (func_call_ret != eExpressionCompleted || !error.Success())
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("Unable to call introspection_get_dispatch_queues(), got ExpressionResults %d, error contains %s", func_call_ret, error.AsCString(""));
|
||||
|
|
|
@ -369,7 +369,7 @@ AppleGetThreadItemInfoHandler::GetThreadItemInfo (Thread &thread, tid_t thread_i
|
|||
ExpressionResults func_call_ret;
|
||||
Value results;
|
||||
func_call_ret = m_get_thread_item_info_function->ExecuteFunction (exe_ctx, &args_addr, options, errors, results);
|
||||
if (func_call_ret != eExecutionCompleted || !error.Success())
|
||||
if (func_call_ret != eExpressionCompleted || !error.Success())
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("Unable to call __introspection_dispatch_thread_get_item_info(), got ExpressionResults %d, error contains %s", func_call_ret, error.AsCString(""));
|
||||
|
|
|
@ -5043,31 +5043,31 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
const EvaluateExpressionOptions &options,
|
||||
Stream &errors)
|
||||
{
|
||||
ExpressionResults return_value = eExecutionSetupError;
|
||||
ExpressionResults return_value = eExpressionSetupError;
|
||||
|
||||
if (thread_plan_sp.get() == NULL)
|
||||
{
|
||||
errors.Printf("RunThreadPlan called with empty thread plan.");
|
||||
return eExecutionSetupError;
|
||||
return eExpressionSetupError;
|
||||
}
|
||||
|
||||
if (!thread_plan_sp->ValidatePlan(NULL))
|
||||
{
|
||||
errors.Printf ("RunThreadPlan called with an invalid thread plan.");
|
||||
return eExecutionSetupError;
|
||||
return eExpressionSetupError;
|
||||
}
|
||||
|
||||
if (exe_ctx.GetProcessPtr() != this)
|
||||
{
|
||||
errors.Printf("RunThreadPlan called on wrong process.");
|
||||
return eExecutionSetupError;
|
||||
return eExpressionSetupError;
|
||||
}
|
||||
|
||||
Thread *thread = exe_ctx.GetThreadPtr();
|
||||
if (thread == NULL)
|
||||
{
|
||||
errors.Printf("RunThreadPlan called with invalid thread.");
|
||||
return eExecutionSetupError;
|
||||
return eExpressionSetupError;
|
||||
}
|
||||
|
||||
// We rely on the thread plan we are running returning "PlanCompleted" if when it successfully completes.
|
||||
|
@ -5080,7 +5080,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
if (m_private_state.GetValue() != eStateStopped)
|
||||
{
|
||||
errors.Printf ("RunThreadPlan called while the private state was not stopped.");
|
||||
return eExecutionSetupError;
|
||||
return eExpressionSetupError;
|
||||
}
|
||||
|
||||
// Save the thread & frame from the exe_ctx for restoration after we run
|
||||
|
@ -5093,7 +5093,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
if (!selected_frame_sp)
|
||||
{
|
||||
errors.Printf("RunThreadPlan called without a selected frame on thread %d", thread_idx_id);
|
||||
return eExecutionSetupError;
|
||||
return eExpressionSetupError;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5158,7 +5158,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
// is only cosmetic, and this functionality is only of use to lldb developers who can
|
||||
// live with not pretty...
|
||||
thread->Flush();
|
||||
return eExecutionStoppedForDebug;
|
||||
return eExpressionStoppedForDebug;
|
||||
}
|
||||
|
||||
Listener listener("lldb.process.listener.run-thread-plan");
|
||||
|
@ -5235,7 +5235,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
if (timeout_usec < option_one_thread_timeout)
|
||||
{
|
||||
errors.Printf("RunThreadPlan called without one thread timeout greater than total timeout");
|
||||
return eExecutionSetupError;
|
||||
return eExpressionSetupError;
|
||||
}
|
||||
computed_one_thread_timeout = option_one_thread_timeout;
|
||||
}
|
||||
|
@ -5267,7 +5267,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
if (other_events != NULL)
|
||||
{
|
||||
errors.Printf("Calling RunThreadPlan with pending events on the queue.");
|
||||
return eExecutionSetupError;
|
||||
return eExpressionSetupError;
|
||||
}
|
||||
|
||||
// We also need to make sure that the next event is delivered. We might be calling a function as part of
|
||||
|
@ -5315,7 +5315,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
errors.Printf("Error resuming inferior the %d time: \"%s\".\n",
|
||||
num_resumes,
|
||||
resume_error.AsCString());
|
||||
return_value = eExecutionSetupError;
|
||||
return_value = eExpressionSetupError;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -5331,7 +5331,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
num_resumes);
|
||||
|
||||
errors.Printf("Didn't get any event after resume %d, exiting.", num_resumes);
|
||||
return_value = eExecutionSetupError;
|
||||
return_value = eExpressionSetupError;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -5363,7 +5363,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
|
||||
errors.Printf("Didn't get running event after initial resume, got %s instead.",
|
||||
StateAsCString(stop_state));
|
||||
return_value = eExecutionSetupError;
|
||||
return_value = eExpressionSetupError;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -5453,7 +5453,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
if (event_sp->GetType() == eBroadcastBitInterrupt)
|
||||
{
|
||||
Halt();
|
||||
return_value = eExecutionInterrupted;
|
||||
return_value = eExpressionInterrupted;
|
||||
errors.Printf ("Execution halted by user interrupt.");
|
||||
if (log)
|
||||
log->Printf ("Process::RunThreadPlan(): Got interrupted by eBroadcastBitInterrupted, exiting.");
|
||||
|
@ -5476,7 +5476,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
// Ooh, our thread has vanished. Unlikely that this was successful execution...
|
||||
if (log)
|
||||
log->Printf ("Process::RunThreadPlan(): execution completed but our thread (index-id=%u) has vanished.", thread_idx_id);
|
||||
return_value = eExecutionInterrupted;
|
||||
return_value = eExpressionInterrupted;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5509,7 +5509,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
// after this point.
|
||||
if (thread_plan_sp)
|
||||
thread_plan_sp->SetPrivate (orig_plan_private);
|
||||
return_value = eExecutionCompleted;
|
||||
return_value = eExpressionCompleted;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5518,7 +5518,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
{
|
||||
if (log)
|
||||
log->Printf ("Process::RunThreadPlan() stopped for breakpoint: %s.", stop_info_sp->GetDescription());
|
||||
return_value = eExecutionHitBreakpoint;
|
||||
return_value = eExpressionHitBreakpoint;
|
||||
if (!options.DoesIgnoreBreakpoints())
|
||||
{
|
||||
event_to_broadcast_sp = event_sp;
|
||||
|
@ -5530,7 +5530,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
log->PutCString ("Process::RunThreadPlan(): thread plan didn't successfully complete.");
|
||||
if (!options.DoesUnwindOnError())
|
||||
event_to_broadcast_sp = event_sp;
|
||||
return_value = eExecutionInterrupted;
|
||||
return_value = eExpressionInterrupted;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5554,7 +5554,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
event_to_broadcast_sp = event_sp;
|
||||
|
||||
errors.Printf ("Execution stopped with unexpected state.\n");
|
||||
return_value = eExecutionInterrupted;
|
||||
return_value = eExpressionInterrupted;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -5568,7 +5568,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
{
|
||||
if (log)
|
||||
log->PutCString ("Process::RunThreadPlan(): got_event was true, but the event pointer was null. How odd...");
|
||||
return_value = eExecutionInterrupted;
|
||||
return_value = eExpressionInterrupted;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -5656,7 +5656,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
if (log)
|
||||
log->PutCString ("Process::RunThreadPlan(): Even though we timed out, the call plan was done. "
|
||||
"Exiting wait loop.");
|
||||
return_value = eExecutionCompleted;
|
||||
return_value = eExpressionCompleted;
|
||||
back_to_top = false;
|
||||
break;
|
||||
}
|
||||
|
@ -5675,7 +5675,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
{
|
||||
if (log)
|
||||
log->PutCString ("Process::RunThreadPlan(): try_all_threads was false, we stopped so now we're quitting.");
|
||||
return_value = eExecutionInterrupted;
|
||||
return_value = eExpressionInterrupted;
|
||||
back_to_top = false;
|
||||
break;
|
||||
}
|
||||
|
@ -5696,7 +5696,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
// Running all threads failed, so return Interrupted.
|
||||
if (log)
|
||||
log->PutCString("Process::RunThreadPlan(): running all threads timed out.");
|
||||
return_value = eExecutionInterrupted;
|
||||
return_value = eExpressionInterrupted;
|
||||
back_to_top = false;
|
||||
break;
|
||||
}
|
||||
|
@ -5706,7 +5706,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
{ if (log)
|
||||
log->PutCString("Process::RunThreadPlan(): halt said it succeeded, but I got no event. "
|
||||
"I'm getting out of here passing Interrupted.");
|
||||
return_value = eExecutionInterrupted;
|
||||
return_value = eExpressionInterrupted;
|
||||
back_to_top = false;
|
||||
break;
|
||||
}
|
||||
|
@ -5744,17 +5744,17 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
// 1) The execution successfully completed
|
||||
// 2) We hit a breakpoint, and ignore_breakpoints was true
|
||||
// 3) We got some other error, and discard_on_error was true
|
||||
bool should_unwind = (return_value == eExecutionInterrupted && options.DoesUnwindOnError())
|
||||
|| (return_value == eExecutionHitBreakpoint && options.DoesIgnoreBreakpoints());
|
||||
bool should_unwind = (return_value == eExpressionInterrupted && options.DoesUnwindOnError())
|
||||
|| (return_value == eExpressionHitBreakpoint && options.DoesIgnoreBreakpoints());
|
||||
|
||||
if (return_value == eExecutionCompleted
|
||||
if (return_value == eExpressionCompleted
|
||||
|| should_unwind)
|
||||
{
|
||||
thread_plan_sp->RestoreThreadState();
|
||||
}
|
||||
|
||||
// Now do some processing on the results of the run:
|
||||
if (return_value == eExecutionInterrupted || return_value == eExecutionHitBreakpoint)
|
||||
if (return_value == eExpressionInterrupted || return_value == eExpressionHitBreakpoint)
|
||||
{
|
||||
if (log)
|
||||
{
|
||||
|
@ -5862,7 +5862,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
static_cast<void*>(thread_plan_sp.get()));
|
||||
}
|
||||
}
|
||||
else if (return_value == eExecutionSetupError)
|
||||
else if (return_value == eExpressionSetupError)
|
||||
{
|
||||
if (log)
|
||||
log->PutCString("Process::RunThreadPlan(): execution set up error.");
|
||||
|
@ -5879,13 +5879,13 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
{
|
||||
if (log)
|
||||
log->PutCString("Process::RunThreadPlan(): thread plan is done");
|
||||
return_value = eExecutionCompleted;
|
||||
return_value = eExpressionCompleted;
|
||||
}
|
||||
else if (thread->WasThreadPlanDiscarded (thread_plan_sp.get()))
|
||||
{
|
||||
if (log)
|
||||
log->PutCString("Process::RunThreadPlan(): thread plan was discarded");
|
||||
return_value = eExecutionDiscarded;
|
||||
return_value = eExpressionDiscarded;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5945,32 +5945,32 @@ Process::ExecutionResultAsCString (ExpressionResults result)
|
|||
|
||||
switch (result)
|
||||
{
|
||||
case eExecutionCompleted:
|
||||
result_name = "eExecutionCompleted";
|
||||
case eExpressionCompleted:
|
||||
result_name = "eExpressionCompleted";
|
||||
break;
|
||||
case eExecutionDiscarded:
|
||||
result_name = "eExecutionDiscarded";
|
||||
case eExpressionDiscarded:
|
||||
result_name = "eExpressionDiscarded";
|
||||
break;
|
||||
case eExecutionInterrupted:
|
||||
result_name = "eExecutionInterrupted";
|
||||
case eExpressionInterrupted:
|
||||
result_name = "eExpressionInterrupted";
|
||||
break;
|
||||
case eExecutionHitBreakpoint:
|
||||
result_name = "eExecutionHitBreakpoint";
|
||||
case eExpressionHitBreakpoint:
|
||||
result_name = "eExpressionHitBreakpoint";
|
||||
break;
|
||||
case eExecutionSetupError:
|
||||
result_name = "eExecutionSetupError";
|
||||
case eExpressionSetupError:
|
||||
result_name = "eExpressionSetupError";
|
||||
break;
|
||||
case eExecutionParseError:
|
||||
result_name = "eExecutionParseError";
|
||||
case eExpressionParseError:
|
||||
result_name = "eExpressionParseError";
|
||||
break;
|
||||
case eExecutionResultUnavailable:
|
||||
result_name = "eExecutionResultUnavailable";
|
||||
case eExpressionResultUnavailable:
|
||||
result_name = "eExpressionResultUnavailable";
|
||||
break;
|
||||
case eExecutionTimedOut:
|
||||
result_name = "eExecutionTimedOut";
|
||||
case eExpressionTimedOut:
|
||||
result_name = "eExpressionTimedOut";
|
||||
break;
|
||||
case eExecutionStoppedForDebug:
|
||||
result_name = "eExecutionStoppedForDebug";
|
||||
case eExpressionStoppedForDebug:
|
||||
result_name = "eExpressionStoppedForDebug";
|
||||
break;
|
||||
}
|
||||
return result_name;
|
||||
|
|
|
@ -720,7 +720,7 @@ protected:
|
|||
NULL,
|
||||
result_value_sp,
|
||||
error);
|
||||
if (result_code == eExecutionCompleted)
|
||||
if (result_code == eExpressionCompleted)
|
||||
{
|
||||
if (result_value_sp)
|
||||
{
|
||||
|
|
|
@ -1866,7 +1866,7 @@ Target::EvaluateExpression
|
|||
{
|
||||
result_valobj_sp.reset();
|
||||
|
||||
ExpressionResults execution_results = eExecutionSetupError;
|
||||
ExpressionResults execution_results = eExpressionSetupError;
|
||||
|
||||
if (expr_cstr == NULL || expr_cstr[0] == '\0')
|
||||
return execution_results;
|
||||
|
@ -1901,7 +1901,7 @@ Target::EvaluateExpression
|
|||
if (persistent_var_sp)
|
||||
{
|
||||
result_valobj_sp = persistent_var_sp->GetValueObject ();
|
||||
execution_results = eExecutionCompleted;
|
||||
execution_results = eExpressionCompleted;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue