File indexing completed on 2026-05-10 08:42:56
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_TARGET_THREADPLANSTEPINRANGE_H
0010 #define LLDB_TARGET_THREADPLANSTEPINRANGE_H
0011
0012 #include "lldb/Core/AddressRange.h"
0013 #include "lldb/Target/StackID.h"
0014 #include "lldb/Target/Thread.h"
0015 #include "lldb/Target/ThreadPlanShouldStopHere.h"
0016 #include "lldb/Target/ThreadPlanStepRange.h"
0017
0018 namespace lldb_private {
0019
0020 class ThreadPlanStepInRange : public ThreadPlanStepRange,
0021 public ThreadPlanShouldStopHere {
0022 public:
0023 ThreadPlanStepInRange(Thread &thread, const AddressRange &range,
0024 const SymbolContext &addr_context,
0025 const char *step_into_target, lldb::RunMode stop_others,
0026 LazyBool step_in_avoids_code_without_debug_info,
0027 LazyBool step_out_avoids_code_without_debug_info);
0028
0029 ~ThreadPlanStepInRange() override;
0030
0031 void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
0032
0033 bool ShouldStop(Event *event_ptr) override;
0034
0035 void SetAvoidRegexp(const char *name);
0036
0037 static void SetDefaultFlagValue(uint32_t new_value);
0038
0039 bool IsVirtualStep() override;
0040
0041
0042
0043 static uint32_t GetDefaultFlagsValue() {
0044 return s_default_flag_values;
0045 }
0046
0047 protected:
0048 static bool DefaultShouldStopHereCallback(ThreadPlan *current_plan,
0049 Flags &flags,
0050 lldb::FrameComparison operation,
0051 Status &status, void *baton);
0052
0053 bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
0054
0055 bool DoPlanExplainsStop(Event *event_ptr) override;
0056
0057 void SetFlagsToDefault() override {
0058 GetFlags().Set(ThreadPlanStepInRange::s_default_flag_values);
0059 }
0060
0061 void SetCallbacks() {
0062 ThreadPlanShouldStopHere::ThreadPlanShouldStopHereCallbacks callbacks(
0063 ThreadPlanStepInRange::DefaultShouldStopHereCallback, nullptr);
0064 SetShouldStopHereCallbacks(&callbacks, nullptr);
0065 }
0066
0067 bool FrameMatchesAvoidCriteria();
0068
0069 private:
0070 void SetupAvoidNoDebug(LazyBool step_in_avoids_code_without_debug_info,
0071 LazyBool step_out_avoids_code_without_debug_info);
0072
0073
0074
0075 static uint32_t s_default_flag_values;
0076
0077 lldb::ThreadPlanSP m_sub_plan_sp;
0078
0079 std::unique_ptr<RegularExpression> m_avoid_regexp_up;
0080 bool m_step_past_prologue;
0081
0082
0083 LazyBool m_virtual_step;
0084
0085 ConstString m_step_into_target;
0086 ThreadPlanStepInRange(const ThreadPlanStepInRange &) = delete;
0087 const ThreadPlanStepInRange &
0088 operator=(const ThreadPlanStepInRange &) = delete;
0089 };
0090
0091 }
0092
0093 #endif