LLDB mainline
ThreadPlanRunToBreakpoint.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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_THREADPLANRUNTOBREAKPOINT_H
10#define LLDB_TARGET_THREADPLANRUNTOBREAKPOINT_H
11
12#include <vector>
13
15#include "lldb/lldb-private.h"
16
17namespace lldb_private {
18
19// This plan runs till it hits one of the breakpoints passed in.
20// It takes ownership of the breakpoint, and will delete it when
21// the plan is complete.
22// ThreadPlanRunToAddress is more effient if you know the target address up
23// front. Use this one when the function you want to stop at might be realized
24// in the course of the thread plan operation, so you need a breakpoint that
25// can update itself.
26
28public:
30 bool stop_others);
31
33 const std::vector<lldb::BreakpointSP> &breakpoints,
34 bool stop_others);
35
37
38 void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
39
40 bool ValidatePlan(Stream *error) override;
41
42 bool ShouldStop(Event *event_ptr) override;
43
44 bool StopOthers() override;
45
46 void SetStopOthers(bool new_value) override;
47
49
50 bool WillStop() override;
51
52 bool MischiefManaged() override;
53
54protected:
55 bool DoPlanExplainsStop(Event *event_ptr) override;
56
57 bool AtOurBreakpoint();
58
59private:
61 std::vector<lldb::BreakpointSP>
62 m_breakpoints; // This is the list of breakpoints we are going to run to.
63
67};
68
69} // namespace lldb_private
70
71#endif // LLDB_TARGET_THREADPLANRUNTOBREAKPOINT_H
static llvm::raw_ostream & error(Stream &strm)
A stream class that can stream formatted output to a file.
Definition Stream.h:28
ThreadPlanRunToBreakpoint(Thread &thread, const std::vector< lldb::BreakpointSP > &breakpoints, bool stop_others)
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
const ThreadPlanRunToBreakpoint & operator=(const ThreadPlanRunToBreakpoint &)=delete
std::vector< lldb::BreakpointSP > m_breakpoints
bool DoPlanExplainsStop(Event *event_ptr) override
ThreadPlanRunToBreakpoint(Thread &thread, lldb::BreakpointSP breakpoint_sp, bool stop_others)
ThreadPlanRunToBreakpoint(const ThreadPlanRunToBreakpoint &)=delete
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
ThreadPlan(ThreadPlanKind kind, const char *name, Thread &thread, Vote report_stop_vote, Vote report_run_vote)
A class that represents a running process on the host machine.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
StateType
Process and Thread States.
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP