blob: 86f7798487c305be1fc275acba8602a28dcbc4b7 [file] [log] [blame]
Andrew Walbran3d2c1972020-04-07 12:24:26 +01001//===-- ThreadPlanStepOverBreakpoint.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
Olivier Deprezf4ef2d02021-04-20 13:36:24 +02009#ifndef LLDB_TARGET_THREADPLANSTEPOVERBREAKPOINT_H
10#define LLDB_TARGET_THREADPLANSTEPOVERBREAKPOINT_H
Andrew Walbran3d2c1972020-04-07 12:24:26 +010011
12#include "lldb/Target/Thread.h"
13#include "lldb/Target/ThreadPlan.h"
14
15namespace lldb_private {
16
17class ThreadPlanStepOverBreakpoint : public ThreadPlan {
18public:
19 ThreadPlanStepOverBreakpoint(Thread &thread);
20
21 ~ThreadPlanStepOverBreakpoint() override;
22
23 void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
24 bool ValidatePlan(Stream *error) override;
25 bool ShouldStop(Event *event_ptr) override;
26 bool StopOthers() override;
27 lldb::StateType GetPlanRunState() override;
28 bool WillStop() override;
29 void WillPop() override;
30 bool MischiefManaged() override;
31 void ThreadDestroyed() override;
32 void SetAutoContinue(bool do_it);
33 bool ShouldAutoContinue(Event *event_ptr) override;
34 bool IsPlanStale() override;
35
36 lldb::addr_t GetBreakpointLoadAddress() const { return m_breakpoint_addr; }
37
38protected:
39 bool DoPlanExplainsStop(Event *event_ptr) override;
40 bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
41
42 void ReenableBreakpointSite();
43
44private:
45 lldb::addr_t m_breakpoint_addr;
46 lldb::user_id_t m_breakpoint_site_id;
47 bool m_auto_continue;
48 bool m_reenabled_breakpoint_site;
49
Olivier Deprezf4ef2d02021-04-20 13:36:24 +020050 ThreadPlanStepOverBreakpoint(const ThreadPlanStepOverBreakpoint &) = delete;
51 const ThreadPlanStepOverBreakpoint &
52 operator=(const ThreadPlanStepOverBreakpoint &) = delete;
Andrew Walbran3d2c1972020-04-07 12:24:26 +010053};
54
55} // namespace lldb_private
56
Olivier Deprezf4ef2d02021-04-20 13:36:24 +020057#endif // LLDB_TARGET_THREADPLANSTEPOVERBREAKPOINT_H