36 LazyBool step_out_avoids_code_without_debug_info)
38 "Step range stepping over", thread, range,
39 addr_context, stop_others),
41 m_first_resume(true), m_run_mode(stop_others) {
50 auto PrintFailureIfAny = [&]() {
62 s->
Printf(
"Stepping over");
63 bool printed_line_info =
false;
67 printed_line_info =
true;
71 s->
Printf(
" using ranges: ");
81 LazyBool step_out_avoids_code_without_debug_info) {
82 bool avoid_nodebug =
true;
83 switch (step_out_avoids_code_without_debug_info) {
88 avoid_nodebug =
false;
141 GetTarget().GetArchitecture().GetAddressByteSize());
152 LLDB_LOGF(log,
"ThreadPlanStepOverRange compare frame result: %d.",
168 if (new_plan_sp && log)
170 "Thought I stepped out, but in fact arrived at a trampoline.");
174 for (uint32_t i = 1;; ++i) {
176 if (!older_frame_sp) {
183 older_frame_sp->GetSymbolContext(eSymbolContextEverything);
231 sc = frame_sp->GetSymbolContext(eSymbolContextEverything);
241 Address cur_address = frame_sp->GetFrameCodeAddress();
247 bool step_past_remaining_inline =
false;
266 Block *inlined_block =
274 step_past_remaining_inline =
true;
281 if (step_past_remaining_inline) {
282 uint32_t look_ahead_step = 1;
284 entry_idx + look_ahead_step, next_line_entry)) {
297 const bool abort_other_plans =
false;
298 const RunMode stop_other_threads = RunMode::eAllThreads;
300 ->GetRegisterContext()
308 abort_other_plans, step_range, sc, stop_other_threads,
337 new_plan_sp->SetPrivate(
true);
369 StopReason reason = stop_info_sp->GetStopReason();
377 log->
PutCString(
"ThreadPlanStepOverRange got asked if it explains the "
378 "stop for some reason other than step.");
379 return_value =
false;
397 if (in_inlined_stack) {
400 "ThreadPlanStepInRange::DoWillResume: adjusting range to "
401 "the frame at inlined depth %d.",
405 Block *frame_block = stack_sp->GetFrameBlock();
420 name =
"<unknown-notinlined>";
423 "Stepping over inlined function \"%s\" in inlined stack: ",
#define LLDB_LOGF(log,...)
A section + offset based address range class.
Address & GetBaseAddress()
Get accessor for the base address of the range.
bool ContainsFileAddress(const Address &so_addr) const
Check if a section offset address is contained in this range.
A section + offset based address class.
lldb::addr_t GetLoadAddress(Target *target) const
Get the load address.
uint32_t CalculateSymbolContext(SymbolContext *sc, lldb::SymbolContextItem resolve_scope=lldb::eSymbolContextEverything) const
Reconstruct a symbol context from an address.
Function * CalculateSymbolContextFunction() const
A class that describes a single lexical block.
Block * GetContainingInlinedBlock()
Get the inlined block that contains this block.
const InlineFunctionInfo * GetInlinedFunctionInfo() const
Get const accessor for any inlined function information.
bool GetRangeContainingAddress(const Address &addr, AddressRange &range)
bool GetRangeContainingLoadAddress(lldb::addr_t load_addr, Target &target, AddressRange &range)
LineTable * GetLineTable()
Get the line table for the compile unit.
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
ValueType Clear(ValueType mask=~static_cast< ValueType >(0))
Clear one or more flags.
ValueType Set(ValueType mask)
Set one or more flags by logical OR'ing mask with the current flags.
A class that describes a function.
A class that describes information for an inlined function.
ConstString GetName() const
bool FindLineEntryByAddress(const Address &so_addr, LineEntry &line_entry, uint32_t *index_ptr=nullptr)
Find a line entry that contains the section offset address so_addr.
bool GetLineEntryAtIndex(uint32_t idx, LineEntry &line_entry)
Get the line entry from the line table at index idx.
void PutCString(const char *cstr)
void PutString(llvm::StringRef str)
Target & GetTarget()
Get the target object pointer for this module.
const char * AsCString(const char *default_error_str="unknown error") const
Get the error string associated with the current error.
bool Success() const
Test for success condition.
const char * GetData() const
llvm::StringRef GetString() const
A stream class that can stream formatted output to a file.
llvm::raw_ostream & AsRawOstream()
Returns a raw_ostream that forwards the data to this Stream object.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
@ eEqualFileSpecAndChecksumIfSet
Defines a symbol context baton that can be handed other debug core functions.
Function * function
The Function for a given query.
Block * block
The Block for a given query.
CompileUnit * comp_unit
The CompileUnit for a given query.
Symbol * symbol
The Symbol for a given query.
LineEntry line_entry
The LineEntry for a given query.
lldb_private::Flags & GetFlags()
lldb::ThreadPlanSP CheckShouldStopHereAndQueueStepOut(lldb::FrameComparison operation, Status &status)
static uint32_t s_default_flag_values
bool DoPlanExplainsStop(Event *event_ptr) override
bool ShouldStop(Event *event_ptr) override
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
ThreadPlanStepOverRange(Thread &thread, const AddressRange &range, const SymbolContext &addr_context, lldb::RunMode stop_others, LazyBool step_out_avoids_no_debug)
void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info)
bool IsEquivalentContext(const SymbolContext &context)
void SetFlagsToDefault() override
bool DoWillResume(lldb::StateType resume_state, bool current_plan) override
~ThreadPlanStepOverRange() override
void SetStopOthers(bool new_value) override
bool NextRangeBreakpointExplainsStop(lldb::StopInfoSP stop_info_sp)
void DumpRanges(Stream *s)
lldb::BreakpointSP m_next_branch_bp_sp
SymbolContext m_addr_context
lldb::FrameComparison CompareCurrentFrameToStartFrame()
bool SetNextBranchBreakpoint()
lldb::RunMode m_stop_others
void ClearNextBranchBreakpointExplainedStop()
void ClearNextBranchBreakpoint()
std::vector< AddressRange > m_address_ranges
void SetPlanComplete(bool success=true)
Thread & GetThread()
Returns the Thread that is using this thread plan.
lldb::StopInfoSP GetPrivateStopInfo()
bool GetStepOutAvoidsNoDebug() const
bool DecrementCurrentInlinedDepth()
virtual lldb::StackFrameSP GetStackFrameAtIndex(uint32_t idx)
virtual lldb::RegisterContextSP GetRegisterContext()=0
virtual lldb::ThreadPlanSP QueueThreadPlanForStepThrough(StackID &return_stack_id, bool abort_other_plans, bool stop_other_threads, Status &status)
Gets the plan used to step through the code that steps from a function call site at the current PC in...
virtual lldb::ThreadPlanSP QueueThreadPlanForStepOutNoShouldStop(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, bool continue_to_next_branch=false)
Queue the plan used to step out of the function at the current PC of a thread.
uint32_t GetCurrentInlinedDepth()
virtual lldb::ThreadPlanSP QueueThreadPlanForStepOverRange(bool abort_other_plans, const AddressRange &range, const SymbolContext &addr_context, lldb::RunMode stop_other_threads, Status &status, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate)
Queues the plan used to step through an address range, stepping over function calls.
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.
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.
std::shared_ptr< lldb_private::ThreadPlan > ThreadPlanSP
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
@ eDescriptionLevelVerbose
FrameComparison
This is the return value for frame comparisons.
StateType
Process and Thread States.
@ eStateSuspended
Process or thread is in a suspended state as far as the debugger is concerned while other processes o...
@ eStateStepping
Process or thread is in the process of stepping and can not be examined.
std::shared_ptr< lldb_private::StopInfo > StopInfoSP
StopReason
Thread stop reasons.
A line table entry class.
lldb::SupportFileSP original_file_sp
The original source file, from debug info.
bool IsValid() const
Check if a line entry object is valid.
AddressRange range
The section offset address range for this line entry.
bool DumpStopContext(Stream *s, bool show_fullpaths) const
Dumps information specific to a process that stops at this line entry to the supplied stream s.