LLDB  mainline
ThreadPlanStepOut.cpp
Go to the documentation of this file.
1 //===-- ThreadPlanStepOut.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 
11 #include "lldb/Core/Value.h"
13 #include "lldb/Symbol/Block.h"
14 #include "lldb/Symbol/Function.h"
15 #include "lldb/Symbol/Symbol.h"
16 #include "lldb/Symbol/Type.h"
17 #include "lldb/Target/ABI.h"
18 #include "lldb/Target/Process.h"
20 #include "lldb/Target/StopInfo.h"
21 #include "lldb/Target/Target.h"
24 #include "lldb/Utility/Log.h"
25 
26 #include <memory>
27 
28 using namespace lldb;
29 using namespace lldb_private;
30 
31 uint32_t ThreadPlanStepOut::s_default_flag_values = 0;
32 
33 // ThreadPlanStepOut: Step out of the current frame
34 ThreadPlanStepOut::ThreadPlanStepOut(
35  Thread &thread, SymbolContext *context, bool first_insn, bool stop_others,
36  Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx,
37  LazyBool step_out_avoids_code_without_debug_info,
38  bool continue_to_next_branch, bool gather_return_value)
39  : ThreadPlan(ThreadPlan::eKindStepOut, "Step out", thread, report_stop_vote,
40  report_run_vote),
41  ThreadPlanShouldStopHere(this), m_step_from_insn(LLDB_INVALID_ADDRESS),
42  m_return_bp_id(LLDB_INVALID_BREAK_ID),
43  m_return_addr(LLDB_INVALID_ADDRESS), m_stop_others(stop_others),
44  m_immediate_step_from_function(nullptr),
45  m_calculate_return_value(gather_return_value) {
48  SetupAvoidNoDebug(step_out_avoids_code_without_debug_info);
49 
50  m_step_from_insn = thread.GetRegisterContext()->GetPC(0);
51 
52  uint32_t return_frame_index = frame_idx + 1;
53  StackFrameSP return_frame_sp(thread.GetStackFrameAtIndex(return_frame_index));
54  StackFrameSP immediate_return_from_sp(thread.GetStackFrameAtIndex(frame_idx));
55 
56  if (!return_frame_sp || !immediate_return_from_sp)
57  return; // we can't do anything here. ValidatePlan() will return false.
58 
59  // While stepping out, behave as-if artificial frames are not present.
60  while (return_frame_sp->IsArtificial()) {
61  m_stepped_past_frames.push_back(return_frame_sp);
62 
63  ++return_frame_index;
64  return_frame_sp = thread.GetStackFrameAtIndex(return_frame_index);
65 
66  // We never expect to see an artificial frame without a regular ancestor.
67  // If this happens, log the issue and defensively refuse to step out.
68  if (!return_frame_sp) {
69  LLDB_LOG(log, "Can't step out of frame with artificial ancestors");
70  return;
71  }
72  }
73 
74  m_step_out_to_id = return_frame_sp->GetStackID();
75  m_immediate_step_from_id = immediate_return_from_sp->GetStackID();
76 
77  // If the frame directly below the one we are returning to is inlined, we
78  // have to be a little more careful. It is non-trivial to determine the real
79  // "return code address" for an inlined frame, so we have to work our way to
80  // that frame and then step out.
81  if (immediate_return_from_sp->IsInlined()) {
82  if (frame_idx > 0) {
83  // First queue a plan that gets us to this inlined frame, and when we get
84  // there we'll queue a second plan that walks us out of this frame.
85  m_step_out_to_inline_plan_sp = std::make_shared<ThreadPlanStepOut>(
86  thread, nullptr, false, stop_others, eVoteNoOpinion, eVoteNoOpinion,
87  frame_idx - 1, eLazyBoolNo, continue_to_next_branch);
89  ->SetShouldStopHereCallbacks(nullptr, nullptr);
90  m_step_out_to_inline_plan_sp->SetPrivate(true);
91  } else {
92  // If we're already at the inlined frame we're stepping through, then
93  // just do that now.
94  QueueInlinedStepPlan(false);
95  }
96  } else {
97  // Find the return address and set a breakpoint there:
98  // FIXME - can we do this more securely if we know first_insn?
99 
100  Address return_address(return_frame_sp->GetFrameCodeAddress());
101  if (continue_to_next_branch) {
102  SymbolContext return_address_sc;
103  AddressRange range;
104  Address return_address_decr_pc = return_address;
105  if (return_address_decr_pc.GetOffset() > 0)
106  return_address_decr_pc.Slide(-1);
107 
108  return_address_decr_pc.CalculateSymbolContext(
109  &return_address_sc, lldb::eSymbolContextLineEntry);
110  if (return_address_sc.line_entry.IsValid()) {
111  const bool include_inlined_functions = false;
112  range = return_address_sc.line_entry.GetSameLineContiguousAddressRange(
113  include_inlined_functions);
114  if (range.GetByteSize() > 0) {
116  return_address, range);
117  }
118  }
119  }
120  m_return_addr = return_address.GetLoadAddress(&m_process.GetTarget());
121 
123  return;
124 
125  // Perform some additional validation on the return address.
126  uint32_t permissions = 0;
128  LLDB_LOGF(log, "ThreadPlanStepOut(%p): Return address (0x%" PRIx64
129  ") permissions not found.", static_cast<void *>(this),
130  m_return_addr);
131  } else if (!(permissions & ePermissionsExecutable)) {
132  m_constructor_errors.Printf("Return address (0x%" PRIx64
133  ") did not point to executable memory.",
134  m_return_addr);
135  LLDB_LOGF(log, "ThreadPlanStepOut(%p): %s", static_cast<void *>(this),
137  return;
138  }
139 
140  Breakpoint *return_bp =
141  GetTarget().CreateBreakpoint(m_return_addr, true, false).get();
142 
143  if (return_bp != nullptr) {
144  if (return_bp->IsHardware() && !return_bp->HasResolvedLocations())
146  return_bp->SetThreadID(m_tid);
147  m_return_bp_id = return_bp->GetID();
148  return_bp->SetBreakpointKind("step-out");
149  }
150 
151  if (immediate_return_from_sp) {
152  const SymbolContext &sc =
153  immediate_return_from_sp->GetSymbolContext(eSymbolContextFunction);
154  if (sc.function) {
156  }
157  }
158  }
159 }
160 
162  LazyBool step_out_avoids_code_without_debug_info) {
163  bool avoid_nodebug = true;
164  switch (step_out_avoids_code_without_debug_info) {
165  case eLazyBoolYes:
166  avoid_nodebug = true;
167  break;
168  case eLazyBoolNo:
169  avoid_nodebug = false;
170  break;
171  case eLazyBoolCalculate:
172  avoid_nodebug = GetThread().GetStepOutAvoidsNoDebug();
173  break;
174  }
175  if (avoid_nodebug)
177  else
179 }
180 
182  Thread &thread = GetThread();
187 }
188 
192 }
193 
195  lldb::DescriptionLevel level) {
196  if (level == lldb::eDescriptionLevelBrief)
197  s->Printf("step out");
198  else {
200  s->Printf("Stepping out to inlined frame so we can walk through it.");
202  s->Printf("Stepping out by stepping through inlined function.");
203  else {
204  s->Printf("Stepping out from ");
205  Address tmp_address;
206  if (tmp_address.SetLoadAddress(m_step_from_insn, &GetTarget())) {
209  } else {
210  s->Printf("address 0x%" PRIx64 "", (uint64_t)m_step_from_insn);
211  }
212 
213  // FIXME: find some useful way to present the m_return_id, since there may
214  // be multiple copies of the
215  // same function on the stack.
216 
217  s->Printf(" returning to frame at ");
218  if (tmp_address.SetLoadAddress(m_return_addr, &GetTarget())) {
221  } else {
222  s->Printf("address 0x%" PRIx64 "", (uint64_t)m_return_addr);
223  }
224 
225  if (level == eDescriptionLevelVerbose)
226  s->Printf(" using breakpoint site %d", m_return_bp_id);
227  }
228  }
229 
230  if (m_stepped_past_frames.empty())
231  return;
232 
233  s->Printf("\n");
234  for (StackFrameSP frame_sp : m_stepped_past_frames) {
235  s->Printf("Stepped out past: ");
236  frame_sp->DumpUsingSettingsFormat(s);
237  }
238 }
239 
242  return m_step_out_to_inline_plan_sp->ValidatePlan(error);
243 
245  return m_step_through_inline_plan_sp->ValidatePlan(error);
246 
248  if (error)
249  error->PutCString(
250  "Could not create hardware breakpoint for thread plan.");
251  return false;
252  }
253 
255  if (error) {
256  error->PutCString("Could not create return address breakpoint.");
257  if (m_constructor_errors.GetSize() > 0) {
258  error->PutCString(" ");
259  error->PutCString(m_constructor_errors.GetString());
260  }
261  }
262  return false;
263  }
264 
265  return true;
266 }
267 
269  // If the step out plan is done, then we just need to step through the
270  // inlined frame.
272  return m_step_out_to_inline_plan_sp->MischiefManaged();
273  } else if (m_step_through_inline_plan_sp) {
274  if (m_step_through_inline_plan_sp->MischiefManaged()) {
276  SetPlanComplete();
277  return true;
278  } else
279  return false;
280  } else if (m_step_out_further_plan_sp) {
281  return m_step_out_further_plan_sp->MischiefManaged();
282  }
283 
284  // We don't explain signals or breakpoints (breakpoints that handle stepping
285  // in or out will be handled by a child plan.
286 
287  StopInfoSP stop_info_sp = GetPrivateStopInfo();
288  if (stop_info_sp) {
289  StopReason reason = stop_info_sp->GetStopReason();
290  if (reason == eStopReasonBreakpoint) {
291  // If this is OUR breakpoint, we're fine, otherwise we don't know why
292  // this happened...
293  BreakpointSiteSP site_sp(
294  m_process.GetBreakpointSiteList().FindByID(stop_info_sp->GetValue()));
295  if (site_sp && site_sp->IsBreakpointAtThisSite(m_return_bp_id)) {
296  bool done;
297 
298  StackID frame_zero_id =
299  GetThread().GetStackFrameAtIndex(0)->GetStackID();
300 
301  if (m_step_out_to_id == frame_zero_id)
302  done = true;
303  else if (m_step_out_to_id < frame_zero_id) {
304  // Either we stepped past the breakpoint, or the stack ID calculation
305  // was incorrect and we should probably stop.
306  done = true;
307  } else {
308  done = (m_immediate_step_from_id < frame_zero_id);
309  }
310 
311  if (done) {
314  SetPlanComplete();
315  }
316  }
317 
318  // If there was only one owner, then we're done. But if we also hit
319  // some user breakpoint on our way out, we should mark ourselves as
320  // done, but also not claim to explain the stop, since it is more
321  // important to report the user breakpoint than the step out
322  // completion.
323 
324  if (site_sp->GetNumberOfOwners() == 1)
325  return true;
326  }
327  return false;
328  } else if (IsUsuallyUnexplainedStopReason(reason))
329  return false;
330  else
331  return true;
332  }
333  return true;
334 }
335 
337  if (IsPlanComplete())
338  return true;
339 
340  bool done = false;
342  if (m_step_out_to_inline_plan_sp->MischiefManaged()) {
343  // Now step through the inlined stack we are in:
344  if (QueueInlinedStepPlan(true)) {
345  // If we can't queue a plan to do this, then just call ourselves done.
347  SetPlanComplete(false);
348  return true;
349  } else
350  done = true;
351  } else
352  return m_step_out_to_inline_plan_sp->ShouldStop(event_ptr);
353  } else if (m_step_through_inline_plan_sp) {
354  if (m_step_through_inline_plan_sp->MischiefManaged())
355  done = true;
356  else
357  return m_step_through_inline_plan_sp->ShouldStop(event_ptr);
358  } else if (m_step_out_further_plan_sp) {
359  if (m_step_out_further_plan_sp->MischiefManaged())
361  else
362  return m_step_out_further_plan_sp->ShouldStop(event_ptr);
363  }
364 
365  if (!done) {
366  StackID frame_zero_id = GetThread().GetStackFrameAtIndex(0)->GetStackID();
367  done = !(frame_zero_id < m_step_out_to_id);
368  }
369 
370  // The normal step out computations think we are done, so all we need to do
371  // is consult the ShouldStopHere, and we are done.
372 
373  if (done) {
376  SetPlanComplete();
377  } else {
380  done = false;
381  }
382  }
383 
384  return done;
385 }
386 
388 
390 
392  bool current_plan) {
394  return true;
395 
397  return false;
398 
399  if (current_plan) {
401  if (return_bp != nullptr)
402  return_bp->SetEnabled(true);
403  }
404  return true;
405 }
406 
410  if (return_bp != nullptr)
411  return_bp->SetEnabled(false);
412  }
413 
414  return true;
415 }
416 
418  if (IsPlanComplete()) {
419  // Did I reach my breakpoint? If so I'm done.
420  //
421  // I also check the stack depth, since if we've blown past the breakpoint
422  // for some
423  // reason and we're now stopping for some other reason altogether, then
424  // we're done with this step out operation.
425 
427  if (log)
428  LLDB_LOGF(log, "Completed step out plan.");
432  }
433 
435  return true;
436  } else {
437  return false;
438  }
439 }
440 
442  // Now figure out the range of this inlined block, and set up a "step through
443  // range" plan for that. If we've been provided with a context, then use the
444  // block in that context.
445  Thread &thread = GetThread();
446  StackFrameSP immediate_return_from_sp(thread.GetStackFrameAtIndex(0));
447  if (!immediate_return_from_sp)
448  return false;
449 
451  if (log) {
452  StreamString s;
453  immediate_return_from_sp->Dump(&s, true, false);
454  LLDB_LOGF(log, "Queuing inlined frame to step past: %s.", s.GetData());
455  }
456 
457  Block *from_block = immediate_return_from_sp->GetFrameBlock();
458  if (from_block) {
459  Block *inlined_block = from_block->GetContainingInlinedBlock();
460  if (inlined_block) {
461  size_t num_ranges = inlined_block->GetNumRanges();
462  AddressRange inline_range;
463  if (inlined_block->GetRangeAtIndex(0, inline_range)) {
464  SymbolContext inlined_sc;
465  inlined_block->CalculateSymbolContext(&inlined_sc);
466  inlined_sc.target_sp = GetTarget().shared_from_this();
467  RunMode run_mode =
469  const LazyBool avoid_no_debug = eLazyBoolNo;
470 
472  std::make_shared<ThreadPlanStepOverRange>(
473  thread, inline_range, inlined_sc, run_mode, avoid_no_debug);
474  ThreadPlanStepOverRange *step_through_inline_plan_ptr =
475  static_cast<ThreadPlanStepOverRange *>(
477  m_step_through_inline_plan_sp->SetPrivate(true);
478 
479  step_through_inline_plan_ptr->SetOkayToDiscard(true);
480  StreamString errors;
481  if (!step_through_inline_plan_ptr->ValidatePlan(&errors)) {
482  // FIXME: Log this failure.
483  delete step_through_inline_plan_ptr;
484  return false;
485  }
486 
487  for (size_t i = 1; i < num_ranges; i++) {
488  if (inlined_block->GetRangeAtIndex(i, inline_range))
489  step_through_inline_plan_ptr->AddRange(inline_range);
490  }
491 
492  if (queue_now)
494  return true;
495  }
496  }
497  }
498 
499  return false;
500 }
501 
503  if (m_return_valobj_sp)
504  return;
505 
507  return;
508 
509  if (m_immediate_step_from_function != nullptr) {
510  CompilerType return_compiler_type =
513  if (return_compiler_type) {
514  lldb::ABISP abi_sp = m_process.GetABI();
515  if (abi_sp)
517  abi_sp->GetReturnValueObject(GetThread(), return_compiler_type);
518  }
519  }
520 }
521 
523  // If we are still lower on the stack than the frame we are returning to,
524  // then there's something for us to do. Otherwise, we're stale.
525 
526  StackID frame_zero_id = GetThread().GetStackFrameAtIndex(0)->GetStackID();
527  return !(frame_zero_id < m_step_out_to_id);
528 }
lldb_private::ThreadPlanStepOut::ValidatePlan
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
Definition: ThreadPlanStepOut.cpp:240
lldb_private::Breakpoint::HasResolvedLocations
bool HasResolvedLocations() const
Return whether this breakpoint has any resolved locations.
Definition: Breakpoint.cpp:835
lldb_private::Address::SetLoadAddress
bool SetLoadAddress(lldb::addr_t load_addr, Target *target, bool allow_section_end=false)
Set the address to represent load_addr.
Definition: Address.cpp:1023
Block.h
lldb_private::ThreadPlanStepOut::GetDescription
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
Definition: ThreadPlanStepOut.cpp:194
ThreadPlanStepOverRange.h
lldb_private::ThreadPlan::GetThread
Thread & GetThread()
Returns the Thread that is using this thread plan.
Definition: ThreadPlan.cpp:41
lldb_private::Stoppoint::GetID
lldb::break_id_t GetID() const
Definition: Stoppoint.cpp:22
lldb_private::Event
Definition: Event.h:180
lldb_private::ThreadPlan::IsPlanComplete
bool IsPlanComplete()
Definition: ThreadPlan.cpp:60
lldb_private::LineEntry::IsValid
bool IsValid() const
Check if a line entry object is valid.
Definition: LineEntry.cpp:46
lldb_private::ThreadPlanStepOut::WillStop
bool WillStop() override
Definition: ThreadPlanStepOut.cpp:407
lldb_private::ThreadPlanStepOut::m_step_through_inline_plan_sp
lldb::ThreadPlanSP m_step_through_inline_plan_sp
Definition: ThreadPlanStepOut.h:66
lldb_private::ThreadPlanStepOut::SetupAvoidNoDebug
void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info)
Definition: ThreadPlanStepOut.cpp:161
lldb_private::ThreadPlanStepOut::m_return_bp_id
lldb::break_id_t m_return_bp_id
Definition: ThreadPlanStepOut.h:59
lldb_private::SymbolContext::target_sp
lldb::TargetSP target_sp
The Target for a given query.
Definition: SymbolContext.h:317
ThreadPlanStepOut.h
lldb_private::ThreadPlan::SetOkayToDiscard
void SetOkayToDiscard(bool value)
Definition: ThreadPlan.h:399
lldb_private::ThreadPlanStepOut::m_return_addr
lldb::addr_t m_return_addr
Definition: ThreadPlanStepOut.h:60
lldb_private::Breakpoint::SetBreakpointKind
void SetBreakpointKind(const char *kind)
Set the "kind" description for a breakpoint.
Definition: Breakpoint.h:442
lldb_private::ThreadPlanShouldStopHere::m_flags
lldb_private::Flags m_flags
Definition: ThreadPlanShouldStopHere.h:130
lldb_private::ThreadPlanStepOut::m_immediate_step_from_id
StackID m_immediate_step_from_id
Definition: ThreadPlanStepOut.h:58
lldb_private::ThreadPlanStepOut::m_calculate_return_value
bool m_calculate_return_value
Definition: ThreadPlanStepOut.h:74
lldb_private::eLazyBoolYes
@ eLazyBoolYes
Definition: lldb-private-enumerations.h:115
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:249
lldb_private::ThreadPlanStepOut
Definition: ThreadPlanStepOut.h:18
lldb_private::Flags::Clear
ValueType Clear(ValueType mask=~static_cast< ValueType >(0))
Clear one or more flags.
Definition: Flags.h:61
lldb_private::AddressRange::GetByteSize
lldb::addr_t GetByteSize() const
Get accessor for the byte size of this range.
Definition: AddressRange.h:221
lldb_private::Process::GetBreakpointSiteList
BreakpointSiteList & GetBreakpointSiteList()
Definition: Process.cpp:1554
lldb_private::Process::GetTarget
Target & GetTarget()
Get the target object pointer for this module.
Definition: Process.h:1214
lldb_private::ThreadPlanStepOut::m_constructor_errors
StreamString m_constructor_errors
Definition: ThreadPlanStepOut.h:75
lldb::StopReason
StopReason
Thread stop reasons.
Definition: lldb-enumerations.h:239
lldb_private::LineEntry::GetSameLineContiguousAddressRange
AddressRange GetSameLineContiguousAddressRange(bool include_inlined_functions) const
Give the range for this LineEntry + any additional LineEntries for this same source line that are con...
Definition: LineEntry.cpp:192
lldb_private::eVoteNoOpinion
@ eVoteNoOpinion
Definition: lldb-private-enumerations.h:59
lldb_private::Stream
Definition: Stream.h:28
lldb_private::Target::CreateBreakpoint
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)
Definition: Target.cpp:331
lldb_private::ThreadPlanStepOut::MischiefManaged
bool MischiefManaged() override
Definition: ThreadPlanStepOut.cpp:417
ThreadPlanStepThrough.h
lldb_private::LazyBool
LazyBool
Definition: lldb-private-enumerations.h:115
lldb_private::SymbolContext
Definition: SymbolContext.h:33
ABI.h
lldb_private::StreamString::GetString
llvm::StringRef GetString() const
Definition: StreamString.cpp:51
lldb_private::ThreadPlanStepOut::ShouldStop
bool ShouldStop(Event *event_ptr) override
Definition: ThreadPlanStepOut.cpp:336
Process.h
Target.h
lldb_private::ThreadPlanStepOut::QueueInlinedStepPlan
bool QueueInlinedStepPlan(bool queue_now)
Definition: ThreadPlanStepOut.cpp:441
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::StreamString::GetSize
size_t GetSize() const
Definition: StreamString.cpp:38
lldb_private::ThreadPlan::GetTarget
Target & GetTarget()
Definition: ThreadPlan.cpp:37
lldb_private::ThreadPlan
Definition: ThreadPlan.h:282
lldb_private::Address::DumpStyleLoadAddress
@ DumpStyleLoadAddress
Display as the load address (if resolved).
Definition: Address.h:96
Log.h
lldb_private::ThreadPlan::MischiefManaged
virtual bool MischiefManaged()
Definition: ThreadPlan.cpp:71
lldb_private::ThreadPlanShouldStopHere::eStepOutAvoidNoDebug
@ eStepOutAvoidNoDebug
Definition: ThreadPlanShouldStopHere.h:62
lldb_private::Thread
Definition: Thread.h:62
lldb_private::StreamString::GetData
const char * GetData() const
Definition: StreamString.h:43
lldb_private::ThreadPlanStepOverRange
Definition: ThreadPlanStepOverRange.h:19
lldb_private::SymbolContext::function
Function * function
The Function for a given query.
Definition: SymbolContext.h:320
Type.h
lldb_private::ThreadPlanStepOut::m_step_out_to_id
StackID m_step_out_to_id
Definition: ThreadPlanStepOut.h:57
lldb_private::StreamString
Definition: StreamString.h:23
lldb_private::AddressRange
Definition: AddressRange.h:25
lldb_private::BreakpointSiteList::FindByID
lldb::BreakpointSiteSP FindByID(lldb::break_id_t breakID)
Returns a shared pointer to the breakpoint site with id breakID.
Definition: BreakpointSiteList.cpp:111
lldb_private::GetLogIfAllCategoriesSet
Log * GetLogIfAllCategoriesSet(uint32_t mask)
Definition: Logging.cpp:58
lldb_private::ThreadPlanStepRange::AddRange
void AddRange(const AddressRange &new_range)
Definition: ThreadPlanStepRange.cpp:76
lldb_private::ThreadPlanStepOut::m_step_from_insn
lldb::addr_t m_step_from_insn
Definition: ThreadPlanStepOut.h:56
lldb_private::ThreadPlanShouldStopHere::QueueStepOutFromHerePlan
virtual lldb::ThreadPlanSP QueueStepOutFromHerePlan(Flags &flags, lldb::FrameComparison operation, Status &status)
Definition: ThreadPlanShouldStopHere.cpp:143
lldb_private::ThreadPlanStepOut::IsPlanStale
bool IsPlanStale() override
Definition: ThreadPlanStepOut.cpp:522
lldb_private::ThreadPlanShouldStopHere
Definition: ThreadPlanShouldStopHere.h:34
lldb_private::ThreadProperties::GetStepOutAvoidsNoDebug
bool GetStepOutAvoidsNoDebug() const
Definition: Thread.cpp:137
lldb_private::CompilerType::GetFunctionReturnType
CompilerType GetFunctionReturnType() const
Definition: CompilerType.cpp:373
lldb_private::ThreadPlanShouldStopHere::GetFlags
lldb_private::Flags & GetFlags()
Definition: ThreadPlanShouldStopHere.h:104
lldb_private::Breakpoint::SetThreadID
void SetThreadID(lldb::tid_t thread_id)
Set the valid thread to be checked when the breakpoint is hit.
Definition: Breakpoint.cpp:340
lldb_private::ThreadPlan::m_status
Status m_status
Definition: ThreadPlan.h:522
lldb::RunMode
RunMode
Thread Run Modes.
Definition: lldb-enumerations.h:135
LLDB_INVALID_BREAK_ID
#define LLDB_INVALID_BREAK_ID
Definition: lldb-defines.h:49
lldb_private::ThreadPlanStepOut::StopOthers
bool StopOthers() override
Definition: ThreadPlanStepOut.cpp:387
ValueObjectConstResult.h
Symbol.h
lldb_private::Breakpoint::SetEnabled
void SetEnabled(bool enable) override
If enable is true, enable the breakpoint, if false disable it.
Definition: Breakpoint.cpp:294
lldb_private::ThreadPlanStepOut::GetPlanRunState
lldb::StateType GetPlanRunState() override
Definition: ThreadPlanStepOut.cpp:389
lldb_private::ThreadPlan::SetPlanComplete
void SetPlanComplete(bool success=true)
Definition: ThreadPlan.cpp:65
lldb_private::ThreadPlanStepOut::DidPush
void DidPush() override
Definition: ThreadPlanStepOut.cpp:181
lldb_private::Address::DumpStyleResolvedDescription
@ DumpStyleResolvedDescription
Display the details about what an address resolves to.
Definition: Address.h:101
lldb_private::ThreadPlanStepOut::SetFlagsToDefault
void SetFlagsToDefault() override
Definition: ThreadPlanStepOut.h:44
lldb_private::Block
Definition: Block.h:41
lldb_private::ThreadPlan::IsUsuallyUnexplainedStopReason
bool IsUsuallyUnexplainedStopReason(lldb::StopReason)
Definition: ThreadPlan.cpp:165
uint32_t
lldb_private::eLazyBoolNo
@ eLazyBoolNo
Definition: lldb-private-enumerations.h:115
lldb_private::Address
Definition: Address.h:59
lldb_private::ThreadPlan::m_could_not_resolve_hw_bp
bool m_could_not_resolve_hw_bp
Definition: ThreadPlan.h:528
lldb_private::Thread::QueueThreadPlan
Status QueueThreadPlan(lldb::ThreadPlanSP &plan_sp, bool abort_other_plans)
Queues a generic thread plan.
Definition: Thread.cpp:1150
lldb_private::Block::GetRangeAtIndex
bool GetRangeAtIndex(uint32_t range_idx, AddressRange &range)
Definition: Block.cpp:292
lldb_private::ThreadPlanStepOut::DoWillResume
bool DoWillResume(lldb::StateType resume_state, bool current_plan) override
Definition: ThreadPlanStepOut.cpp:391
lldb_private::Address::GetLoadAddress
lldb::addr_t GetLoadAddress(Target *target) const
Get the load address.
Definition: Address.cpp:310
lldb_private::Process::AdvanceAddressToNextBranchInstruction
Address AdvanceAddressToNextBranchInstruction(Address default_stop_addr, AddressRange range_bounds)
Find the next branch instruction to set a breakpoint on.
Definition: Process.cpp:5842
lldb_private::ThreadPlanStepOut::CalculateReturnValue
void CalculateReturnValue()
Definition: ThreadPlanStepOut.cpp:502
lldb_private::Address::Dump
bool Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, DumpStyle fallback_style=DumpStyleInvalid, uint32_t addr_byte_size=UINT32_MAX) const
Dump a description of this object to a Stream.
Definition: Address.cpp:405
StopInfo.h
lldb::eStopReasonBreakpoint
@ eStopReasonBreakpoint
Definition: lldb-enumerations.h:243
lldb_private::Vote
Vote
Definition: lldb-private-enumerations.h:59
lldb_private::Target::RemoveBreakpointByID
bool RemoveBreakpointByID(lldb::break_id_t break_id)
Definition: Target.cpp:934
LLDB_INVALID_ADDRESS
#define LLDB_INVALID_ADDRESS
Definition: lldb-defines.h:86
LLDB_LOG
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
Definition: Log.h:242
lldb_private::ThreadPlanStepRange::ValidatePlan
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
Definition: ThreadPlanStepRange.cpp:57
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:33
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::ThreadPlanStepOut::m_stop_others
bool m_stop_others
Definition: ThreadPlanStepOut.h:61
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::ThreadPlanShouldStopHere::InvokeShouldStopHereCallback
bool InvokeShouldStopHereCallback(lldb::FrameComparison operation, Status &status)
Definition: ThreadPlanShouldStopHere.cpp:38
lldb_private::eLazyBoolCalculate
@ eLazyBoolCalculate
Definition: lldb-private-enumerations.h:115
lldb_private::ThreadPlanStepOut::DoPlanExplainsStop
bool DoPlanExplainsStop(Event *event_ptr) override
Definition: ThreadPlanStepOut.cpp:268
lldb_private::Breakpoint::IsHardware
bool IsHardware() const
Definition: Breakpoint.h:510
lldb_private::ThreadPlanShouldStopHere::SetShouldStopHereCallbacks
void SetShouldStopHereCallbacks(const ThreadPlanShouldStopHereCallbacks *callbacks, void *baton)
Definition: ThreadPlanShouldStopHere.h:79
Breakpoint.h
lldb_private::ThreadPlanStepOut::~ThreadPlanStepOut
~ThreadPlanStepOut() override
Definition: ThreadPlanStepOut.cpp:189
LIBLLDB_LOG_STEP
#define LIBLLDB_LOG_STEP
Definition: Logging.h:21
lldb_private::ThreadPlanStepOut::m_immediate_step_from_function
Function * m_immediate_step_from_function
Definition: ThreadPlanStepOut.h:71
lldb_private::Function::GetCompilerType
CompilerType GetCompilerType()
Definition: Function.cpp:522
lldb_private::ThreadPlan::m_tid
lldb::tid_t m_tid
Definition: ThreadPlan.h:524
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::StackID
Definition: StackID.h:17
lldb_private::Process::GetABI
const lldb::ABISP & GetABI()
Definition: Process.cpp:1475
lldb_private::Address::GetOffset
lldb::addr_t GetOffset() const
Get the section relative offset value.
Definition: Address.h:310
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:73
lldb_private::Log
Definition: Log.h:49
lldb_private::ThreadPlanStepOut::m_step_out_to_inline_plan_sp
lldb::ThreadPlanSP m_step_out_to_inline_plan_sp
Definition: ThreadPlanStepOut.h:62
lldb_private::Target::GetBreakpointByID
lldb::BreakpointSP GetBreakpointByID(lldb::break_id_t break_id)
Definition: Target.cpp:303
lldb_private::Thread::GetStackFrameAtIndex
virtual lldb::StackFrameSP GetStackFrameAtIndex(uint32_t idx)
Definition: Thread.h:399
lldb_private::ThreadPlanStepOut::m_stepped_past_frames
std::vector< lldb::StackFrameSP > m_stepped_past_frames
Definition: ThreadPlanStepOut.h:72
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::Block::GetNumRanges
size_t GetNumRanges() const
Definition: Block.h:341
lldb_private::ThreadPlan::m_process
Process & m_process
Definition: ThreadPlan.h:523
lldb_private::Address::Slide
bool Slide(int64_t offset)
Definition: Address.h:440
lldb
Definition: SBAddress.h:15
lldb::eStateRunning
@ eStateRunning
Process or thread is running and can't be examined.
Definition: lldb-enumerations.h:85
lldb_private::ThreadPlanStepOut::m_step_out_further_plan_sp
lldb::ThreadPlanSP m_step_out_further_plan_sp
Definition: ThreadPlanStepOut.h:68
RegisterContext.h
Value.h
lldb_private::Block::CalculateSymbolContext
void CalculateSymbolContext(SymbolContext *sc) override
Reconstruct the object's symbol context into sc.
Definition: Block.cpp:125
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::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_private::Breakpoint
General Outline: A breakpoint has four main parts, a filter, a resolver, the list of breakpoint locat...
Definition: Breakpoint.h:79
lldb::eOnlyThisThread
@ eOnlyThisThread
Definition: lldb-enumerations.h:135
lldb_private::Process::GetLoadAddressPermissions
virtual bool GetLoadAddressPermissions(lldb::addr_t load_addr, uint32_t &permissions)
Attempt to get the attributes for a region of memory in the process.
Definition: Process.cpp:2408
lldb_private::ThreadPlanStepOut::m_return_valobj_sp
lldb::ValueObjectSP m_return_valobj_sp
Definition: ThreadPlanStepOut.h:73