Go to the documentation of this file.
27 ThreadPlanStepThrough::ThreadPlanStepThrough(
Thread &thread,
31 "Step through trampolines and prologues", thread,
35 m_stop_others(stop_others) {
49 if (return_frame_sp) {
50 m_backstop_addr = return_frame_sp->GetFrameCodeAddress().GetLoadAddress(
57 if (return_bp !=
nullptr) {
66 LLDB_LOGF(log,
"Setting backstop breakpoint %d at address: 0x%" PRIx64,
104 LLDB_LOGF(log,
"Found step through plan from 0x%" PRIx64
": %s",
108 "Couldn't find step through plan from address 0x%" PRIx64
".",
117 s->
Printf(
"Step through");
119 s->
PutCString(
"Stepping through trampoline code from: ");
122 s->
Printf(
" with backstop breakpoint ID: %d at address: ",
126 s->
PutCString(
" unable to set a backstop breakpoint.");
134 "Could not create hardware breakpoint for thread plan.");
140 error->PutCString(
"Could not create backstop breakpoint.");
146 error->PutCString(
"Does not have a subplan.");
236 LLDB_LOGF(log,
"Completed step through step plan.");
249 BreakpointSiteSP cur_site_sp =
258 log->
PutCString(
"ThreadPlanStepThrough hit backstop breakpoint.");
bool HasResolvedLocations() const
Return whether this breakpoint has any resolved locations.
Thread & GetThread()
Returns the Thread that is using this thread plan.
lldb::break_id_t GetID() const
StackID m_return_stack_id
virtual lldb::StackFrameSP GetFrameWithStackID(const StackID &stack_id)
void LookForPlanToStepThroughFromCurrentPC()
lldb::ThreadPlanSP m_sub_plan_sp
void SetBreakpointKind(const char *kind)
Set the "kind" description for a breakpoint.
bool ShouldStop(Event *event_ptr) override
#define LLDB_LOGF(log,...)
bool DoWillResume(lldb::StateType resume_state, bool current_plan) override
lldb::TargetSP CalculateTarget() override
BreakpointSiteList & GetBreakpointSiteList()
Target & GetTarget()
Get the target object pointer for this module.
lldb::break_id_t m_backstop_bkpt_id
bool HitOurBackstopBreakpoint()
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)
lldb::ProcessSP GetProcess() const
static llvm::raw_ostream & error(Stream &strm)
virtual bool MischiefManaged()
void ClearBackstopBreakpoint()
void DumpAddress(llvm::raw_ostream &s, uint64_t addr, uint32_t addr_size, const char *prefix=nullptr, const char *suffix=nullptr)
Output an address value to this stream.
const char * GetData() const
lldb::addr_t m_start_address
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
lldb::BreakpointSiteSP FindByID(lldb::break_id_t breakID)
Returns a shared pointer to the breakpoint site with id breakID.
lldb::addr_t m_backstop_addr
void SetThreadID(lldb::tid_t thread_id)
Set the valid thread to be checked when the breakpoint is hit.
std::vector< LanguageRuntime * > GetLanguageRuntimes()
void PushPlan(lldb::ThreadPlanSP &thread_plan_sp)
virtual lldb::ThreadPlanSP GetStepThroughTrampolinePlan(Thread &thread, bool stop_others)=0
Provides a plan to step through the dynamic loader trampoline for the current state of thread.
#define LLDB_INVALID_BREAK_ID
void SetPlanComplete(bool success=true)
lldb::StopInfoSP GetStopInfo()
bool m_could_not_resolve_hw_bp
llvm::raw_ostream & AsRawOstream()
Returns a raw_ostream that forwards the data to this Stream object.
bool RemoveBreakpointByID(lldb::break_id_t break_id)
#define LLDB_INVALID_ADDRESS
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
A class that represents a running process on the host machine.
~ThreadPlanStepThrough() override
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
bool DoPlanExplainsStop(Event *event_ptr) override
StateType
Process and Thread States.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
lldb::StateType GetPlanRunState() override
virtual lldb::StackFrameSP GetStackFrameAtIndex(uint32_t idx)
virtual lldb::RegisterContextSP GetRegisterContext()=0
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
bool MischiefManaged() override
@ eStateRunning
Process or thread is running and can't be examined.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
General Outline: A breakpoint has four main parts, a filter, a resolver, the list of breakpoint locat...
void PutCString(const char *cstr)
bool StopOthers() override