mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 12:25:46 +08:00
Don't cache the public stop reason, since it can change as plan completion gets processed. That means GetStopReason needs to return a shared pointer, not a pointer to the thread's cached version. Also allow the thread plans to get and set the thread private stop reason - that is usually more appropriate for the logic the thread plans need to do.
llvm-svn: 116892
This commit is contained in:
@@ -84,10 +84,10 @@ ThreadPlanStepInstruction::ValidatePlan (Stream *error)
|
||||
bool
|
||||
ThreadPlanStepInstruction::PlanExplainsStop ()
|
||||
{
|
||||
StopInfo *stop_info = m_thread.GetStopInfo();
|
||||
if (stop_info)
|
||||
StopInfoSP stop_info_sp = GetPrivateStopReason();
|
||||
if (stop_info_sp)
|
||||
{
|
||||
StopReason reason = stop_info->GetStopReason();
|
||||
StopReason reason = stop_info_sp->GetStopReason();
|
||||
if (reason == eStopReasonTrace || reason == eStopReasonNone)
|
||||
return true;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user