]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/include/lldb/Target/ThreadPlanStepOverRange.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / include / lldb / Target / ThreadPlanStepOverRange.h
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 liblldb_ThreadPlanStepOverRange_h_
10 #define liblldb_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
17 namespace lldb_private {
18
19 class ThreadPlanStepOverRange : public ThreadPlanStepRange,
20                                 ThreadPlanShouldStopHere {
21 public:
22   ThreadPlanStepOverRange(Thread &thread, const AddressRange &range,
23                           const SymbolContext &addr_context,
24                           lldb::RunMode stop_others,
25                           LazyBool step_out_avoids_no_debug);
26
27   ~ThreadPlanStepOverRange() override;
28
29   void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
30   bool ShouldStop(Event *event_ptr) override;
31
32 protected:
33   bool DoPlanExplainsStop(Event *event_ptr) override;
34   bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
35
36   void SetFlagsToDefault() override {
37     GetFlags().Set(ThreadPlanStepOverRange::s_default_flag_values);
38   }
39
40 private:
41   static uint32_t s_default_flag_values;
42
43   void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info);
44   bool IsEquivalentContext(const SymbolContext &context);
45
46   bool m_first_resume;
47
48   DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepOverRange);
49 };
50
51 } // namespace lldb_private
52
53 #endif // liblldb_ThreadPlanStepOverRange_h_