LLDB  mainline
StackFrameList.cpp
Go to the documentation of this file.
1 //===-- StackFrameList.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 
13 #include "lldb/Core/StreamFile.h"
14 #include "lldb/Symbol/Block.h"
15 #include "lldb/Symbol/Function.h"
16 #include "lldb/Symbol/Symbol.h"
17 #include "lldb/Target/Process.h"
19 #include "lldb/Target/StackFrame.h"
20 #include "lldb/Target/StopInfo.h"
21 #include "lldb/Target/Target.h"
22 #include "lldb/Target/Thread.h"
23 #include "lldb/Target/Unwind.h"
24 #include "lldb/Utility/Log.h"
25 #include "llvm/ADT/SmallPtrSet.h"
26 
27 #include <memory>
28 
29 //#define DEBUG_STACK_FRAMES 1
30 
31 using namespace lldb;
32 using namespace lldb_private;
33 
34 // StackFrameList constructor
35 StackFrameList::StackFrameList(Thread &thread,
36  const lldb::StackFrameListSP &prev_frames_sp,
37  bool show_inline_frames)
38  : m_thread(thread), m_prev_frames_sp(prev_frames_sp), m_mutex(), m_frames(),
39  m_selected_frame_idx(0), m_concrete_frames_fetched(0),
40  m_current_inlined_depth(UINT32_MAX),
41  m_current_inlined_pc(LLDB_INVALID_ADDRESS),
42  m_show_inlined_frames(show_inline_frames) {
43  if (prev_frames_sp) {
44  m_current_inlined_depth = prev_frames_sp->m_current_inlined_depth;
45  m_current_inlined_pc = prev_frames_sp->m_current_inlined_pc;
46  }
47 }
48 
50  // Call clear since this takes a lock and clears the stack frame list in case
51  // another thread is currently using this stack frame list
52  Clear();
53 }
54 
56  uint32_t cur_inlined_depth = GetCurrentInlinedDepth();
57  if (cur_inlined_depth == UINT32_MAX) {
59  }
60 }
61 
64  lldb::addr_t cur_pc = m_thread.GetRegisterContext()->GetPC();
65  if (cur_pc != m_current_inlined_pc) {
69  if (log && log->GetVerbose())
70  LLDB_LOGF(
71  log,
72  "GetCurrentInlinedDepth: invalidating current inlined depth.\n");
73  }
75  } else {
76  return UINT32_MAX;
77  }
78 }
79 
82  return;
83 
84  std::lock_guard<std::recursive_mutex> guard(m_mutex);
85 
86  GetFramesUpTo(0);
87  if (m_frames.empty())
88  return;
89  if (!m_frames[0]->IsInlined()) {
93  if (log && log->GetVerbose())
94  LLDB_LOGF(
95  log,
96  "ResetCurrentInlinedDepth: Invalidating current inlined depth.\n");
97  return;
98  }
99 
100  // We only need to do something special about inlined blocks when we are
101  // at the beginning of an inlined function:
102  // FIXME: We probably also have to do something special if the PC is at
103  // the END of an inlined function, which coincides with the end of either
104  // its containing function or another inlined function.
105 
106  Block *block_ptr = m_frames[0]->GetFrameBlock();
107  if (!block_ptr)
108  return;
109 
110  Address pc_as_address;
111  lldb::addr_t curr_pc = m_thread.GetRegisterContext()->GetPC();
112  pc_as_address.SetLoadAddress(curr_pc, &(m_thread.GetProcess()->GetTarget()));
113  AddressRange containing_range;
114  if (!block_ptr->GetRangeContainingAddress(pc_as_address, containing_range) ||
115  pc_as_address != containing_range.GetBaseAddress())
116  return;
117 
118  // If we got here because of a breakpoint hit, then set the inlined depth
119  // depending on where the breakpoint was set. If we got here because of a
120  // crash, then set the inlined depth to the deepest most block. Otherwise,
121  // we stopped here naturally as the result of a step, so set ourselves in the
122  // containing frame of the whole set of nested inlines, so the user can then
123  // "virtually" step into the frames one by one, or next over the whole mess.
124  // Note: We don't have to handle being somewhere in the middle of the stack
125  // here, since ResetCurrentInlinedDepth doesn't get called if there is a
126  // valid inlined depth set.
127  StopInfoSP stop_info_sp = m_thread.GetStopInfo();
128  if (!stop_info_sp)
129  return;
130  switch (stop_info_sp->GetStopReason()) {
133  case eStopReasonExec:
134  case eStopReasonFork:
135  case eStopReasonVFork:
137  case eStopReasonSignal:
138  // In all these cases we want to stop in the deepest frame.
139  m_current_inlined_pc = curr_pc;
141  break;
142  case eStopReasonBreakpoint: {
143  // FIXME: Figure out what this break point is doing, and set the inline
144  // depth appropriately. Be careful to take into account breakpoints that
145  // implement step over prologue, since that should do the default
146  // calculation. For now, if the breakpoints corresponding to this hit are
147  // all internal, I set the stop location to the top of the inlined stack,
148  // since that will make things like stepping over prologues work right.
149  // But if there are any non-internal breakpoints I do to the bottom of the
150  // stack, since that was the old behavior.
151  uint32_t bp_site_id = stop_info_sp->GetValue();
152  BreakpointSiteSP bp_site_sp(
153  m_thread.GetProcess()->GetBreakpointSiteList().FindByID(bp_site_id));
154  bool all_internal = true;
155  if (bp_site_sp) {
156  uint32_t num_owners = bp_site_sp->GetNumberOfOwners();
157  for (uint32_t i = 0; i < num_owners; i++) {
158  Breakpoint &bp_ref = bp_site_sp->GetOwnerAtIndex(i)->GetBreakpoint();
159  if (!bp_ref.IsInternal()) {
160  all_internal = false;
161  }
162  }
163  }
164  if (!all_internal) {
165  m_current_inlined_pc = curr_pc;
167  break;
168  }
169  }
170  LLVM_FALLTHROUGH;
171  default: {
172  // Otherwise, we should set ourselves at the container of the inlining, so
173  // that the user can descend into them. So first we check whether we have
174  // more than one inlined block sharing this PC:
175  int num_inlined_functions = 0;
176 
177  for (Block *container_ptr = block_ptr->GetInlinedParent();
178  container_ptr != nullptr;
179  container_ptr = container_ptr->GetInlinedParent()) {
180  if (!container_ptr->GetRangeContainingAddress(pc_as_address,
181  containing_range))
182  break;
183  if (pc_as_address != containing_range.GetBaseAddress())
184  break;
185 
186  num_inlined_functions++;
187  }
188  m_current_inlined_pc = curr_pc;
189  m_current_inlined_depth = num_inlined_functions + 1;
191  if (log && log->GetVerbose())
192  LLDB_LOGF(log,
193  "ResetCurrentInlinedDepth: setting inlined "
194  "depth: %d 0x%" PRIx64 ".\n",
195  m_current_inlined_depth, curr_pc);
196 
197  break;
198  }
199  }
200 }
201 
203  if (m_show_inlined_frames) {
204  uint32_t current_inlined_depth = GetCurrentInlinedDepth();
205  if (current_inlined_depth != UINT32_MAX) {
206  if (current_inlined_depth > 0) {
208  return true;
209  }
210  }
211  }
212  return false;
213 }
214 
216  m_current_inlined_depth = new_depth;
217  if (new_depth == UINT32_MAX)
219  else
221 }
222 
224  Unwind &unwinder) {
225  assert(m_thread.IsValid() && "Expected valid thread");
226  assert(m_frames.size() <= end_idx && "Expected there to be frames to fill");
227 
228  if (end_idx < m_concrete_frames_fetched)
229  return;
230 
231  uint32_t num_frames = unwinder.GetFramesUpTo(end_idx);
232  if (num_frames <= end_idx + 1) {
233  // Done unwinding.
235  }
236 
237  // Don't create the frames eagerly. Defer this work to GetFrameAtIndex,
238  // which can lazily query the unwinder to create frames.
239  m_frames.resize(num_frames);
240 }
241 
242 /// A sequence of calls that comprise some portion of a backtrace. Each frame
243 /// is represented as a pair of a callee (Function *) and an address within the
244 /// callee.
249 };
250 using CallSequence = std::vector<CallDescriptor>;
251 
252 /// Find the unique path through the call graph from \p begin (with return PC
253 /// \p return_pc) to \p end. On success this path is stored into \p path, and
254 /// on failure \p path is unchanged.
255 static void FindInterveningFrames(Function &begin, Function &end,
256  ExecutionContext &exe_ctx, Target &target,
257  addr_t return_pc, CallSequence &path,
258  ModuleList &images, Log *log) {
259  LLDB_LOG(log, "Finding frames between {0} and {1}, retn-pc={2:x}",
260  begin.GetDisplayName(), end.GetDisplayName(), return_pc);
261 
262  // Find a non-tail calling edge with the correct return PC.
263  if (log)
264  for (const auto &edge : begin.GetCallEdges())
265  LLDB_LOG(log, "FindInterveningFrames: found call with retn-PC = {0:x}",
266  edge->GetReturnPCAddress(begin, target));
267  CallEdge *first_edge = begin.GetCallEdgeForReturnAddress(return_pc, target);
268  if (!first_edge) {
269  LLDB_LOG(log, "No call edge outgoing from {0} with retn-PC == {1:x}",
270  begin.GetDisplayName(), return_pc);
271  return;
272  }
273 
274  // The first callee may not be resolved, or there may be nothing to fill in.
275  Function *first_callee = first_edge->GetCallee(images, exe_ctx);
276  if (!first_callee) {
277  LLDB_LOG(log, "Could not resolve callee");
278  return;
279  }
280  if (first_callee == &end) {
281  LLDB_LOG(log, "Not searching further, first callee is {0} (retn-PC: {1:x})",
282  end.GetDisplayName(), return_pc);
283  return;
284  }
285 
286  // Run DFS on the tail-calling edges out of the first callee to find \p end.
287  // Fully explore the set of functions reachable from the first edge via tail
288  // calls in order to detect ambiguous executions.
289  struct DFS {
290  CallSequence active_path = {};
291  CallSequence solution_path = {};
292  llvm::SmallPtrSet<Function *, 2> visited_nodes = {};
293  bool ambiguous = false;
294  Function *end;
295  ModuleList &images;
296  Target &target;
297  ExecutionContext &context;
298 
299  DFS(Function *end, ModuleList &images, Target &target,
300  ExecutionContext &context)
301  : end(end), images(images), target(target), context(context) {}
302 
303  void search(CallEdge &first_edge, Function &first_callee,
304  CallSequence &path) {
305  dfs(first_edge, first_callee);
306  if (!ambiguous)
307  path = std::move(solution_path);
308  }
309 
310  void dfs(CallEdge &current_edge, Function &callee) {
311  // Found a path to the target function.
312  if (&callee == end) {
313  if (solution_path.empty())
314  solution_path = active_path;
315  else
316  ambiguous = true;
317  return;
318  }
319 
320  // Terminate the search if tail recursion is found, or more generally if
321  // there's more than one way to reach a target. This errs on the side of
322  // caution: it conservatively stops searching when some solutions are
323  // still possible to save time in the average case.
324  if (!visited_nodes.insert(&callee).second) {
325  ambiguous = true;
326  return;
327  }
328 
329  // Search the calls made from this callee.
330  active_path.push_back(CallDescriptor{&callee});
331  for (const auto &edge : callee.GetTailCallingEdges()) {
332  Function *next_callee = edge->GetCallee(images, context);
333  if (!next_callee)
334  continue;
335 
336  std::tie(active_path.back().address_type, active_path.back().address) =
337  edge->GetCallerAddress(callee, target);
338 
339  dfs(*edge, *next_callee);
340  if (ambiguous)
341  return;
342  }
343  active_path.pop_back();
344  }
345  };
346 
347  DFS(&end, images, target, exe_ctx).search(*first_edge, *first_callee, path);
348 }
349 
350 /// Given that \p next_frame will be appended to the frame list, synthesize
351 /// tail call frames between the current end of the list and \p next_frame.
352 /// If any frames are added, adjust the frame index of \p next_frame.
353 ///
354 /// --------------
355 /// | ... | <- Completed frames.
356 /// --------------
357 /// | prev_frame |
358 /// --------------
359 /// | ... | <- Artificial frames inserted here.
360 /// --------------
361 /// | next_frame |
362 /// --------------
363 /// | ... | <- Not-yet-visited frames.
364 /// --------------
366  // Cannot synthesize tail call frames when the stack is empty (there is no
367  // "previous" frame).
368  if (m_frames.empty())
369  return;
370 
371  TargetSP target_sp = next_frame.CalculateTarget();
372  if (!target_sp)
373  return;
374 
375  lldb::RegisterContextSP next_reg_ctx_sp = next_frame.GetRegisterContext();
376  if (!next_reg_ctx_sp)
377  return;
378 
380 
381  StackFrame &prev_frame = *m_frames.back().get();
382 
383  // Find the functions prev_frame and next_frame are stopped in. The function
384  // objects are needed to search the lazy call graph for intervening frames.
385  Function *prev_func =
386  prev_frame.GetSymbolContext(eSymbolContextFunction).function;
387  if (!prev_func) {
388  LLDB_LOG(log, "SynthesizeTailCallFrames: can't find previous function");
389  return;
390  }
391  Function *next_func =
392  next_frame.GetSymbolContext(eSymbolContextFunction).function;
393  if (!next_func) {
394  LLDB_LOG(log, "SynthesizeTailCallFrames: can't find next function");
395  return;
396  }
397 
398  // Try to find the unique sequence of (tail) calls which led from next_frame
399  // to prev_frame.
400  CallSequence path;
401  addr_t return_pc = next_reg_ctx_sp->GetPC();
402  Target &target = *target_sp.get();
403  ModuleList &images = next_frame.CalculateTarget()->GetImages();
404  ExecutionContext exe_ctx(target_sp, /*get_process=*/true);
405  exe_ctx.SetFramePtr(&next_frame);
406  FindInterveningFrames(*next_func, *prev_func, exe_ctx, target, return_pc,
407  path, images, log);
408 
409  // Push synthetic tail call frames.
410  for (auto calleeInfo : llvm::reverse(path)) {
411  Function *callee = calleeInfo.func;
412  uint32_t frame_idx = m_frames.size();
413  uint32_t concrete_frame_idx = next_frame.GetConcreteFrameIndex();
415  bool cfa_is_valid = false;
416  addr_t pc = calleeInfo.address;
417  // If the callee address refers to the call instruction, we do not want to
418  // subtract 1 from this value.
419  const bool behaves_like_zeroth_frame =
420  calleeInfo.address_type == CallEdge::AddrType::Call;
421  SymbolContext sc;
422  callee->CalculateSymbolContext(&sc);
423  auto synth_frame = std::make_shared<StackFrame>(
424  m_thread.shared_from_this(), frame_idx, concrete_frame_idx, cfa,
425  cfa_is_valid, pc, StackFrame::Kind::Artificial,
426  behaves_like_zeroth_frame, &sc);
427  m_frames.push_back(synth_frame);
428  LLDB_LOG(log, "Pushed frame {0} at {1:x}", callee->GetDisplayName(), pc);
429  }
430 
431  // If any frames were created, adjust next_frame's index.
432  if (!path.empty())
433  next_frame.SetFrameIndex(m_frames.size());
434 }
435 
437  // Do not fetch frames for an invalid thread.
438  if (!m_thread.IsValid())
439  return;
440 
441  // We've already gotten more frames than asked for, or we've already finished
442  // unwinding, return.
443  if (m_frames.size() > end_idx || GetAllFramesFetched())
444  return;
445 
446  Unwind &unwinder = m_thread.GetUnwinder();
447 
448  if (!m_show_inlined_frames) {
449  GetOnlyConcreteFramesUpTo(end_idx, unwinder);
450  return;
451  }
452 
453 #if defined(DEBUG_STACK_FRAMES)
454  StreamFile s(stdout, false);
455 #endif
456  // If we are hiding some frames from the outside world, we need to add
457  // those onto the total count of frames to fetch. However, we don't need
458  // to do that if end_idx is 0 since in that case we always get the first
459  // concrete frame and all the inlined frames below it... And of course, if
460  // end_idx is UINT32_MAX that means get all, so just do that...
461 
462  uint32_t inlined_depth = 0;
463  if (end_idx > 0 && end_idx != UINT32_MAX) {
464  inlined_depth = GetCurrentInlinedDepth();
465  if (inlined_depth != UINT32_MAX) {
466  if (end_idx > 0)
467  end_idx += inlined_depth;
468  }
469  }
470 
471  StackFrameSP unwind_frame_sp;
472  do {
476  bool behaves_like_zeroth_frame = (idx == 0);
477  if (idx == 0) {
478  // We might have already created frame zero, only create it if we need
479  // to.
480  if (m_frames.empty()) {
481  RegisterContextSP reg_ctx_sp(m_thread.GetRegisterContext());
482 
483  if (reg_ctx_sp) {
484  const bool success = unwinder.GetFrameInfoAtIndex(
485  idx, cfa, pc, behaves_like_zeroth_frame);
486  // There shouldn't be any way not to get the frame info for frame
487  // 0. But if the unwinder can't make one, lets make one by hand
488  // with the SP as the CFA and see if that gets any further.
489  if (!success) {
490  cfa = reg_ctx_sp->GetSP();
491  pc = reg_ctx_sp->GetPC();
492  }
493 
494  unwind_frame_sp = std::make_shared<StackFrame>(
495  m_thread.shared_from_this(), m_frames.size(), idx, reg_ctx_sp,
496  cfa, pc, behaves_like_zeroth_frame, nullptr);
497  m_frames.push_back(unwind_frame_sp);
498  }
499  } else {
500  unwind_frame_sp = m_frames.front();
501  cfa = unwind_frame_sp->m_id.GetCallFrameAddress();
502  }
503  } else {
504  const bool success =
505  unwinder.GetFrameInfoAtIndex(idx, cfa, pc, behaves_like_zeroth_frame);
506  if (!success) {
507  // We've gotten to the end of the stack.
509  break;
510  }
511  const bool cfa_is_valid = true;
512  unwind_frame_sp = std::make_shared<StackFrame>(
513  m_thread.shared_from_this(), m_frames.size(), idx, cfa, cfa_is_valid,
514  pc, StackFrame::Kind::Regular, behaves_like_zeroth_frame, nullptr);
515 
516  // Create synthetic tail call frames between the previous frame and the
517  // newly-found frame. The new frame's index may change after this call,
518  // although its concrete index will stay the same.
519  SynthesizeTailCallFrames(*unwind_frame_sp.get());
520 
521  m_frames.push_back(unwind_frame_sp);
522  }
523 
524  assert(unwind_frame_sp);
525  SymbolContext unwind_sc = unwind_frame_sp->GetSymbolContext(
526  eSymbolContextBlock | eSymbolContextFunction);
527  Block *unwind_block = unwind_sc.block;
528  TargetSP target_sp = m_thread.CalculateTarget();
529  if (unwind_block) {
530  Address curr_frame_address(
531  unwind_frame_sp->GetFrameCodeAddressForSymbolication());
532 
533  SymbolContext next_frame_sc;
534  Address next_frame_address;
535 
536  while (unwind_sc.GetParentOfInlinedScope(
537  curr_frame_address, next_frame_sc, next_frame_address)) {
538  next_frame_sc.line_entry.ApplyFileMappings(target_sp);
539  behaves_like_zeroth_frame = false;
540  StackFrameSP frame_sp(new StackFrame(
541  m_thread.shared_from_this(), m_frames.size(), idx,
542  unwind_frame_sp->GetRegisterContextSP(), cfa, next_frame_address,
543  behaves_like_zeroth_frame, &next_frame_sc));
544 
545  m_frames.push_back(frame_sp);
546  unwind_sc = next_frame_sc;
547  curr_frame_address = next_frame_address;
548  }
549  }
550  } while (m_frames.size() - 1 < end_idx);
551 
552  // Don't try to merge till you've calculated all the frames in this stack.
554  StackFrameList *prev_frames = m_prev_frames_sp.get();
555  StackFrameList *curr_frames = this;
556 
557 #if defined(DEBUG_STACK_FRAMES)
558  s.PutCString("\nprev_frames:\n");
559  prev_frames->Dump(&s);
560  s.PutCString("\ncurr_frames:\n");
561  curr_frames->Dump(&s);
562  s.EOL();
563 #endif
564  size_t curr_frame_num, prev_frame_num;
565 
566  for (curr_frame_num = curr_frames->m_frames.size(),
567  prev_frame_num = prev_frames->m_frames.size();
568  curr_frame_num > 0 && prev_frame_num > 0;
569  --curr_frame_num, --prev_frame_num) {
570  const size_t curr_frame_idx = curr_frame_num - 1;
571  const size_t prev_frame_idx = prev_frame_num - 1;
572  StackFrameSP curr_frame_sp(curr_frames->m_frames[curr_frame_idx]);
573  StackFrameSP prev_frame_sp(prev_frames->m_frames[prev_frame_idx]);
574 
575 #if defined(DEBUG_STACK_FRAMES)
576  s.Printf("\n\nCurr frame #%u ", curr_frame_idx);
577  if (curr_frame_sp)
578  curr_frame_sp->Dump(&s, true, false);
579  else
580  s.PutCString("NULL");
581  s.Printf("\nPrev frame #%u ", prev_frame_idx);
582  if (prev_frame_sp)
583  prev_frame_sp->Dump(&s, true, false);
584  else
585  s.PutCString("NULL");
586 #endif
587 
588  StackFrame *curr_frame = curr_frame_sp.get();
589  StackFrame *prev_frame = prev_frame_sp.get();
590 
591  if (curr_frame == nullptr || prev_frame == nullptr)
592  break;
593 
594  // Check the stack ID to make sure they are equal.
595  if (curr_frame->GetStackID() != prev_frame->GetStackID())
596  break;
597 
598  prev_frame->UpdatePreviousFrameFromCurrentFrame(*curr_frame);
599  // Now copy the fixed up previous frame into the current frames so the
600  // pointer doesn't change.
601  m_frames[curr_frame_idx] = prev_frame_sp;
602 
603 #if defined(DEBUG_STACK_FRAMES)
604  s.Printf("\n Copying previous frame to current frame");
605 #endif
606  }
607  // We are done with the old stack frame list, we can release it now.
608  m_prev_frames_sp.reset();
609  }
610 
611 #if defined(DEBUG_STACK_FRAMES)
612  s.PutCString("\n\nNew frames:\n");
613  Dump(&s);
614  s.EOL();
615 #endif
616 }
617 
619  std::lock_guard<std::recursive_mutex> guard(m_mutex);
620 
621  if (can_create)
623 
624  return GetVisibleStackFrameIndex(m_frames.size());
625 }
626 
628  if (s == nullptr)
629  return;
630 
631  std::lock_guard<std::recursive_mutex> guard(m_mutex);
632 
633  const_iterator pos, begin = m_frames.begin(), end = m_frames.end();
634  for (pos = begin; pos != end; ++pos) {
635  StackFrame *frame = (*pos).get();
636  s->Printf("%p: ", static_cast<void *>(frame));
637  if (frame) {
638  frame->GetStackID().Dump(s);
639  frame->DumpUsingSettingsFormat(s);
640  } else
641  s->Printf("frame #%u", (uint32_t)std::distance(begin, pos));
642  s->EOL();
643  }
644  s->EOL();
645 }
646 
648  StackFrameSP frame_sp;
649  std::lock_guard<std::recursive_mutex> guard(m_mutex);
650  uint32_t original_idx = idx;
651 
652  uint32_t inlined_depth = GetCurrentInlinedDepth();
653  if (inlined_depth != UINT32_MAX)
654  idx += inlined_depth;
655 
656  if (idx < m_frames.size())
657  frame_sp = m_frames[idx];
658 
659  if (frame_sp)
660  return frame_sp;
661 
662  // GetFramesUpTo will fill m_frames with as many frames as you asked for, if
663  // there are that many. If there weren't then you asked for too many frames.
664  GetFramesUpTo(idx);
665  if (idx < m_frames.size()) {
666  if (m_show_inlined_frames) {
667  // When inline frames are enabled we actually create all the frames in
668  // GetFramesUpTo.
669  frame_sp = m_frames[idx];
670  } else {
671  addr_t pc, cfa;
672  bool behaves_like_zeroth_frame = (idx == 0);
674  idx, cfa, pc, behaves_like_zeroth_frame)) {
675  const bool cfa_is_valid = true;
676  frame_sp = std::make_shared<StackFrame>(
677  m_thread.shared_from_this(), idx, idx, cfa, cfa_is_valid, pc,
678  StackFrame::Kind::Regular, behaves_like_zeroth_frame, nullptr);
679 
680  Function *function =
681  frame_sp->GetSymbolContext(eSymbolContextFunction).function;
682  if (function) {
683  // When we aren't showing inline functions we always use the top
684  // most function block as the scope.
685  frame_sp->SetSymbolContextScope(&function->GetBlock(false));
686  } else {
687  // Set the symbol scope from the symbol regardless if it is nullptr
688  // or valid.
689  frame_sp->SetSymbolContextScope(
690  frame_sp->GetSymbolContext(eSymbolContextSymbol).symbol);
691  }
692  SetFrameAtIndex(idx, frame_sp);
693  }
694  }
695  } else if (original_idx == 0) {
696  // There should ALWAYS be a frame at index 0. If something went wrong with
697  // the CurrentInlinedDepth such that there weren't as many frames as we
698  // thought taking that into account, then reset the current inlined depth
699  // and return the real zeroth frame.
700  if (m_frames.empty()) {
701  // Why do we have a thread with zero frames, that should not ever
702  // happen...
703  assert(!m_thread.IsValid() && "A valid thread has no frames.");
704  } else {
706  frame_sp = m_frames[original_idx];
707  }
708  }
709 
710  return frame_sp;
711 }
712 
713 StackFrameSP
715  // First try assuming the unwind index is the same as the frame index. The
716  // unwind index is always greater than or equal to the frame index, so it is
717  // a good place to start. If we have inlined frames we might have 5 concrete
718  // frames (frame unwind indexes go from 0-4), but we might have 15 frames
719  // after we make all the inlined frames. Most of the time the unwind frame
720  // index (or the concrete frame index) is the same as the frame index.
721  uint32_t frame_idx = unwind_idx;
722  StackFrameSP frame_sp(GetFrameAtIndex(frame_idx));
723  while (frame_sp) {
724  if (frame_sp->GetFrameIndex() == unwind_idx)
725  break;
726  frame_sp = GetFrameAtIndex(++frame_idx);
727  }
728  return frame_sp;
729 }
730 
731 static bool CompareStackID(const StackFrameSP &stack_sp,
732  const StackID &stack_id) {
733  return stack_sp->GetStackID() < stack_id;
734 }
735 
736 StackFrameSP StackFrameList::GetFrameWithStackID(const StackID &stack_id) {
737  StackFrameSP frame_sp;
738 
739  if (stack_id.IsValid()) {
740  std::lock_guard<std::recursive_mutex> guard(m_mutex);
741  uint32_t frame_idx = 0;
742  // Do a binary search in case the stack frame is already in our cache
743  collection::const_iterator begin = m_frames.begin();
744  collection::const_iterator end = m_frames.end();
745  if (begin != end) {
746  collection::const_iterator pos =
747  std::lower_bound(begin, end, stack_id, CompareStackID);
748  if (pos != end) {
749  if ((*pos)->GetStackID() == stack_id)
750  return *pos;
751  }
752  }
753  do {
754  frame_sp = GetFrameAtIndex(frame_idx);
755  if (frame_sp && frame_sp->GetStackID() == stack_id)
756  break;
757  frame_idx++;
758  } while (frame_sp);
759  }
760  return frame_sp;
761 }
762 
763 bool StackFrameList::SetFrameAtIndex(uint32_t idx, StackFrameSP &frame_sp) {
764  if (idx >= m_frames.size())
765  m_frames.resize(idx + 1);
766  // Make sure allocation succeeded by checking bounds again
767  if (idx < m_frames.size()) {
768  m_frames[idx] = frame_sp;
769  return true;
770  }
771  return false; // resize failed, out of memory?
772 }
773 
775  std::lock_guard<std::recursive_mutex> guard(m_mutex);
776  return m_selected_frame_idx;
777 }
778 
780  std::lock_guard<std::recursive_mutex> guard(m_mutex);
781  const_iterator pos;
782  const_iterator begin = m_frames.begin();
783  const_iterator end = m_frames.end();
785  for (pos = begin; pos != end; ++pos) {
786  if (pos->get() == frame) {
787  m_selected_frame_idx = std::distance(begin, pos);
788  uint32_t inlined_depth = GetCurrentInlinedDepth();
789  if (inlined_depth != UINT32_MAX)
790  m_selected_frame_idx -= inlined_depth;
791  break;
792  }
793  }
795  return m_selected_frame_idx;
796 }
797 
799  std::lock_guard<std::recursive_mutex> guard(m_mutex);
800  StackFrameSP frame_sp(GetFrameAtIndex(idx));
801  if (frame_sp) {
802  SetSelectedFrame(frame_sp.get());
803  return true;
804  } else
805  return false;
806 }
807 
809  if (m_thread.GetID() ==
810  m_thread.GetProcess()->GetThreadList().GetSelectedThread()->GetID()) {
811  StackFrameSP frame_sp(GetFrameAtIndex(GetSelectedFrameIndex()));
812  if (frame_sp) {
813  SymbolContext sc = frame_sp->GetSymbolContext(eSymbolContextLineEntry);
814  if (sc.line_entry.file)
815  m_thread.CalculateTarget()->GetSourceManager().SetDefaultFileAndLine(
816  sc.line_entry.file, sc.line_entry.line);
817  }
818  }
819 }
820 
821 // The thread has been run, reset the number stack frames to zero so we can
822 // determine how many frames we have lazily.
824  std::lock_guard<std::recursive_mutex> guard(m_mutex);
825  m_frames.clear();
827 }
828 
829 lldb::StackFrameSP
831  const_iterator pos;
832  const_iterator begin = m_frames.begin();
833  const_iterator end = m_frames.end();
834  lldb::StackFrameSP ret_sp;
835 
836  for (pos = begin; pos != end; ++pos) {
837  if (pos->get() == stack_frame_ptr) {
838  ret_sp = (*pos);
839  break;
840  }
841  }
842  return ret_sp;
843 }
844 
845 size_t StackFrameList::GetStatus(Stream &strm, uint32_t first_frame,
846  uint32_t num_frames, bool show_frame_info,
847  uint32_t num_frames_with_source,
848  bool show_unique,
849  const char *selected_frame_marker) {
850  size_t num_frames_displayed = 0;
851 
852  if (num_frames == 0)
853  return 0;
854 
855  StackFrameSP frame_sp;
856  uint32_t frame_idx = 0;
857  uint32_t last_frame;
858 
859  // Don't let the last frame wrap around...
860  if (num_frames == UINT32_MAX)
861  last_frame = UINT32_MAX;
862  else
863  last_frame = first_frame + num_frames;
864 
865  StackFrameSP selected_frame_sp = m_thread.GetSelectedFrame();
866  const char *unselected_marker = nullptr;
867  std::string buffer;
868  if (selected_frame_marker) {
869  size_t len = strlen(selected_frame_marker);
870  buffer.insert(buffer.begin(), len, ' ');
871  unselected_marker = buffer.c_str();
872  }
873  const char *marker = nullptr;
874 
875  for (frame_idx = first_frame; frame_idx < last_frame; ++frame_idx) {
876  frame_sp = GetFrameAtIndex(frame_idx);
877  if (!frame_sp)
878  break;
879 
880  if (selected_frame_marker != nullptr) {
881  if (frame_sp == selected_frame_sp)
882  marker = selected_frame_marker;
883  else
884  marker = unselected_marker;
885  }
886 
887  if (!frame_sp->GetStatus(strm, show_frame_info,
888  num_frames_with_source > (first_frame - frame_idx),
889  show_unique, marker))
890  break;
891  ++num_frames_displayed;
892  }
893 
894  strm.IndentLess();
895  return num_frames_displayed;
896 }
lldb_private::StackFrame::CalculateTarget
lldb::TargetSP CalculateTarget() override
Definition: StackFrame.cpp:1732
lldb_private::StackFrameList::SetSelectedFrame
uint32_t SetSelectedFrame(lldb_private::StackFrame *frame)
Mark a stack frame as the currently selected frame and return its index.
Definition: StackFrameList.cpp:779
lldb_private::Unwind::GetFrameInfoAtIndex
bool GetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa, lldb::addr_t &pc, bool &behaves_like_zeroth_frame)
Definition: Unwind.h:50
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:1010
lldb_private::AddressRange::GetBaseAddress
Address & GetBaseAddress()
Get accessor for the base address of the range.
Definition: AddressRange.h:209
Block.h
lldb_private::Function::GetTailCallingEdges
llvm::ArrayRef< std::unique_ptr< CallEdge > > GetTailCallingEdges()
Get the outgoing tail-calling edges from this function.
Definition: Function.cpp:322
lldb_private::Stream::IndentLess
void IndentLess(unsigned amount=2)
Decrement the current indentation level.
Definition: Stream.cpp:171
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::StackFrameList::Clear
void Clear()
Clear the cache of frames.
Definition: StackFrameList.cpp:823
lldb_private::ExecutionContext
Definition: ExecutionContext.h:291
lldb_private::LineEntry::file
FileSpec file
The source file, possibly mapped by the target.source-map setting.
Definition: LineEntry.h:140
lldb_private::Log::GetVerbose
bool GetVerbose() const
Definition: Log.cpp:275
lldb_private::StackFrameList::GetNumFrames
uint32_t GetNumFrames(bool can_create=true)
Get the number of visible frames.
Definition: StackFrameList.cpp:618
lldb::eStopReasonVFork
@ eStopReasonVFork
Definition: lldb-enumerations.h:253
lldb_private::StackFrame::SetFrameIndex
void SetFrameIndex(uint32_t index)
Set this frame's synthetic frame index.
Definition: StackFrame.h:397
lldb_private::StackFrameList::m_current_inlined_pc
lldb::addr_t m_current_inlined_pc
The program counter value at the currently selected synthetic activation.
Definition: StackFrameList.h:149
lldb_private::Thread::GetUnwinder
virtual Unwind & GetUnwinder()
Definition: Thread.cpp:1862
lldb_private::StackFrame::DumpUsingSettingsFormat
void DumpUsingSettingsFormat(Stream *strm, bool show_unique=false, const char *frame_marker=nullptr)
Print a description for this frame using the frame-format formatter settings.
Definition: StackFrame.cpp:1759
lldb_private::Unwind::GetFramesUpTo
uint32_t GetFramesUpTo(uint32_t end_idx)
Definition: Unwind.h:36
Unwind.h
lldb_private::StackFrameList::SetCurrentInlinedDepth
void SetCurrentInlinedDepth(uint32_t new_depth)
Definition: StackFrameList.cpp:215
lldb_private::StackFrameList::DecrementCurrentInlinedDepth
bool DecrementCurrentInlinedDepth()
Definition: StackFrameList.cpp:202
lldb_private::Function::CalculateSymbolContext
void CalculateSymbolContext(SymbolContext *sc) override
Reconstruct the object's symbol context into sc.
Definition: Function.cpp:405
lldb_private::Function::GetDisplayName
ConstString GetDisplayName() const
Definition: Function.cpp:487
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:249
lldb_private::Thread::CalculateTarget
lldb::TargetSP CalculateTarget() override
Definition: Thread.cpp:1390
BreakpointLocation.h
lldb_private::StackFrameList::m_thread
Thread & m_thread
The thread this frame list describes.
Definition: StackFrameList.h:115
SourceManager.h
lldb::eStopReasonException
@ eStopReasonException
Definition: lldb-enumerations.h:246
StackFrame.h
lldb_private::Stream
Definition: Stream.h:28
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
pc
@ pc
Definition: CompactUnwindInfo.cpp:1250
lldb_private::SymbolContext
Definition: SymbolContext.h:33
lldb_private::Target
Definition: Target.h:447
Process.h
lldb_private::StackFrameList::GetAllFramesFetched
bool GetAllFramesFetched()
Definition: StackFrameList.h:98
lldb_private::StackFrameList::GetStackFrameSPForStackFramePtr
lldb::StackFrameSP GetStackFrameSPForStackFramePtr(StackFrame *stack_frame_ptr)
If stack_frame_ptr is contained in this StackFrameList, return its wrapping shared pointer.
Definition: StackFrameList.cpp:830
CallDescriptor
A sequence of calls that comprise some portion of a backtrace.
Definition: StackFrameList.cpp:245
lldb_private::StackFrameList::SetAllFramesFetched
void SetAllFramesFetched()
Definition: StackFrameList.h:100
Target.h
lldb_private::StackFrame::GetConcreteFrameIndex
uint32_t GetConcreteFrameIndex() const
Query this frame to find what frame it is in this Thread's StackFrameList, not counting inlined frame...
Definition: StackFrame.h:407
lldb_private::StackFrameList
Definition: StackFrameList.h:20
lldb_private::Thread::GetProcess
lldb::ProcessSP GetProcess() const
Definition: Thread.h:154
lldb_private::StackFrameList::GetStatus
size_t GetStatus(Stream &strm, uint32_t first_frame, uint32_t num_frames, bool show_frame_info, uint32_t num_frames_with_source, bool show_unique=false, const char *frame_marker=nullptr)
Definition: StackFrameList.cpp:845
lldb_private::Function
Definition: Function.h:413
lldb_private::LineEntry::ApplyFileMappings
void ApplyFileMappings(lldb::TargetSP target_sp)
Apply file mappings from target.source-map to the LineEntry's file.
Definition: LineEntry.cpp:254
lldb_private::ModuleList
Definition: ModuleList.h:71
Log.h
lldb::eStopReasonWatchpoint
@ eStopReasonWatchpoint
Definition: lldb-enumerations.h:244
lldb_private::Thread
Definition: Thread.h:62
lldb_private::Breakpoint::IsInternal
bool IsInternal() const
Tell whether this breakpoint is an "internal" breakpoint.
Definition: Breakpoint.cpp:259
lldb_private::StackFrameList::GetFramesUpTo
void GetFramesUpTo(uint32_t end_idx)
Definition: StackFrameList.cpp:436
StackFrameList.h
lldb_private::StackFrameList::GetVisibleStackFrameIndex
uint32_t GetVisibleStackFrameIndex(uint32_t idx)
If the current inline depth (i.e the number of invisible frames) is valid, subtract it from idx.
Definition: StackFrameList.h:55
lldb_private::StackID::Dump
void Dump(Stream *s)
Definition: StackID.cpp:17
lldb_private::SymbolContext::function
Function * function
The Function for a given query.
Definition: SymbolContext.h:320
lldb_private::StackFrameList::GetSelectedFrameIndex
uint32_t GetSelectedFrameIndex() const
Get the currently selected frame index.
Definition: StackFrameList.cpp:774
lldb_private::StackFrameList::m_current_inlined_depth
uint32_t m_current_inlined_depth
The number of synthetic function activations (invisible frames) expanded from the concrete frame #0 a...
Definition: StackFrameList.h:144
lldb_private::Block::GetInlinedParent
Block * GetInlinedParent()
Get the inlined parent block for this block.
Definition: Block.cpp:203
lldb_private::AddressRange
Definition: AddressRange.h:25
lldb_private::GetLogIfAllCategoriesSet
Log * GetLogIfAllCategoriesSet(uint32_t mask)
Definition: Logging.cpp:58
lldb_private::CallEdge
Definition: Function.h:271
lldb_private::StackFrame::Kind::Regular
@ Regular
A regular stack frame with access to registers and local variables.
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:38
Thread.h
lldb_private::StackFrameList::m_mutex
std::recursive_mutex m_mutex
A mutex for this frame list.
Definition: StackFrameList.h:128
lldb_private::StackFrameList::SetFrameAtIndex
bool SetFrameAtIndex(uint32_t idx, lldb::StackFrameSP &frame_sp)
Definition: StackFrameList.cpp:763
lldb_private::Function::GetCallEdgeForReturnAddress
CallEdge * GetCallEdgeForReturnAddress(lldb::addr_t return_pc, Target &target)
Get the outgoing call edge from this function which has the given return address return_pc,...
Definition: Function.cpp:329
lldb_private::StackFrameList::SynthesizeTailCallFrames
void SynthesizeTailCallFrames(StackFrame &next_frame)
Given that next_frame will be appended to the frame list, synthesize tail call frames between the cur...
Definition: StackFrameList.cpp:365
lldb_private::LineEntry::line
uint32_t line
The source line number, or zero if there is no line number information.
Definition: LineEntry.h:143
lldb_private::StackFrameList::GetFrameAtIndex
lldb::StackFrameSP GetFrameAtIndex(uint32_t idx)
Get the frame at index idx. Invisible frames cannot be indexed.
Definition: StackFrameList.cpp:647
lldb_private::UserID::GetID
lldb::user_id_t GetID() const
Get accessor for the user ID.
Definition: UserID.h:47
lldb_private::StackFrameList::GetFrameWithStackID
lldb::StackFrameSP GetFrameWithStackID(const StackID &stack_id)
Retrieve the stack frame with the given ID stack_id.
Definition: StackFrameList.cpp:736
CallDescriptor::func
Function * func
Definition: StackFrameList.cpp:246
lldb_private::StackFrame::GetStackID
StackID & GetStackID()
Definition: StackFrame.cpp:143
lldb_private::ExecutionContext::SetFramePtr
void SetFramePtr(StackFrame *frame)
Set accessor to set only the frame shared pointer from a frame pointer.
Definition: ExecutionContext.cpp:283
lldb_private::StackFrameList::ResetCurrentInlinedDepth
void ResetCurrentInlinedDepth()
Definition: StackFrameList.cpp:80
FindInterveningFrames
static void FindInterveningFrames(Function &begin, Function &end, ExecutionContext &exe_ctx, Target &target, addr_t return_pc, CallSequence &path, ModuleList &images, Log *log)
Find the unique path through the call graph from begin (with return PC return_pc) to end.
Definition: StackFrameList.cpp:255
Symbol.h
StreamFile.h
lldb::eStopReasonSignal
@ eStopReasonSignal
Definition: lldb-enumerations.h:245
lldb_private::Thread::GetStopInfo
lldb::StopInfoSP GetStopInfo()
Definition: Thread.cpp:333
lldb_private::StackFrameList::m_prev_frames_sp
lldb::StackFrameListSP m_prev_frames_sp
The old stack frame list.
Definition: StackFrameList.h:122
lldb::eStopReasonExec
@ eStopReasonExec
Program was re-exec'ed.
Definition: lldb-enumerations.h:247
lldb_private::Block
Definition: Block.h:41
CompareStackID
static bool CompareStackID(const StackFrameSP &stack_sp, const StackID &stack_id)
Definition: StackFrameList.cpp:731
uint32_t
lldb_private::StackFrameList::GetOnlyConcreteFramesUpTo
void GetOnlyConcreteFramesUpTo(uint32_t end_idx, Unwind &unwinder)
Definition: StackFrameList.cpp:223
lldb_private::Address
Definition: Address.h:59
lldb_private::CallEdge::GetCallee
virtual Function * GetCallee(ModuleList &images, ExecutionContext &exe_ctx)=0
Get the callee's definition.
lldb_private::Stream::EOL
size_t EOL()
Output and End of Line character to the stream.
Definition: Stream.cpp:128
lldb_private::CallEdge::AddrType::Call
@ Call
lldb_private::StackFrameList::~StackFrameList
~StackFrameList()
Definition: StackFrameList.cpp:49
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:31
lldb_private::StackFrameList::const_iterator
collection::const_iterator const_iterator
Definition: StackFrameList.h:112
lldb_private::SymbolContext::GetParentOfInlinedScope
bool GetParentOfInlinedScope(const Address &curr_frame_pc, SymbolContext &next_frame_sc, Address &inlined_frame_addr) const
Find the block containing the inlined block that contains this block.
Definition: SymbolContext.cpp:439
lldb_private::Thread::GetSelectedFrame
lldb::StackFrameSP GetSelectedFrame()
Definition: Thread.cpp:264
StopInfo.h
lldb_private::StackFrameList::m_show_inlined_frames
const bool m_show_inlined_frames
Whether or not to show synthetic (inline) frames. Immutable.
Definition: StackFrameList.h:152
lldb_private::StackFrameList::GetFrameWithConcreteFrameIndex
lldb::StackFrameSP GetFrameWithConcreteFrameIndex(uint32_t unwind_idx)
Get the first concrete frame with index greater than or equal to idx.
Definition: StackFrameList.cpp:714
lldb::eStopReasonBreakpoint
@ eStopReasonBreakpoint
Definition: lldb-enumerations.h:243
LLDB_INVALID_ADDRESS
#define LLDB_INVALID_ADDRESS
Invalid value definitions.
Definition: lldb-defines.h:85
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::CallEdge::AddrType
AddrType
Definition: Function.h:273
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
CallSequence
std::vector< CallDescriptor > CallSequence
Definition: StackFrameList.cpp:250
lldb_private::StackFrame::Kind::Artificial
@ Artificial
An artificial stack frame (e.g.
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::Function::GetCallEdges
llvm::ArrayRef< std::unique_ptr< CallEdge > > GetCallEdges()
Get the outgoing call edges from this function, sorted by their return PC addresses (in increasing or...
Definition: Function.cpp:292
Breakpoint.h
lldb_private::StackFrame::GetRegisterContext
lldb::RegisterContextSP GetRegisterContext()
Get the RegisterContext for this frame, if possible.
Definition: StackFrame.cpp:1123
LIBLLDB_LOG_STEP
#define LIBLLDB_LOG_STEP
Definition: Logging.h:21
lldb_private::Thread::IsValid
bool IsValid() const
Definition: Thread.h:1106
lldb_private::StackID::IsValid
bool IsValid() const
Definition: StackID.h:49
lldb_private::StackFrameList::m_frames
collection m_frames
A cache of frames.
Definition: StackFrameList.h:132
lldb_private::StackFrameList::GetCurrentInlinedDepth
uint32_t GetCurrentInlinedDepth()
Definition: StackFrameList.cpp:62
lldb_private::StackID
Definition: StackID.h:17
lldb_private::StreamFile
Definition: StreamFile.h:22
lldb_private::Log
Definition: Log.h:49
lldb_private::Stream::PutCString
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
Definition: Stream.cpp:63
lldb_private::SymbolContext::line_entry
LineEntry line_entry
The LineEntry for a given query.
Definition: SymbolContext.h:322
lldb_private::Thread::GetRegisterContext
virtual lldb::RegisterContextSP GetRegisterContext()=0
lldb_private::StackFrameList::Dump
void Dump(Stream *s)
Definition: StackFrameList.cpp:627
lldb_private::StackFrame
Definition: StackFrame.h:40
lldb_private::StackFrameList::SetDefaultFileAndLineToSelectedFrame
void SetDefaultFileAndLineToSelectedFrame()
If the currently selected frame comes from the currently selected thread, point the default file and ...
Definition: StackFrameList.cpp:808
lldb::eStopReasonVForkDone
@ eStopReasonVForkDone
Definition: lldb-enumerations.h:254
lldb_private::Unwind
Definition: Unwind.h:18
lldb_private::StackFrameList::CalculateCurrentInlinedDepth
void CalculateCurrentInlinedDepth()
Calculate and set the current inline depth.
Definition: StackFrameList.cpp:55
lldb
Definition: SBAddress.h:15
lldb_private::StackFrameList::SetSelectedFrameByIndex
bool SetSelectedFrameByIndex(uint32_t idx)
Mark a stack frame as the currently selected frame using the frame index idx.
Definition: StackFrameList.cpp:798
RegisterContext.h
lldb::eStopReasonFork
@ eStopReasonFork
Definition: lldb-enumerations.h:252
lldb_private::StackFrame::GetSymbolContext
const SymbolContext & GetSymbolContext(lldb::SymbolContextItem resolve_scope)
Provide a SymbolContext for this StackFrame's current pc value.
Definition: StackFrame.cpp:298
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_private::StackFrame::UpdatePreviousFrameFromCurrentFrame
void UpdatePreviousFrameFromCurrentFrame(StackFrame &curr_frame)
Definition: StackFrame.cpp:1825
lldb_private::StackFrameList::m_concrete_frames_fetched
uint32_t m_concrete_frames_fetched
The number of concrete frames fetched while filling the frame list.
Definition: StackFrameList.h:139
lldb_private::StackFrameList::m_selected_frame_idx
uint32_t m_selected_frame_idx
The currently selected frame.
Definition: StackFrameList.h:135