1 //===-- ThreadPlanStepUntil.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_ThreadPlanStepUntil_h_
10 #define liblldb_ThreadPlanStepUntil_h_
12 #include "lldb/Target/Thread.h"
13 #include "lldb/Target/ThreadPlan.h"
15 namespace lldb_private {
17 class ThreadPlanStepUntil : public ThreadPlan {
19 ~ThreadPlanStepUntil() 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;
30 bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
31 bool DoPlanExplainsStop(Event *event_ptr) override;
33 ThreadPlanStepUntil(Thread &thread, lldb::addr_t *address_list,
34 size_t num_addresses, bool stop_others,
35 uint32_t frame_idx = 0);
41 lldb::addr_t m_step_from_insn;
42 lldb::break_id_t m_return_bp_id;
43 lldb::addr_t m_return_addr;
49 typedef std::map<lldb::addr_t, lldb::break_id_t> until_collection;
50 until_collection m_until_points;
55 friend lldb::ThreadPlanSP Thread::QueueThreadPlanForStepUntil(
56 bool abort_other_plans, lldb::addr_t *address_list, size_t num_addresses,
57 bool stop_others, uint32_t frame_idx, Status &status);
59 // Need an appropriate marker for the current stack so we can tell step out
62 DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepUntil);
65 } // namespace lldb_private
67 #endif // liblldb_ThreadPlanStepUntil_h_