If a hand-called function is interrupted by hitting a breakpoint, then
when you continue to finish off the function call, the expression result will be included as part of the thread stop info. llvm-svn: 212506
This commit is contained in:
@@ -56,7 +56,54 @@ ThreadPlanCallUserExpression::~ThreadPlanCallUserExpression ()
|
||||
void
|
||||
ThreadPlanCallUserExpression::GetDescription (Stream *s, lldb::DescriptionLevel level)
|
||||
{
|
||||
ThreadPlanCallFunction::GetDescription (s, level);
|
||||
if (level == eDescriptionLevelBrief)
|
||||
s->Printf("User Expression thread plan");
|
||||
else
|
||||
ThreadPlanCallFunction::GetDescription (s, level);
|
||||
}
|
||||
|
||||
void
|
||||
ThreadPlanCallUserExpression::WillPop ()
|
||||
{
|
||||
ThreadPlanCallFunction::WillPop();
|
||||
if (m_user_expression_sp)
|
||||
m_user_expression_sp.reset();
|
||||
}
|
||||
|
||||
bool
|
||||
ThreadPlanCallUserExpression::MischiefManaged ()
|
||||
{
|
||||
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
|
||||
|
||||
if (IsPlanComplete())
|
||||
{
|
||||
if (log)
|
||||
log->Printf("ThreadPlanCallFunction(%p): Completed call function plan.",
|
||||
static_cast<void*>(this));
|
||||
|
||||
if (m_manage_materialization && PlanSucceeded() && m_user_expression_sp)
|
||||
{
|
||||
lldb::addr_t function_stack_top;
|
||||
lldb::addr_t function_stack_bottom;
|
||||
lldb::addr_t function_stack_pointer = GetFunctionStackPointer();
|
||||
|
||||
function_stack_bottom = function_stack_pointer - Host::GetPageSize();
|
||||
function_stack_top = function_stack_pointer;
|
||||
|
||||
StreamString error_stream;
|
||||
|
||||
ExecutionContext exe_ctx(GetThread());
|
||||
|
||||
m_user_expression_sp->FinalizeJITExecution(error_stream, exe_ctx, m_result_var_sp, function_stack_bottom, function_stack_top);
|
||||
}
|
||||
|
||||
ThreadPlan::MischiefManaged ();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
StopInfoSP
|
||||
|
||||
Reference in New Issue
Block a user