1//===-- ThreadPlanStepThrough.h ---------------------------------*- C++ -*-===// 2// 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 6// 7//===----------------------------------------------------------------------===// 8 9#ifndef liblldb_ThreadPlanStepThrough_h_ 10#define liblldb_ThreadPlanStepThrough_h_ 11 12#include "lldb/Target/Thread.h" 13#include "lldb/Target/ThreadPlan.h" 14 15namespace lldb_private { 16 17class ThreadPlanStepThrough : public ThreadPlan { 18public: 19 ~ThreadPlanStepThrough() override; 20 21 void GetDescription(Stream *s, lldb::DescriptionLevel level) override; 22 bool ValidatePlan(Stream *error) override; 23 bool ShouldStop(Event *event_ptr) override; 24 bool StopOthers() override; 25 lldb::StateType GetPlanRunState() override; 26 bool WillStop() override; 27 bool MischiefManaged() override; 28 void DidPush() override; 29 30protected: 31 bool DoPlanExplainsStop(Event *event_ptr) override; 32 bool DoWillResume(lldb::StateType resume_state, bool current_plan) override; 33 34 ThreadPlanStepThrough(Thread &thread, StackID &return_stack_id, 35 bool stop_others); 36 37 void LookForPlanToStepThroughFromCurrentPC(); 38 39 bool HitOurBackstopBreakpoint(); 40 41private: 42 friend lldb::ThreadPlanSP 43 Thread::QueueThreadPlanForStepThrough(StackID &return_stack_id, 44 bool abort_other_plans, 45 bool stop_others, Status &status); 46 47 void ClearBackstopBreakpoint(); 48 49 lldb::ThreadPlanSP m_sub_plan_sp; 50 lldb::addr_t m_start_address; 51 lldb::break_id_t m_backstop_bkpt_id; 52 lldb::addr_t m_backstop_addr; 53 StackID m_return_stack_id; 54 bool m_stop_others; 55 56 DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepThrough); 57}; 58 59} // namespace lldb_private 60 61#endif // liblldb_ThreadPlanStepThrough_h_ 62