1 //===-- ThreadPlanStepThrough.h ---------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_ThreadPlanStepThrough_h_
10 #define liblldb_ThreadPlanStepThrough_h_
12 #include "lldb/Target/Thread.h"
13 #include "lldb/Target/ThreadPlan.h"
15 namespace lldb_private {
17 class ThreadPlanStepThrough : public ThreadPlan {
19 ~ThreadPlanStepThrough() override;
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;
31 bool DoPlanExplainsStop(Event *event_ptr) override;
32 bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
34 ThreadPlanStepThrough(Thread &thread, StackID &return_stack_id,
37 void LookForPlanToStepThroughFromCurrentPC();
39 bool HitOurBackstopBreakpoint();
42 friend lldb::ThreadPlanSP
43 Thread::QueueThreadPlanForStepThrough(StackID &return_stack_id,
44 bool abort_other_plans,
45 bool stop_others, Status &status);
47 void ClearBackstopBreakpoint();
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;
56 DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepThrough);
59 } // namespace lldb_private
61 #endif // liblldb_ThreadPlanStepThrough_h_