mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 12:25:46 +08:00
Fixed a problem where stepping out would turn into
a continue if the unwinder didn't unwind correctly. <rdar://problem/11989668> llvm-svn: 161086
This commit is contained in:
@@ -975,8 +975,16 @@ Thread::QueueThreadPlanForStepOut
|
||||
stop_vote,
|
||||
run_vote,
|
||||
frame_idx));
|
||||
QueueThreadPlan (thread_plan_sp, abort_other_plans);
|
||||
return thread_plan_sp.get();
|
||||
|
||||
if (thread_plan_sp->ValidatePlan(NULL))
|
||||
{
|
||||
QueueThreadPlan (thread_plan_sp, abort_other_plans);
|
||||
return thread_plan_sp.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
ThreadPlan *
|
||||
|
||||
@@ -95,6 +95,10 @@ ThreadPlanStepOut::ThreadPlanStepOut
|
||||
// FIXME - can we do this more securely if we know first_insn?
|
||||
|
||||
m_return_addr = return_frame_sp->GetFrameCodeAddress().GetLoadAddress(&m_thread.GetProcess()->GetTarget());
|
||||
|
||||
if (m_return_addr == LLDB_INVALID_ADDRESS)
|
||||
return;
|
||||
|
||||
Breakpoint *return_bp = m_thread.CalculateTarget()->CreateBreakpoint (m_return_addr, true).get();
|
||||
if (return_bp != NULL)
|
||||
{
|
||||
@@ -157,7 +161,8 @@ ThreadPlanStepOut::ValidatePlan (Stream *error)
|
||||
return m_step_through_inline_plan_sp->ValidatePlan (error);
|
||||
else if (m_return_bp_id == LLDB_INVALID_BREAK_ID)
|
||||
{
|
||||
error->PutCString("Could not create return address breakpoint.");
|
||||
if (error)
|
||||
error->PutCString("Could not create return address breakpoint.");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user