Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 1 | //===-- ThreadPlanStepUntil.cpp ---------------------------------*- C++ -*-===// |
| 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 8 | |
Eugene Zelenko | e65b2cf | 2015-12-15 01:33:19 +0000 | [diff] [blame] | 9 | #include "lldb/Target/ThreadPlanStepUntil.h" |
Zachary Turner | 2f3df61 | 2017-04-06 21:28:29 +0000 | [diff] [blame] | 10 | |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 11 | #include "lldb/Breakpoint/Breakpoint.h" |
Zachary Turner | 2f3df61 | 2017-04-06 21:28:29 +0000 | [diff] [blame] | 12 | #include "lldb/Symbol/SymbolContextScope.h" |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 13 | #include "lldb/Target/Process.h" |
| 14 | #include "lldb/Target/RegisterContext.h" |
Greg Clayton | f4b47e1 | 2010-08-04 01:40:35 +0000 | [diff] [blame] | 15 | #include "lldb/Target/StopInfo.h" |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 16 | #include "lldb/Target/Target.h" |
Zachary Turner | 6f9e690 | 2017-03-03 20:56:28 +0000 | [diff] [blame] | 17 | #include "lldb/Utility/Log.h" |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 18 | |
| 19 | using namespace lldb; |
| 20 | using namespace lldb_private; |
| 21 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 22 | // ThreadPlanStepUntil: Run until we reach a given line number or step out of |
| 23 | // the current frame |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 24 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 25 | ThreadPlanStepUntil::ThreadPlanStepUntil(Thread &thread, |
| 26 | lldb::addr_t *address_list, |
| 27 | size_t num_addresses, bool stop_others, |
| 28 | uint32_t frame_idx) |
| 29 | : ThreadPlan(ThreadPlan::eKindStepUntil, "Step until", thread, |
| 30 | eVoteNoOpinion, eVoteNoOpinion), |
| 31 | m_step_from_insn(LLDB_INVALID_ADDRESS), |
| 32 | m_return_bp_id(LLDB_INVALID_BREAK_ID), |
| 33 | m_return_addr(LLDB_INVALID_ADDRESS), m_stepped_out(false), |
| 34 | m_should_stop(false), m_ran_analyze(false), m_explains_stop(false), |
| 35 | m_until_points(), m_stop_others(stop_others) { |
| 36 | // Stash away our "until" addresses: |
| 37 | TargetSP target_sp(m_thread.CalculateTarget()); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 38 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 39 | StackFrameSP frame_sp(m_thread.GetStackFrameAtIndex(frame_idx)); |
| 40 | if (frame_sp) { |
| 41 | m_step_from_insn = frame_sp->GetStackID().GetPC(); |
| 42 | lldb::user_id_t thread_id = m_thread.GetID(); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 43 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 44 | // Find the return address and set a breakpoint there: |
| 45 | // FIXME - can we do this more securely if we know first_insn? |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 46 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 47 | StackFrameSP return_frame_sp(m_thread.GetStackFrameAtIndex(frame_idx + 1)); |
| 48 | if (return_frame_sp) { |
| 49 | // TODO: add inline functionality |
| 50 | m_return_addr = return_frame_sp->GetStackID().GetPC(); |
| 51 | Breakpoint *return_bp = |
| 52 | target_sp->CreateBreakpoint(m_return_addr, true, false).get(); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 53 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 54 | if (return_bp != nullptr) { |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 55 | if (return_bp->IsHardware() && !return_bp->HasResolvedLocations()) |
| 56 | m_could_not_resolve_hw_bp = true; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 57 | return_bp->SetThreadID(thread_id); |
| 58 | m_return_bp_id = return_bp->GetID(); |
| 59 | return_bp->SetBreakpointKind("until-return-backstop"); |
| 60 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 61 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 62 | |
| 63 | m_stack_id = frame_sp->GetStackID(); |
| 64 | |
| 65 | // Now set breakpoints on all our return addresses: |
| 66 | for (size_t i = 0; i < num_addresses; i++) { |
| 67 | Breakpoint *until_bp = |
| 68 | target_sp->CreateBreakpoint(address_list[i], true, false).get(); |
| 69 | if (until_bp != nullptr) { |
| 70 | until_bp->SetThreadID(thread_id); |
| 71 | m_until_points[address_list[i]] = until_bp->GetID(); |
| 72 | until_bp->SetBreakpointKind("until-target"); |
| 73 | } else { |
| 74 | m_until_points[address_list[i]] = LLDB_INVALID_BREAK_ID; |
| 75 | } |
| 76 | } |
| 77 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 78 | } |
| 79 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 80 | ThreadPlanStepUntil::~ThreadPlanStepUntil() { Clear(); } |
| 81 | |
| 82 | void ThreadPlanStepUntil::Clear() { |
| 83 | TargetSP target_sp(m_thread.CalculateTarget()); |
| 84 | if (target_sp) { |
| 85 | if (m_return_bp_id != LLDB_INVALID_BREAK_ID) { |
| 86 | target_sp->RemoveBreakpointByID(m_return_bp_id); |
| 87 | m_return_bp_id = LLDB_INVALID_BREAK_ID; |
| 88 | } |
| 89 | |
| 90 | until_collection::iterator pos, end = m_until_points.end(); |
| 91 | for (pos = m_until_points.begin(); pos != end; pos++) { |
| 92 | target_sp->RemoveBreakpointByID((*pos).second); |
| 93 | } |
| 94 | } |
| 95 | m_until_points.clear(); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 96 | m_could_not_resolve_hw_bp = false; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 97 | } |
| 98 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 99 | void ThreadPlanStepUntil::GetDescription(Stream *s, |
| 100 | lldb::DescriptionLevel level) { |
| 101 | if (level == lldb::eDescriptionLevelBrief) { |
| 102 | s->Printf("step until"); |
| 103 | if (m_stepped_out) |
| 104 | s->Printf(" - stepped out"); |
| 105 | } else { |
| 106 | if (m_until_points.size() == 1) |
| 107 | s->Printf("Stepping from address 0x%" PRIx64 " until we reach 0x%" PRIx64 |
| 108 | " using breakpoint %d", |
| 109 | (uint64_t)m_step_from_insn, |
| 110 | (uint64_t)(*m_until_points.begin()).first, |
| 111 | (*m_until_points.begin()).second); |
| 112 | else { |
| 113 | until_collection::iterator pos, end = m_until_points.end(); |
| 114 | s->Printf("Stepping from address 0x%" PRIx64 " until we reach one of:", |
| 115 | (uint64_t)m_step_from_insn); |
| 116 | for (pos = m_until_points.begin(); pos != end; pos++) { |
| 117 | s->Printf("\n\t0x%" PRIx64 " (bp: %d)", (uint64_t)(*pos).first, |
| 118 | (*pos).second); |
| 119 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 120 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 121 | s->Printf(" stepped out address is 0x%" PRIx64 ".", |
| 122 | (uint64_t)m_return_addr); |
| 123 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 124 | } |
| 125 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 126 | bool ThreadPlanStepUntil::ValidatePlan(Stream *error) { |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 127 | if (m_could_not_resolve_hw_bp) { |
| 128 | if (error) |
| 129 | error->PutCString( |
| 130 | "Could not create hardware breakpoint for thread plan."); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 131 | return false; |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 132 | } else if (m_return_bp_id == LLDB_INVALID_BREAK_ID) { |
| 133 | if (error) |
| 134 | error->PutCString("Could not create return breakpoint."); |
| 135 | return false; |
| 136 | } else { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 137 | until_collection::iterator pos, end = m_until_points.end(); |
| 138 | for (pos = m_until_points.begin(); pos != end; pos++) { |
| 139 | if (!LLDB_BREAK_ID_IS_VALID((*pos).second)) |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 140 | return false; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 141 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 142 | return true; |
| 143 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 144 | } |
| 145 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 146 | void ThreadPlanStepUntil::AnalyzeStop() { |
| 147 | if (m_ran_analyze) |
| 148 | return; |
| 149 | |
| 150 | StopInfoSP stop_info_sp = GetPrivateStopInfo(); |
| 151 | m_should_stop = true; |
| 152 | m_explains_stop = false; |
| 153 | |
| 154 | if (stop_info_sp) { |
| 155 | StopReason reason = stop_info_sp->GetStopReason(); |
| 156 | |
| 157 | if (reason == eStopReasonBreakpoint) { |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 158 | // If this is OUR breakpoint, we're fine, otherwise we don't know why |
| 159 | // this happened... |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 160 | BreakpointSiteSP this_site = |
| 161 | m_thread.GetProcess()->GetBreakpointSiteList().FindByID( |
| 162 | stop_info_sp->GetValue()); |
| 163 | if (!this_site) { |
| 164 | m_explains_stop = false; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 165 | return; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 166 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 167 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 168 | if (this_site->IsBreakpointAtThisSite(m_return_bp_id)) { |
| 169 | // If we are at our "step out" breakpoint, and the stack depth has |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 170 | // shrunk, then this is indeed our stop. If the stack depth has grown, |
| 171 | // then we've hit our step out breakpoint recursively. If we are the |
| 172 | // only breakpoint at that location, then we do explain the stop, and |
| 173 | // we'll just continue. If there was another breakpoint here, then we |
| 174 | // don't explain the stop, but we won't mark ourselves Completed, |
| 175 | // because maybe that breakpoint will continue, and then we'll finish |
| 176 | // the "until". |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 177 | bool done; |
| 178 | StackID cur_frame_zero_id; |
Jim Ingham | 9b03fa0 | 2015-07-23 19:55:02 +0000 | [diff] [blame] | 179 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 180 | done = (m_stack_id < cur_frame_zero_id); |
Jim Ingham | 9b03fa0 | 2015-07-23 19:55:02 +0000 | [diff] [blame] | 181 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 182 | if (done) { |
| 183 | m_stepped_out = true; |
| 184 | SetPlanComplete(); |
| 185 | } else |
| 186 | m_should_stop = false; |
Jim Ingham | 9b03fa0 | 2015-07-23 19:55:02 +0000 | [diff] [blame] | 187 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 188 | if (this_site->GetNumberOfOwners() == 1) |
| 189 | m_explains_stop = true; |
Jim Ingham | 9b03fa0 | 2015-07-23 19:55:02 +0000 | [diff] [blame] | 190 | else |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 191 | m_explains_stop = false; |
| 192 | return; |
| 193 | } else { |
| 194 | // Check if we've hit one of our "until" breakpoints. |
Greg Clayton | 1ac04c3 | 2012-02-21 00:09:25 +0000 | [diff] [blame] | 195 | until_collection::iterator pos, end = m_until_points.end(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 196 | for (pos = m_until_points.begin(); pos != end; pos++) { |
| 197 | if (this_site->IsBreakpointAtThisSite((*pos).second)) { |
| 198 | // If we're at the right stack depth, then we're done. |
| 199 | |
| 200 | bool done; |
| 201 | StackID frame_zero_id = |
| 202 | m_thread.GetStackFrameAtIndex(0)->GetStackID(); |
| 203 | |
| 204 | if (frame_zero_id == m_stack_id) |
| 205 | done = true; |
| 206 | else if (frame_zero_id < m_stack_id) |
| 207 | done = false; |
| 208 | else { |
| 209 | StackFrameSP older_frame_sp = m_thread.GetStackFrameAtIndex(1); |
| 210 | |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 211 | // But if we can't even unwind one frame we should just get out |
| 212 | // of here & stop... |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 213 | if (older_frame_sp) { |
| 214 | const SymbolContext &older_context = |
| 215 | older_frame_sp->GetSymbolContext(eSymbolContextEverything); |
| 216 | SymbolContext stack_context; |
| 217 | m_stack_id.GetSymbolContextScope()->CalculateSymbolContext( |
| 218 | &stack_context); |
| 219 | |
| 220 | done = (older_context == stack_context); |
| 221 | } else |
| 222 | done = false; |
| 223 | } |
| 224 | |
| 225 | if (done) |
| 226 | SetPlanComplete(); |
| 227 | else |
| 228 | m_should_stop = false; |
| 229 | |
| 230 | // Otherwise we've hit this breakpoint recursively. If we're the |
| 231 | // only breakpoint here, then we do explain the stop, and we'll |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 232 | // continue. If not then we should let higher plans handle this |
| 233 | // stop. |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 234 | if (this_site->GetNumberOfOwners() == 1) |
| 235 | m_explains_stop = true; |
| 236 | else { |
| 237 | m_should_stop = true; |
| 238 | m_explains_stop = false; |
| 239 | } |
| 240 | return; |
| 241 | } |
Greg Clayton | 1ac04c3 | 2012-02-21 00:09:25 +0000 | [diff] [blame] | 242 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 243 | } |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 244 | // If we get here we haven't hit any of our breakpoints, so let the |
| 245 | // higher plans take care of the stop. |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 246 | m_explains_stop = false; |
| 247 | return; |
| 248 | } else if (IsUsuallyUnexplainedStopReason(reason)) { |
| 249 | m_explains_stop = false; |
| 250 | } else { |
| 251 | m_explains_stop = true; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 252 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 253 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 254 | } |
| 255 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 256 | bool ThreadPlanStepUntil::DoPlanExplainsStop(Event *event_ptr) { |
| 257 | // We don't explain signals or breakpoints (breakpoints that handle stepping |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 258 | // in or out will be handled by a child plan. |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 259 | AnalyzeStop(); |
| 260 | return m_explains_stop; |
| 261 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 262 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 263 | bool ThreadPlanStepUntil::ShouldStop(Event *event_ptr) { |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 264 | // If we've told our self in ExplainsStop that we plan to continue, then do |
| 265 | // so here. Otherwise, as long as this thread has stopped for a reason, we |
| 266 | // will stop. |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 267 | |
| 268 | StopInfoSP stop_info_sp = GetPrivateStopInfo(); |
| 269 | if (!stop_info_sp || stop_info_sp->GetStopReason() == eStopReasonNone) |
| 270 | return false; |
| 271 | |
| 272 | AnalyzeStop(); |
| 273 | return m_should_stop; |
| 274 | } |
| 275 | |
| 276 | bool ThreadPlanStepUntil::StopOthers() { return m_stop_others; } |
| 277 | |
| 278 | StateType ThreadPlanStepUntil::GetPlanRunState() { return eStateRunning; } |
| 279 | |
| 280 | bool ThreadPlanStepUntil::DoWillResume(StateType resume_state, |
| 281 | bool current_plan) { |
| 282 | if (current_plan) { |
| 283 | TargetSP target_sp(m_thread.CalculateTarget()); |
| 284 | if (target_sp) { |
| 285 | Breakpoint *return_bp = |
| 286 | target_sp->GetBreakpointByID(m_return_bp_id).get(); |
| 287 | if (return_bp != nullptr) |
| 288 | return_bp->SetEnabled(true); |
| 289 | |
| 290 | until_collection::iterator pos, end = m_until_points.end(); |
| 291 | for (pos = m_until_points.begin(); pos != end; pos++) { |
| 292 | Breakpoint *until_bp = |
| 293 | target_sp->GetBreakpointByID((*pos).second).get(); |
| 294 | if (until_bp != nullptr) |
| 295 | until_bp->SetEnabled(true); |
| 296 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 297 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 298 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 299 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 300 | m_should_stop = true; |
| 301 | m_ran_analyze = false; |
| 302 | m_explains_stop = false; |
| 303 | return true; |
| 304 | } |
| 305 | |
| 306 | bool ThreadPlanStepUntil::WillStop() { |
| 307 | TargetSP target_sp(m_thread.CalculateTarget()); |
| 308 | if (target_sp) { |
| 309 | Breakpoint *return_bp = target_sp->GetBreakpointByID(m_return_bp_id).get(); |
| 310 | if (return_bp != nullptr) |
| 311 | return_bp->SetEnabled(false); |
| 312 | |
| 313 | until_collection::iterator pos, end = m_until_points.end(); |
| 314 | for (pos = m_until_points.begin(); pos != end; pos++) { |
| 315 | Breakpoint *until_bp = target_sp->GetBreakpointByID((*pos).second).get(); |
| 316 | if (until_bp != nullptr) |
| 317 | until_bp->SetEnabled(false); |
| 318 | } |
| 319 | } |
| 320 | return true; |
| 321 | } |
| 322 | |
| 323 | bool ThreadPlanStepUntil::MischiefManaged() { |
| 324 | // I'm letting "PlanExplainsStop" do all the work, and just reporting that |
| 325 | // here. |
| 326 | bool done = false; |
| 327 | if (IsPlanComplete()) { |
| 328 | Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP)); |
Jonas Devlieghere | 63e5fb7 | 2019-07-24 17:56:10 +0000 | [diff] [blame] | 329 | LLDB_LOGF(log, "Completed step until plan."); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 330 | |
| 331 | Clear(); |
| 332 | done = true; |
| 333 | } |
| 334 | if (done) |
| 335 | ThreadPlan::MischiefManaged(); |
| 336 | |
| 337 | return done; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 338 | } |