Make sure that if a CallFunction thread plan crashes while running in the "run to address" mode, and it

is an auto-discard thread plan, the plan stack unwinds properly.

llvm-svn: 124306
This commit is contained in:
Jim Ingham 2011-01-26 19:13:09 +00:00
parent 4bf570d618
commit 2c36439cb0
1 changed files with 5 additions and 1 deletions

View File

@ -149,6 +149,7 @@ ThreadPlanCallFunction::DoTakedown ()
ClearBreakpoints();
if (log && log->GetVerbose())
ReportRegisterState ("Restoring thread state after function call. Restored register state:");
}
else
{
@ -236,7 +237,10 @@ ThreadPlanCallFunction::PlanExplainsStop ()
else
{
// If the subplan is running, any crashes are attributable to us.
return (m_subplan_sp.get() != NULL);
// If we want to discard the plan, then we say we explain the stop
// but if we are going to be discarded, let whoever is above us
// explain the stop.
return ((m_subplan_sp.get() != NULL) && !OkayToDiscard());
}
}