1 //===-- ThreadPlanStepOverRange.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 LLDB_TARGET_THREADPLANSTEPOVERRANGE_H 10 #define LLDB_TARGET_THREADPLANSTEPOVERRANGE_H 11 12 #include "lldb/Core/AddressRange.h" 13 #include "lldb/Target/StackID.h" 14 #include "lldb/Target/Thread.h" 15 #include "lldb/Target/ThreadPlanStepRange.h" 16 #include "lldb/Target/TimeoutResumeAll.h" 17 18 namespace lldb_private { 19 20 class ThreadPlanStepOverRange : public ThreadPlanStepRange, 21 ThreadPlanShouldStopHere, 22 TimeoutResumeAll { 23 public: 24 ThreadPlanStepOverRange(Thread &thread, const AddressRange &range, 25 const SymbolContext &addr_context, 26 lldb::RunMode stop_others, 27 LazyBool step_out_avoids_no_debug); 28 29 ~ThreadPlanStepOverRange() override; 30 31 void GetDescription(Stream *s, lldb::DescriptionLevel level) override; 32 void SetStopOthers(bool new_value) override; 33 bool ShouldStop(Event *event_ptr) override; 34 void DidPush() override; 35 36 protected: 37 bool DoPlanExplainsStop(Event *event_ptr) override; 38 bool DoWillResume(lldb::StateType resume_state, bool current_plan) override; 39 40 void SetFlagsToDefault() override { 41 GetFlags().Set(ThreadPlanStepOverRange::s_default_flag_values); 42 } 43 44 private: 45 static uint32_t s_default_flag_values; 46 47 void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info); 48 bool IsEquivalentContext(const SymbolContext &context); 49 50 bool m_first_resume; 51 lldb::RunMode m_run_mode; 52 53 ThreadPlanStepOverRange(const ThreadPlanStepOverRange &) = delete; 54 const ThreadPlanStepOverRange & 55 operator=(const ThreadPlanStepOverRange &) = delete; 56 }; 57 58 } // namespace lldb_private 59 60 #endif // LLDB_TARGET_THREADPLANSTEPOVERRANGE_H 61