From 2c36439cb0d93bfd23ded7d96fd970c9f9e458bd Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Wed, 26 Jan 2011 19:13:09 +0000 Subject: 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 --- lldb/source/Target/ThreadPlanCallFunction.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lldb/source/Target/ThreadPlanCallFunction.cpp') diff --git a/lldb/source/Target/ThreadPlanCallFunction.cpp b/lldb/source/Target/ThreadPlanCallFunction.cpp index 44f44ed944a..d3b62e6c7aa 100644 --- a/lldb/source/Target/ThreadPlanCallFunction.cpp +++ b/lldb/source/Target/ThreadPlanCallFunction.cpp @@ -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()); } } -- cgit v1.2.3