27 llvm::ArrayRef<addr_t> address_list,
28 bool stop_others, uint32_t frame_idx)
34 m_should_stop(false), m_ran_analyze(false), m_explains_stop(false),
35 m_until_points(), m_stop_others(stop_others) {
36 StackFrameSP frame_sp(thread.GetStackFrameAtIndex(frame_idx));
40 m_step_from_insn = frame_sp->GetStackID().GetPC();
41 Target &target = GetTarget();
46 StackFrameSP return_frame_sp(thread.GetStackFrameAtIndex(frame_idx + 1));
47 if (return_frame_sp) {
49 m_return_addr = return_frame_sp->GetStackID().GetPC();
53 if (return_bp !=
nullptr) {
55 m_could_not_resolve_hw_bp =
true;
57 m_return_bp_id = return_bp->
GetID();
62 m_stack_id = frame_sp->GetStackID();
64 for (
addr_t address : address_list) {
66 if (until_bp !=
nullptr) {
68 m_until_points[address] = until_bp->
GetID();
101 s->
Printf(
"Stepping from address 0x%" PRIx64
" until we reach 0x%" PRIx64
102 " using breakpoint %d",
107 s->
Printf(
"Stepping from address 0x%" PRIx64
" until we reach one of:",
110 s->
Printf(
"\n\t0x%" PRIx64
" (bp: %d)", (uint64_t)address, break_id);
119 "Could not create hardware breakpoint for thread plan.");
124 error->PutCString(
"Could not create return breakpoint.");
142 StopReason reason = stop_info_sp->GetStopReason();
148 m_process.GetBreakpointSiteList().FindByID(stop_info_sp->GetValue());
166 done = (
m_stack_id.IsYoungerThan(cur_frame_zero_id));
174 if (this_site->GetNumberOfConstituents() == 1)
183 if (this_site->IsBreakpointAtThisSite((*pos).second)) {
188 thread.GetStackFrameAtIndex(0)->GetStackID();
195 StackFrameSP older_frame_sp = thread.GetStackFrameAtIndex(1);
199 if (older_frame_sp) {
201 older_frame_sp->GetSymbolContext(eSymbolContextEverything);
203 m_stack_id.GetSymbolContextScope()->CalculateSymbolContext(
206 done = (older_context == stack_context);
220 if (this_site->GetNumberOfConstituents() == 1)
270 until_bp_sp->SetEnabled(enabled);
278 if (return_bp !=
nullptr)
292 if (return_bp !=
nullptr)
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOGF(log,...)
General Outline: A breakpoint has four main parts, a filter, a resolver, the list of breakpoint locat...
void SetBreakpointKind(const char *kind)
Set the "kind" description for a breakpoint.
bool HasResolvedLocations() const
Return whether this breakpoint has any resolved locations.
void SetThreadID(lldb::tid_t thread_id)
Set the valid thread to be checked when the breakpoint is hit.
void SetEnabled(bool enable) override
If enable is true, enable the breakpoint, if false disable it.
bool IsYoungerThan(const StackID &other) const
Returns true if this StackID corresponds to a frame younger (i.e.
lldb::break_id_t GetID() const
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
Defines a symbol context baton that can be handed other debug core functions.
lldb::BreakpointSP GetBreakpointByID(lldb::break_id_t break_id)
bool RemoveBreakpointByID(lldb::break_id_t break_id)
lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, const FileSpec &file, uint32_t line_no, uint32_t column, lldb::addr_t offset, LazyBool check_inlines, LazyBool skip_prologue, bool internal, bool request_hardware, LazyBool move_to_nearest_code)
bool DoWillResume(lldb::StateType resume_state, bool current_plan) override
lldb::addr_t m_step_from_insn
bool MischiefManaged() override
lldb::addr_t m_return_addr
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
bool DoPlanExplainsStop(Event *event_ptr) override
until_collection m_until_points
ThreadPlanStepUntil(Thread &thread, llvm::ArrayRef< lldb::addr_t > address_list, bool stop_others, uint32_t frame_idx=0)
bool StopOthers() override
~ThreadPlanStepUntil() override
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
lldb::StateType GetPlanRunState() override
bool ShouldStop(Event *event_ptr) override
lldb::break_id_t m_return_bp_id
void SetUntilPointsEnabled(bool enabled)
bool IsUsuallyUnexplainedStopReason(lldb::StopReason)
void SetPlanComplete(bool success=true)
Thread & GetThread()
Returns the Thread that is using this thread plan.
virtual bool MischiefManaged()
bool m_could_not_resolve_hw_bp
lldb::StopInfoSP GetPrivateStopInfo()
#define LLDB_INVALID_BREAK_ID
#define LLDB_BREAK_ID_IS_VALID(bid)
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::BreakpointSite > BreakpointSiteSP
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
StateType
Process and Thread States.
@ eStateRunning
Process or thread is running and can't be examined.
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP
std::shared_ptr< lldb_private::StopInfo > StopInfoSP
StopReason
Thread stop reasons.