38 LazyBool step_out_avoids_code_without_debug_info)
40 "Step range stepping over", thread, range,
41 addr_context, stop_others),
52 auto PrintFailureIfAny = [&]() {
65 bool printed_line_info =
false;
69 printed_line_info =
true;
83 LazyBool step_out_avoids_code_without_debug_info) {
84 bool avoid_nodebug =
true;
85 switch (step_out_avoids_code_without_debug_info) {
90 avoid_nodebug =
false;
109 if (std::optional<bool> maybe_equivalent =
111 return *maybe_equivalent;
147 GetTarget().GetArchitecture().GetAddressByteSize());
158 LLDB_LOGF(log,
"ThreadPlanStepOverRange compare frame result: %d.",
171 new_plan_sp = thread.QueueThreadPlanForStepThrough(
m_stack_id,
false,
174 if (new_plan_sp && log)
176 "Thought I stepped out, but in fact arrived at a trampoline.");
180 for (uint32_t i = 1;; ++i) {
181 StackFrameSP older_frame_sp = thread.GetStackFrameAtIndex(i);
182 if (!older_frame_sp) {
189 older_frame_sp->GetSymbolContext(eSymbolContextEverything);
195 new_plan_sp = thread.QueueThreadPlanForStepOutNoShouldStop(
200 new_plan_sp = thread.QueueThreadPlanForStepThrough(
220 new_plan_sp = thread.QueueThreadPlanForStepThrough(
m_stack_id,
false,
237 sc = frame_sp->GetSymbolContext(eSymbolContextEverything);
247 Address cur_address = frame_sp->GetFrameCodeAddress();
253 bool step_past_remaining_inline =
false;
272 Block *inlined_block =
280 step_past_remaining_inline =
true;
287 if (step_past_remaining_inline) {
288 uint32_t look_ahead_step = 1;
290 entry_idx + look_ahead_step, next_line_entry)) {
303 const bool abort_other_plans =
false;
306 ->GetRegisterContext()
313 new_plan_sp = thread.QueueThreadPlanForStepOverRange(
314 abort_other_plans, step_range, sc, stop_other_threads,
343 new_plan_sp->SetPrivate(
true);
375 StopReason reason = stop_info_sp->GetStopReason();
383 log->
PutCString(
"ThreadPlanStepOverRange got asked if it explains the "
384 "stop for some reason other than step.");
385 return_value =
false;
402 bool in_inlined_stack = thread.DecrementCurrentInlinedDepth();
403 if (in_inlined_stack) {
406 "ThreadPlanStepOverRange::DoWillResume: adjusting range to "
407 "the frame at inlined depth %d.",
408 thread.GetCurrentInlinedDepth());
411 Block *frame_block = stack_sp->GetFrameBlock();
412 lldb::addr_t curr_pc = thread.GetRegisterContext()->GetPC();
415 curr_pc,
m_process.GetTarget(), my_range)) {
426 name =
"<unknown-notinlined>";
429 "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)
const char * AsCString(const char *value_if_empty) 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
static Language * FindPlugin(lldb::LanguageType language)
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)
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.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
@ eEqualFileSpecAndChecksumIfSet
Defines a symbol context baton that can be handed other debug core functions.
lldb::LanguageType GetLanguage() const
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.
ThreadPlanShouldStopHere(ThreadPlan *owner)
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()
ThreadPlanStepRange(ThreadPlanKind kind, const char *name, Thread &thread, const AddressRange &range, const SymbolContext &addr_context, lldb::RunMode stop_others, bool given_ranges_only=false)
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
TimeoutResumeAll(Thread &thread)
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.
bool IsValid() const
Check if a line entry object is valid.
AddressRange range
The section offset address range for this line entry.
SupportFileNSP original_file_sp
The original source file, from debug info.