Changeset View
Changeset View
Standalone View
Standalone View
lldb/source/Target/ThreadPlanCallFunction.cpp
Show First 20 Lines • Show All 261 Lines • ▼ Show 20 Lines | else | ||||
stop_reason = m_real_stop_info_sp->GetStopReason(); | stop_reason = m_real_stop_info_sp->GetStopReason(); | ||||
LLDB_LOG(log, | LLDB_LOG(log, | ||||
"ThreadPlanCallFunction::PlanExplainsStop: Got stop reason - {0}.", | "ThreadPlanCallFunction::PlanExplainsStop: Got stop reason - {0}.", | ||||
Thread::StopReasonAsString(stop_reason)); | Thread::StopReasonAsString(stop_reason)); | ||||
if (stop_reason == eStopReasonBreakpoint && BreakpointsExplainStop()) | if (stop_reason == eStopReasonBreakpoint && BreakpointsExplainStop()) | ||||
return true; | return true; | ||||
if (stop_reason == eStopReasonFork || stop_reason == eStopReasonVFork || | |||||
stop_reason == eStopReasonVForkDone) { | |||||
LLDB_LOGF(log, "ThreadPlanCallFunction::PlanExplainsStop not done for fork stop reasons."); | |||||
jingham: This is a bit silly, but "not done" sounds more to me like you didn't do PlanExplainsStop… | |||||
return false; | |||||
} | |||||
// One more quirk here. If this event was from Halt interrupting the target, | // One more quirk here. If this event was from Halt interrupting the target, | ||||
// then we should not consider ourselves complete. Return true to | // then we should not consider ourselves complete. Return true to | ||||
// acknowledge the stop. | // acknowledge the stop. | ||||
if (Process::ProcessEventData::GetInterruptedFromEvent(event_ptr)) { | if (Process::ProcessEventData::GetInterruptedFromEvent(event_ptr)) { | ||||
LLDB_LOGF(log, "ThreadPlanCallFunction::PlanExplainsStop: The event is an " | LLDB_LOGF(log, "ThreadPlanCallFunction::PlanExplainsStop: The event is an " | ||||
"Interrupt, returning true."); | "Interrupt, returning true."); | ||||
return true; | return true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | void ThreadPlanCallFunction::DidPush() { | ||||
// Now set the thread state to "no reason" so we don't run with whatever | // Now set the thread state to "no reason" so we don't run with whatever | ||||
// signal was outstanding... Wait till the plan is pushed so we aren't | // signal was outstanding... Wait till the plan is pushed so we aren't | ||||
// changing the stop info till we're about to run. | // changing the stop info till we're about to run. | ||||
GetThread().SetStopInfoToNothing(); | GetThread().SetStopInfoToNothing(); | ||||
#ifndef SINGLE_STEP_EXPRESSIONS | #ifndef SINGLE_STEP_EXPRESSIONS | ||||
Thread &thread = GetThread(); | Thread &thread = GetThread(); | ||||
m_subplan_sp = std::make_shared<ThreadPlanRunToAddress>(thread, m_start_addr, | m_subplan_sp = std::make_shared<ThreadPlanRunToAddress>(thread, m_start_addr, | ||||
yinghuitanUnsubmitted Not Done ReplyInline ActionsUndo this accidental change? yinghuitan: Undo this accidental change? | |||||
m_stop_other_threads); | m_stop_other_threads); | ||||
thread.QueueThreadPlan(m_subplan_sp, false); | thread.QueueThreadPlan(m_subplan_sp, false); | ||||
m_subplan_sp->SetPrivate(true); | m_subplan_sp->SetPrivate(true); | ||||
#endif | #endif | ||||
} | } | ||||
bool ThreadPlanCallFunction::WillStop() { return true; } | bool ThreadPlanCallFunction::WillStop() { return true; } | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |
This is a bit silly, but "not done" sounds more to me like you didn't do PlanExplainsStop - which isn't true and would be weird - than that it is returning false. Maybe just "returning false for fork stop reasons" would be better.