LLDB  mainline
ThreadPlanStepOverRange.cpp
Go to the documentation of this file.
1 //===-- ThreadPlanStepOverRange.cpp ---------------------------------------===//
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 
10 #include "lldb/Symbol/Block.h"
12 #include "lldb/Symbol/Function.h"
13 #include "lldb/Symbol/LineTable.h"
14 #include "lldb/Target/Process.h"
16 #include "lldb/Target/Target.h"
17 #include "lldb/Target/Thread.h"
20 #include "lldb/Utility/Log.h"
21 #include "lldb/Utility/Stream.h"
22 
23 using namespace lldb_private;
24 using namespace lldb;
25 
27 
28 // ThreadPlanStepOverRange: Step through a stack range, either stepping over or
29 // into based on the value of \a type.
30 
32  Thread &thread, const AddressRange &range,
33  const SymbolContext &addr_context, lldb::RunMode stop_others,
34  LazyBool step_out_avoids_code_without_debug_info)
35  : ThreadPlanStepRange(ThreadPlan::eKindStepOverRange,
36  "Step range stepping over", thread, range,
37  addr_context, stop_others),
38  ThreadPlanShouldStopHere(this), m_first_resume(true) {
40  SetupAvoidNoDebug(step_out_avoids_code_without_debug_info);
41 }
42 
44 
46  lldb::DescriptionLevel level) {
47  auto PrintFailureIfAny = [&]() {
48  if (m_status.Success())
49  return;
50  s->Printf(" failed (%s)", m_status.AsCString());
51  };
52 
53  if (level == lldb::eDescriptionLevelBrief) {
54  s->Printf("step over");
55  PrintFailureIfAny();
56  return;
57  }
58 
59  s->Printf("Stepping over");
60  bool printed_line_info = false;
62  s->Printf(" line ");
64  printed_line_info = true;
65  }
66 
67  if (!printed_line_info || level == eDescriptionLevelVerbose) {
68  s->Printf(" using ranges: ");
69  DumpRanges(s);
70  }
71 
72  PrintFailureIfAny();
73 
74  s->PutChar('.');
75 }
76 
78  LazyBool step_out_avoids_code_without_debug_info) {
79  bool avoid_nodebug = true;
80  switch (step_out_avoids_code_without_debug_info) {
81  case eLazyBoolYes:
82  avoid_nodebug = true;
83  break;
84  case eLazyBoolNo:
85  avoid_nodebug = false;
86  break;
87  case eLazyBoolCalculate:
88  avoid_nodebug = GetThread().GetStepOutAvoidsNoDebug();
89  break;
90  }
91  if (avoid_nodebug)
93  else
95  // Step Over plans should always avoid no-debug on step in. Seems like you
96  // shouldn't have to say this, but a tail call looks more like a step in that
97  // a step out, so we want to catch this case.
99 }
100 
102  const SymbolContext &context) {
103  // Match as much as is specified in the m_addr_context: This is a fairly
104  // loose sanity check. Note, sometimes the target doesn't get filled in so I
105  // left out the target check. And sometimes the module comes in as the .o
106  // file from the inlined range, so I left that out too...
108  if (m_addr_context.comp_unit != context.comp_unit)
109  return false;
110  if (m_addr_context.function) {
111  if (m_addr_context.function != context.function)
112  return false;
113  // It is okay to return to a different block of a straight function, we
114  // only have to be more careful if returning from one inlined block to
115  // another.
116  if (m_addr_context.block->GetInlinedFunctionInfo() == nullptr &&
117  context.block->GetInlinedFunctionInfo() == nullptr)
118  return true;
119  return m_addr_context.block == context.block;
120  }
121  }
122  // Fall back to symbol if we have no decision from comp_unit/function/block.
123  return m_addr_context.symbol && m_addr_context.symbol == context.symbol;
124 }
125 
128  Thread &thread = GetThread();
129 
130  if (log) {
131  StreamString s;
132  DumpAddress(s.AsRawOstream(), thread.GetRegisterContext()->GetPC(),
133  GetTarget().GetArchitecture().GetAddressByteSize());
134  LLDB_LOGF(log, "ThreadPlanStepOverRange reached %s.", s.GetData());
135  }
136 
137  // If we're out of the range but in the same frame or in our caller's frame
138  // then we should stop. When stepping out we only stop others if we are
139  // forcing running one thread.
140  bool stop_others = (m_stop_others == lldb::eOnlyThisThread);
141  ThreadPlanSP new_plan_sp;
143 
144  if (frame_order == eFrameCompareOlder) {
145  // If we're in an older frame then we should stop.
146  //
147  // A caveat to this is if we think the frame is older but we're actually in
148  // a trampoline.
149  // I'm going to make the assumption that you wouldn't RETURN to a
150  // trampoline. So if we are in a trampoline we think the frame is older
151  // because the trampoline confused the backtracer. As below, we step
152  // through first, and then try to figure out how to get back out again.
153 
154  new_plan_sp = thread.QueueThreadPlanForStepThrough(m_stack_id, false,
155  stop_others, m_status);
156 
157  if (new_plan_sp && log)
158  LLDB_LOGF(log,
159  "Thought I stepped out, but in fact arrived at a trampoline.");
160  } else if (frame_order == eFrameCompareYounger) {
161  // Make sure we really are in a new frame. Do that by unwinding and seeing
162  // if the start function really is our start function...
163  for (uint32_t i = 1;; ++i) {
164  StackFrameSP older_frame_sp = thread.GetStackFrameAtIndex(i);
165  if (!older_frame_sp) {
166  // We can't unwind the next frame we should just get out of here &
167  // stop...
168  break;
169  }
170 
171  const SymbolContext &older_context =
172  older_frame_sp->GetSymbolContext(eSymbolContextEverything);
173  if (IsEquivalentContext(older_context)) {
174  // If we have the next-branch-breakpoint in the range, we can just
175  // rely on that breakpoint to trigger once we return to the range.
177  return false;
178  new_plan_sp = thread.QueueThreadPlanForStepOutNoShouldStop(
179  false, nullptr, true, stop_others, eVoteNo, eVoteNoOpinion, 0,
180  m_status, true);
181  break;
182  } else {
183  new_plan_sp = thread.QueueThreadPlanForStepThrough(
184  m_stack_id, false, stop_others, m_status);
185  // If we found a way through, then we should stop recursing.
186  if (new_plan_sp)
187  break;
188  }
189  }
190  } else {
191  // If we're still in the range, keep going.
192  if (InRange()) {
194  return false;
195  }
196 
197  if (!InSymbol()) {
198  // This one is a little tricky. Sometimes we may be in a stub or
199  // something similar, in which case we need to get out of there. But if
200  // we are in a stub then it's likely going to be hard to get out from
201  // here. It is probably easiest to step into the stub, and then it will
202  // be straight-forward to step out.
203  new_plan_sp = thread.QueueThreadPlanForStepThrough(m_stack_id, false,
204  stop_others, m_status);
205  } else {
206  // The current clang (at least through 424) doesn't always get the
207  // address range for the DW_TAG_inlined_subroutines right, so that when
208  // you leave the inlined range the line table says you are still in the
209  // source file of the inlining function. This is bad, because now you
210  // are missing the stack frame for the function containing the inlining,
211  // and if you sensibly do "finish" to get out of this function you will
212  // instead exit the containing function. To work around this, we check
213  // whether we are still in the source file we started in, and if not
214  // assume it is an error, and push a plan to get us out of this line and
215  // back to the containing file.
216 
218  SymbolContext sc;
219  StackFrameSP frame_sp = thread.GetStackFrameAtIndex(0);
220  sc = frame_sp->GetSymbolContext(eSymbolContextEverything);
221  if (sc.line_entry.IsValid()) {
222  if (sc.line_entry.original_file !=
226  // Okay, find the next occurrence of this file in the line table:
228  if (line_table) {
229  Address cur_address = frame_sp->GetFrameCodeAddress();
230  uint32_t entry_idx;
231  LineEntry line_entry;
232  if (line_table->FindLineEntryByAddress(cur_address, line_entry,
233  &entry_idx)) {
234  LineEntry next_line_entry;
235  bool step_past_remaining_inline = false;
236  if (entry_idx > 0) {
237  // We require the previous line entry and the current line
238  // entry come from the same file. The other requirement is
239  // that the previous line table entry be part of an inlined
240  // block, we don't want to step past cases where people have
241  // inlined some code fragment by using #include <source-
242  // fragment.c> directly.
243  LineEntry prev_line_entry;
244  if (line_table->GetLineEntryAtIndex(entry_idx - 1,
245  prev_line_entry) &&
246  prev_line_entry.original_file ==
247  line_entry.original_file) {
248  SymbolContext prev_sc;
249  Address prev_address =
250  prev_line_entry.range.GetBaseAddress();
251  prev_address.CalculateSymbolContext(&prev_sc);
252  if (prev_sc.block) {
253  Block *inlined_block =
254  prev_sc.block->GetContainingInlinedBlock();
255  if (inlined_block) {
256  AddressRange inline_range;
257  inlined_block->GetRangeContainingAddress(prev_address,
258  inline_range);
259  if (!inline_range.ContainsFileAddress(cur_address)) {
260 
261  step_past_remaining_inline = true;
262  }
263  }
264  }
265  }
266  }
267 
268  if (step_past_remaining_inline) {
269  uint32_t look_ahead_step = 1;
270  while (line_table->GetLineEntryAtIndex(
271  entry_idx + look_ahead_step, next_line_entry)) {
272  // Make sure we haven't wandered out of the function we
273  // started from...
274  Address next_line_address =
275  next_line_entry.range.GetBaseAddress();
276  Function *next_line_function =
277  next_line_address.CalculateSymbolContextFunction();
278  if (next_line_function != m_addr_context.function)
279  break;
280 
281  if (next_line_entry.original_file ==
283  const bool abort_other_plans = false;
284  const RunMode stop_other_threads = RunMode::eAllThreads;
285  lldb::addr_t cur_pc = thread.GetStackFrameAtIndex(0)
286  ->GetRegisterContext()
287  ->GetPC();
288  AddressRange step_range(
289  cur_pc,
290  next_line_address.GetLoadAddress(&GetTarget()) -
291  cur_pc);
292 
293  new_plan_sp = thread.QueueThreadPlanForStepOverRange(
294  abort_other_plans, step_range, sc, stop_other_threads,
295  m_status);
296  break;
297  }
298  look_ahead_step++;
299  }
300  }
301  }
302  }
303  }
304  }
305  }
306  }
307  }
308 
309  // If we get to this point, we're not going to use a previously set "next
310  // branch" breakpoint, so delete it:
312 
313  // If we haven't figured out something to do yet, then ask the ShouldStopHere
314  // callback:
315  if (!new_plan_sp) {
316  new_plan_sp = CheckShouldStopHereAndQueueStepOut(frame_order, m_status);
317  }
318 
319  if (!new_plan_sp)
320  m_no_more_plans = true;
321  else {
322  // Any new plan will be an implementation plan, so mark it private:
323  new_plan_sp->SetPrivate(true);
324  m_no_more_plans = false;
325  }
326 
327  if (!new_plan_sp) {
328  // For efficiencies sake, we know we're done here so we don't have to do
329  // this calculation again in MischiefManaged.
331  return true;
332  } else
333  return false;
334 }
335 
337  // For crashes, breakpoint hits, signals, etc, let the base plan (or some
338  // plan above us) handle the stop. That way the user can see the stop, step
339  // around, and then when they are done, continue and have their step
340  // complete. The exception is if we've hit our "run to next branch"
341  // breakpoint. Note, unlike the step in range plan, we don't mark ourselves
342  // complete if we hit an unexplained breakpoint/crash.
343 
345  StopInfoSP stop_info_sp = GetPrivateStopInfo();
346  bool return_value;
347 
348  if (stop_info_sp) {
349  StopReason reason = stop_info_sp->GetStopReason();
350 
351  if (reason == eStopReasonTrace) {
352  return_value = true;
353  } else if (reason == eStopReasonBreakpoint) {
354  return_value = NextRangeBreakpointExplainsStop(stop_info_sp);
355  } else {
356  if (log)
357  log->PutCString("ThreadPlanStepInRange got asked if it explains the "
358  "stop for some reason other than step.");
359  return_value = false;
360  }
361  } else
362  return_value = true;
363 
364  return return_value;
365 }
366 
368  bool current_plan) {
369  if (resume_state != eStateSuspended && m_first_resume) {
370  m_first_resume = false;
371  if (resume_state == eStateStepping && current_plan) {
372  Thread &thread = GetThread();
373  // See if we are about to step over an inlined call in the middle of the
374  // inlined stack, if so figure out its extents and reset our range to
375  // step over that.
376  bool in_inlined_stack = thread.DecrementCurrentInlinedDepth();
377  if (in_inlined_stack) {
379  LLDB_LOGF(log,
380  "ThreadPlanStepInRange::DoWillResume: adjusting range to "
381  "the frame at inlined depth %d.",
382  thread.GetCurrentInlinedDepth());
383  StackFrameSP stack_sp = thread.GetStackFrameAtIndex(0);
384  if (stack_sp) {
385  Block *frame_block = stack_sp->GetFrameBlock();
386  lldb::addr_t curr_pc = thread.GetRegisterContext()->GetPC();
387  AddressRange my_range;
388  if (frame_block->GetRangeContainingLoadAddress(
389  curr_pc, m_process.GetTarget(), my_range)) {
390  m_address_ranges.clear();
391  m_address_ranges.push_back(my_range);
392  if (log) {
393  StreamString s;
394  const InlineFunctionInfo *inline_info =
395  frame_block->GetInlinedFunctionInfo();
396  const char *name;
397  if (inline_info)
398  name = inline_info->GetName().AsCString();
399  else
400  name = "<unknown-notinlined>";
401 
402  s.Printf(
403  "Stepping over inlined function \"%s\" in inlined stack: ",
404  name);
405  DumpRanges(&s);
406  log->PutString(s.GetString());
407  }
408  }
409  }
410  }
411  }
412  }
413 
414  return true;
415 }
lldb_private::LineTable::FindLineEntryByAddress
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.
Definition: LineTable.cpp:188
lldb_private::AddressRange::GetBaseAddress
Address & GetBaseAddress()
Get accessor for the base address of the range.
Definition: AddressRange.h:209
Block.h
lldb_private::Block::GetRangeContainingAddress
bool GetRangeContainingAddress(const Address &addr, AddressRange &range)
Definition: Block.cpp:239
lldb_private::SymbolContext::block
Block * block
The Block for a given query.
Definition: SymbolContext.h:321
lldb_private::SymbolContext::comp_unit
CompileUnit * comp_unit
The CompileUnit for a given query.
Definition: SymbolContext.h:319
lldb_private::Thread::GetCurrentInlinedDepth
uint32_t GetCurrentInlinedDepth()
Definition: Thread.h:410
lldb_private::Log::PutString
void PutString(llvm::StringRef str)
Definition: Log.cpp:119
ThreadPlanStepOverRange.h
lldb_private::ThreadPlan::GetThread
Thread & GetThread()
Returns the Thread that is using this thread plan.
Definition: ThreadPlan.cpp:41
lldb::FrameComparison
FrameComparison
This is the return value for frame comparisons.
Definition: lldb-enumerations.h:860
lldb_private::ThreadPlanStepOverRange::SetupAvoidNoDebug
void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info)
Definition: ThreadPlanStepOverRange.cpp:77
lldb_private::LineEntry::DumpStopContext
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.
Definition: LineEntry.cpp:50
lldb_private::Event
Definition: Event.h:180
lldb_private::InlineFunctionInfo
Definition: Function.h:127
CompileUnit.h
lldb_private::LineEntry::IsValid
bool IsValid() const
Check if a line entry object is valid.
Definition: LineEntry.cpp:46
lldb_private::Address::CalculateSymbolContextFunction
Function * CalculateSymbolContextFunction() const
Definition: Address.cpp:848
ThreadPlanStepOut.h
lldb_private::Thread::QueueThreadPlanForStepOverRange
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.
Definition: Thread.cpp:1247
lldb_private::ThreadPlanStepOverRange::ThreadPlanStepOverRange
ThreadPlanStepOverRange(Thread &thread, const AddressRange &range, const SymbolContext &addr_context, lldb::RunMode stop_others, LazyBool step_out_avoids_no_debug)
Definition: ThreadPlanStepOverRange.cpp:31
lldb_private::Thread::QueueThreadPlanForStepOutNoShouldStop
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.
Definition: Thread.cpp:1317
lldb_private::ThreadPlanStepRange::m_addr_context
SymbolContext m_addr_context
Definition: ThreadPlanStepRange.h:65
lldb_private::eLazyBoolYes
@ eLazyBoolYes
Definition: lldb-private-enumerations.h:115
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:249
lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint
bool SetNextBranchBreakpoint()
Definition: ThreadPlanStepRange.cpp:306
lldb_private::ThreadPlanStepRange::m_next_branch_bp_sp
lldb::BreakpointSP m_next_branch_bp_sp
Definition: ThreadPlanStepRange.h:76
lldb_private::Flags::Clear
ValueType Clear(ValueType mask=~static_cast< ValueType >(0))
Clear one or more flags.
Definition: Flags.h:61
lldb_private::LineTable::GetLineEntryAtIndex
bool GetLineEntryAtIndex(uint32_t idx, LineEntry &line_entry)
Get the line entry from the line table at index idx.
Definition: LineTable.cpp:179
lldb_private::Process::GetTarget
Target & GetTarget()
Get the target object pointer for this module.
Definition: Process.h:1214
lldb_private::Thread::DecrementCurrentInlinedDepth
bool DecrementCurrentInlinedDepth()
Definition: Thread.h:406
lldb::StopReason
StopReason
Thread stop reasons.
Definition: lldb-enumerations.h:239
lldb_private::ThreadPlanStepRange
Definition: ThreadPlanStepRange.h:20
lldb_private::ConstString::AsCString
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
Definition: ConstString.h:193
lldb_private::eVoteNoOpinion
@ eVoteNoOpinion
Definition: lldb-private-enumerations.h:59
lldb_private::Stream
Definition: Stream.h:28
lldb_private::ThreadPlanStepRange::NextRangeBreakpointExplainsStop
bool NextRangeBreakpointExplainsStop(lldb::StopInfoSP stop_info_sp)
Definition: ThreadPlanStepRange.cpp:387
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
ThreadPlanStepThrough.h
lldb_private::LazyBool
LazyBool
Definition: lldb-private-enumerations.h:115
lldb::eStopReasonTrace
@ eStopReasonTrace
Definition: lldb-enumerations.h:242
lldb_private::ThreadPlanStepOverRange::SetFlagsToDefault
void SetFlagsToDefault() override
Definition: ThreadPlanStepOverRange.h:36
lldb_private::SymbolContext
Definition: SymbolContext.h:33
lldb_private::StreamString::GetString
llvm::StringRef GetString() const
Definition: StreamString.cpp:51
Process.h
Target.h
lldb_private::ThreadPlanStepOverRange::m_first_resume
bool m_first_resume
Definition: ThreadPlanStepOverRange.h:46
lldb_private::ThreadPlanStepOverRange::DoPlanExplainsStop
bool DoPlanExplainsStop(Event *event_ptr) override
Definition: ThreadPlanStepOverRange.cpp:336
lldb_private::SymbolContext::symbol
Symbol * symbol
The Symbol for a given query.
Definition: SymbolContext.h:323
lldb_private::Status::Success
bool Success() const
Test for success condition.
Definition: Status.cpp:288
lldb_private::LineTable
Definition: LineTable.h:40
lldb_private::Function
Definition: Function.h:413
lldb_private::ThreadPlan::GetTarget
Target & GetTarget()
Definition: ThreadPlan.cpp:37
lldb_private::ThreadPlan
Definition: ThreadPlan.h:282
lldb_private::eVoteNo
@ eVoteNo
Definition: lldb-private-enumerations.h:59
Log.h
lldb_private::ThreadPlanStepRange::m_no_more_plans
bool m_no_more_plans
Definition: ThreadPlanStepRange.h:71
lldb_private::ThreadPlanShouldStopHere::eStepOutAvoidNoDebug
@ eStepOutAvoidNoDebug
Definition: ThreadPlanShouldStopHere.h:62
lldb_private::DumpAddress
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.
Definition: Stream.cpp:81
lldb_private::Thread
Definition: Thread.h:62
lldb_private::StreamString::GetData
const char * GetData() const
Definition: StreamString.h:43
lldb_private::SymbolContext::function
Function * function
The Function for a given query.
Definition: SymbolContext.h:320
lldb_private::ThreadPlanStepOverRange::ShouldStop
bool ShouldStop(Event *event_ptr) override
Definition: ThreadPlanStepOverRange.cpp:126
lldb_private::Thread::QueueThreadPlanForStepThrough
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...
Definition: Thread.cpp:1336
lldb_private::StreamString
Definition: StreamString.h:23
lldb_private::AddressRange
Definition: AddressRange.h:25
lldb_private::ThreadPlanStepOverRange::DoWillResume
bool DoWillResume(lldb::StateType resume_state, bool current_plan) override
Definition: ThreadPlanStepOverRange.cpp:367
lldb_private::GetLogIfAllCategoriesSet
Log * GetLogIfAllCategoriesSet(uint32_t mask)
Definition: Logging.cpp:58
lldb_private::InlineFunctionInfo::GetName
ConstString GetName() const
Definition: Function.cpp:94
lldb_private::ThreadPlanStepRange::ClearNextBranchBreakpoint
void ClearNextBranchBreakpoint()
Definition: ThreadPlanStepRange.cpp:294
lldb_private::ThreadPlanStepOverRange::s_default_flag_values
static uint32_t s_default_flag_values
Definition: ThreadPlanStepOverRange.h:41
lldb::eFrameCompareYounger
@ eFrameCompareYounger
Definition: lldb-enumerations.h:865
lldb_private::ThreadPlanShouldStopHere
Definition: ThreadPlanShouldStopHere.h:34
lldb_private::CompileUnit::GetLineTable
LineTable * GetLineTable()
Get the line table for the compile unit.
Definition: CompileUnit.cpp:161
lldb_private::ThreadProperties::GetStepOutAvoidsNoDebug
bool GetStepOutAvoidsNoDebug() const
Definition: Thread.cpp:137
Thread.h
lldb_private::Stream::PutChar
size_t PutChar(char ch)
Definition: Stream.cpp:104
lldb_private::ThreadPlanStepRange::InSymbol
bool InSymbol()
Definition: ThreadPlanStepRange.cpp:195
lldb_private::ThreadPlanShouldStopHere::GetFlags
lldb_private::Flags & GetFlags()
Definition: ThreadPlanShouldStopHere.h:104
lldb_private::ThreadPlan::m_status
Status m_status
Definition: ThreadPlan.h:522
lldb_private::LineEntry::original_file
FileSpec original_file
The original source file, from debug info.
Definition: LineEntry.h:142
lldb::RunMode
RunMode
Thread Run Modes.
Definition: lldb-enumerations.h:135
lldb_private::AddressRange::ContainsFileAddress
bool ContainsFileAddress(const Address &so_addr) const
Check if a section offset address is contained in this range.
Definition: AddressRange.cpp:71
lldb::eStateStepping
@ eStateStepping
Process or thread is in the process of stepping and can not be examined.
Definition: lldb-enumerations.h:86
lldb::eStateSuspended
@ eStateSuspended
Process or thread is in a suspended state as far as the debugger is concerned while other processes o...
Definition: lldb-enumerations.h:91
lldb_private::ThreadPlan::SetPlanComplete
void SetPlanComplete(bool success=true)
Definition: ThreadPlan.cpp:65
lldb_private::ThreadPlanStepRange::m_stack_id
StackID m_stack_id
Definition: ThreadPlanStepRange.h:68
lldb_private::Block
Definition: Block.h:41
uint32_t
lldb_private::eLazyBoolNo
@ eLazyBoolNo
Definition: lldb-private-enumerations.h:115
lldb_private::Address
Definition: Address.h:59
lldb_private::ThreadPlanStepRange::CompareCurrentFrameToStartFrame
lldb::FrameComparison CompareCurrentFrameToStartFrame()
Definition: ThreadPlanStepRange.cpp:215
lldb_private::ThreadPlanStepRange::DumpRanges
void DumpRanges(Stream *s)
Definition: ThreadPlanStepRange.cpp:88
LineTable.h
lldb_private::ThreadPlanShouldStopHere::eStepInAvoidNoDebug
@ eStepInAvoidNoDebug
Definition: ThreadPlanShouldStopHere.h:61
lldb_private::Address::GetLoadAddress
lldb::addr_t GetLoadAddress(Target *target) const
Get the load address.
Definition: Address.cpp:310
lldb_private::Stream::AsRawOstream
llvm::raw_ostream & AsRawOstream()
Returns a raw_ostream that forwards the data to this Stream object.
Definition: Stream.h:357
lldb_private::LineEntry::range
AddressRange range
The section offset address range for this line entry.
Definition: LineEntry.h:139
lldb::eStopReasonBreakpoint
@ eStopReasonBreakpoint
Definition: lldb-enumerations.h:243
Function.h
lldb_private::Stream::Printf
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition: Stream.cpp:107
lldb_private::Block::GetRangeContainingLoadAddress
bool GetRangeContainingLoadAddress(lldb::addr_t load_addr, Target &target, AddressRange &range)
Definition: Block.cpp:267
lldb_private::ThreadPlanStepRange::m_stop_others
lldb::RunMode m_stop_others
Definition: ThreadPlanStepRange.h:67
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb::eDescriptionLevelVerbose
@ eDescriptionLevelVerbose
Definition: lldb-enumerations.h:210
lldb_private::eLazyBoolCalculate
@ eLazyBoolCalculate
Definition: lldb-private-enumerations.h:115
LIBLLDB_LOG_STEP
#define LIBLLDB_LOG_STEP
Definition: Logging.h:21
lldb_private::Flags::Set
ValueType Set(ValueType mask)
Set one or more flags by logical OR'ing mask with the current flags.
Definition: Flags.h:73
lldb::eAllThreads
@ eAllThreads
Definition: lldb-enumerations.h:135
lldb_private::ThreadPlanStepRange::m_address_ranges
std::vector< AddressRange > m_address_ranges
Definition: ThreadPlanStepRange.h:66
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:73
Stream.h
lldb_private::Log
Definition: Log.h:49
lldb_private::Block::GetInlinedFunctionInfo
const InlineFunctionInfo * GetInlinedFunctionInfo() const
Get const accessor for any inlined function information.
Definition: Block.h:276
lldb_private::ThreadPlanStepOverRange::GetDescription
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
Definition: ThreadPlanStepOverRange.cpp:45
lldb_private::Thread::GetStackFrameAtIndex
virtual lldb::StackFrameSP GetStackFrameAtIndex(uint32_t idx)
Definition: Thread.h:399
lldb_private::ThreadPlanStepOverRange::~ThreadPlanStepOverRange
~ThreadPlanStepOverRange() override
lldb_private::ThreadPlanStepRange::InRange
bool InRange()
Definition: ThreadPlanStepRange.cpp:100
lldb_private::SymbolContext::line_entry
LineEntry line_entry
The LineEntry for a given query.
Definition: SymbolContext.h:322
lldb_private::ThreadPlan::GetPrivateStopInfo
lldb::StopInfoSP GetPrivateStopInfo()
Definition: ThreadPlan.h:510
lldb_private::Thread::GetRegisterContext
virtual lldb::RegisterContextSP GetRegisterContext()=0
lldb_private::ThreadPlan::m_process
Process & m_process
Definition: ThreadPlan.h:523
lldb_private::ThreadPlanStepOverRange::IsEquivalentContext
bool IsEquivalentContext(const SymbolContext &context)
Definition: ThreadPlanStepOverRange.cpp:101
lldb
Definition: SBAddress.h:15
RegisterContext.h
lldb_private::ThreadPlanShouldStopHere::CheckShouldStopHereAndQueueStepOut
lldb::ThreadPlanSP CheckShouldStopHereAndQueueStepOut(lldb::FrameComparison operation, Status &status)
Definition: ThreadPlanShouldStopHere.cpp:154
lldb_private::Address::CalculateSymbolContext
uint32_t CalculateSymbolContext(SymbolContext *sc, lldb::SymbolContextItem resolve_scope=lldb::eSymbolContextEverything) const
Reconstruct a symbol context from an address.
Definition: Address.cpp:808
lldb_private::LineEntry
Definition: LineEntry.h:20
lldb_private::Block::GetContainingInlinedBlock
Block * GetContainingInlinedBlock()
Get the inlined block that contains this block.
Definition: Block.cpp:197
lldb::eDescriptionLevelBrief
@ eDescriptionLevelBrief
Definition: lldb-enumerations.h:208
lldb::eFrameCompareOlder
@ eFrameCompareOlder
Definition: lldb-enumerations.h:866
lldb::DescriptionLevel
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Definition: lldb-enumerations.h:207
lldb::eOnlyThisThread
@ eOnlyThisThread
Definition: lldb-enumerations.h:135
lldb_private::Status::AsCString
const char * AsCString(const char *default_error_str="unknown error") const
Get the error string associated with the current error.
Definition: Status.cpp:131
lldb_private::Log::PutCString
void PutCString(const char *cstr)
Definition: Log.cpp:118