LLDB mainline
ThreadPlanStepOut.h
Go to the documentation of this file.
1//===-- ThreadPlanStepOut.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_THREADPLANSTEPOUT_H
10#define LLDB_TARGET_THREADPLANSTEPOUT_H
11
12#include "lldb/Target/Thread.h"
15
16namespace lldb_private {
17
19public:
20 ThreadPlanStepOut(Thread &thread, SymbolContext *addr_context,
21 bool first_insn, bool stop_others, Vote report_stop_vote,
22 Vote report_run_vote, uint32_t frame_idx,
23 LazyBool step_out_avoids_code_without_debug_info,
24 bool continue_to_next_branch = false,
25 bool gather_return_value = true);
26
27 ~ThreadPlanStepOut() override;
28
29 void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
30 bool ValidatePlan(Stream *error) override;
31 bool ShouldStop(Event *event_ptr) override;
32 bool StopOthers() override;
33 void SetStopOthers(bool new_value) override { m_stop_others = new_value; }
35 bool WillStop() override;
36 bool MischiefManaged() override;
37 void DidPush() override;
38 bool IsPlanStale() override;
39
41 return m_return_valobj_sp;
42 }
43
44protected:
45 void SetFlagsToDefault() override {
47 }
48
49 bool DoPlanExplainsStop(Event *event_ptr) override;
50 bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
51 bool QueueInlinedStepPlan(bool queue_now);
52
53private:
54 static uint32_t s_default_flag_values; // These are the default flag values
55 // for the ThreadPlanStepThrough.
56
64 // out to the real function
65 // containing
66 // an inlined frame so we can then step out of that.
68 // the inlined frame(s).
69 lldb::ThreadPlanSP m_step_out_further_plan_sp; // This plan keeps stepping out
70 // if ShouldStopHere told us
71 // to.
73 std::vector<lldb::StackFrameSP> m_stepped_past_frames;
77
79 bool abort_other_plans, SymbolContext *addr_context, bool first_insn,
80 bool stop_others, Vote report_stop_vote, Vote report_run_vote,
81 uint32_t frame_idx, Status &status,
82 LazyBool step_out_avoids_code_without_debug_info);
83
84 void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info);
85 // Need an appropriate marker for the current stack so we can tell step out
86 // from step in.
87
89
92};
93
94} // namespace lldb_private
95
96#endif // LLDB_TARGET_THREADPLANSTEPOUT_H
static llvm::raw_ostream & error(Stream &strm)
ValueType Set(ValueType mask)
Set one or more flags by logical OR'ing mask with the current flags.
Definition: Flags.h:73
A class that describes a function.
Definition: Function.h:399
An error handling class.
Definition: Status.h:44
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
Defines a symbol context baton that can be handed other debug core functions.
Definition: SymbolContext.h:34
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
lldb::ValueObjectSP m_return_valobj_sp
std::vector< lldb::StackFrameSP > m_stepped_past_frames
lldb::ValueObjectSP GetReturnValueObject() override
bool QueueInlinedStepPlan(bool queue_now)
ThreadPlanStepOut(const ThreadPlanStepOut &)=delete
const ThreadPlanStepOut & operator=(const ThreadPlanStepOut &)=delete
lldb::StateType GetPlanRunState() override
lldb::ThreadPlanSP m_step_out_further_plan_sp
void SetStopOthers(bool new_value) override
bool DoWillResume(lldb::StateType resume_state, bool current_plan) override
void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info)
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
bool DoPlanExplainsStop(Event *event_ptr) override
lldb::ThreadPlanSP m_step_through_inline_plan_sp
bool ShouldStop(Event *event_ptr) override
lldb::ThreadPlanSP m_step_out_to_inline_plan_sp
virtual lldb::ThreadPlanSP QueueThreadPlanForStepOut(bool abort_other_plans, SymbolContext *addr_context, bool first_insn, bool stop_other_threads, Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, Status &status, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate)
Queue the plan used to step out of the function at the current PC of thread.
Definition: Thread.cpp:1321
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ThreadPlan > ThreadPlanSP
Definition: lldb-forward.h:449
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Definition: lldb-forward.h:480
StateType
Process and Thread States.
int32_t break_id_t
Definition: lldb-types.h:86
uint64_t addr_t
Definition: lldb-types.h:80