Lines Matching +full:fetch +full:- +full:depth
1 //===-- StackFrameList.cpp ------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
47 m_current_inlined_depth = prev_frames_sp->m_current_inlined_depth;
48 m_current_inlined_pc = prev_frames_sp->m_current_inlined_pc;
68 lldb::addr_t cur_pc = m_thread.GetRegisterContext()->GetPC();
73 if (log && log->GetVerbose())
76 "GetCurrentInlinedDepth: invalidating current inlined depth.\n");
93 auto inline_depth = stop_info_sp->GetSuggestedStackFrameIndex(inlined);
99 m_current_inlined_pc = m_thread.GetRegisterContext()->GetPC();
101 if (log && log->GetVerbose())
104 "depth: %d 0x%" PRIx64 ".\n",
110 if (log && log->GetVerbose())
113 "ResetCurrentInlinedDepth: Invalidating current inlined depth.\n");
123 m_current_inlined_depth--;
137 m_current_inlined_pc = m_thread.GetRegisterContext()->GetPC();
164 LLDB_LOG(log, "Finding frames between {0} and {1}, retn-pc={2:x}",
167 // Find a non-tail calling edge with the correct return PC.
170 LLDB_LOG(log, "FindInterveningFrames: found call with retn-PC = {0:x}",
171 edge->GetReturnPCAddress(begin, target));
174 LLDB_LOG(log, "No call edge outgoing from {0} with retn-PC == {1:x}",
180 Function *first_callee = first_edge->GetCallee(images, exe_ctx);
186 LLDB_LOG(log, "Not searching further, first callee is {0} (retn-PC: {1:x})",
191 // Run DFS on the tail-calling edges out of the first callee to find \p end.
237 Function *next_callee = edge->GetCallee(images, context);
242 edge->GetCallerAddress(callee, target);
259 /// --------------
260 /// | ... | <- Completed frames.
261 /// --------------
263 /// --------------
264 /// | ... | <- Artificial frames inserted here.
265 /// --------------
267 /// --------------
268 /// | ... | <- Not-yet-visited frames.
269 /// --------------
306 addr_t return_pc = next_reg_ctx_sp->GetPC();
308 ModuleList &images = next_frame.CalculateTarget()->GetImages();
327 callee->CalculateSymbolContext(&sc);
333 LLDB_LOG(log, "Pushed frame {0} at {1:x}", callee->GetDisplayName(), pc);
351 // Do not fetch frames for an invalid thread.
406 // those onto the total count of frames to fetch. However, we don't need
421 Debugger &dbg = m_thread.GetProcess()->GetTarget().GetDebugger();
440 cfa = reg_ctx_sp->GetSP();
441 pc = reg_ctx_sp->GetPC();
451 cfa = unwind_frame_sp->m_id.GetCallFrameAddress();
476 // newly-found frame. The new frame's index may change after this call,
484 SymbolContext unwind_sc = unwind_frame_sp->GetSymbolContext(
490 unwind_frame_sp->GetFrameCodeAddressForSymbolication());
501 unwind_frame_sp->GetRegisterContextSP(), cfa, next_frame_address,
509 } while (m_frames.size() - 1 < end_idx);
518 prev_frames->Dump(&s);
520 curr_frames->Dump(&s);
525 for (curr_frame_num = curr_frames->m_frames.size(),
526 prev_frame_num = prev_frames->m_frames.size();
528 --curr_frame_num, --prev_frame_num) {
529 const size_t curr_frame_idx = curr_frame_num - 1;
530 const size_t prev_frame_idx = prev_frame_num - 1;
531 StackFrameSP curr_frame_sp(curr_frames->m_frames[curr_frame_idx]);
532 StackFrameSP prev_frame_sp(prev_frames->m_frames[prev_frame_idx]);
537 curr_frame_sp->Dump(&s, true, false);
542 prev_frame_sp->Dump(&s, true, false);
554 if (curr_frame->GetStackID() != prev_frame->GetStackID())
557 prev_frame->UpdatePreviousFrameFromCurrentFrame(*curr_frame);
597 s->Printf("%p: ", static_cast<void *>(frame));
599 frame->GetStackID().Dump(s);
600 frame->DumpUsingSettingsFormat(s);
602 s->Printf("frame #%u", (uint32_t)std::distance(begin, pos));
603 s->EOL();
605 s->EOL();
646 // depth and return the real zeroth frame.
666 // frames (frame unwind indexes go from 0-4), but we might have 15 frames
672 if (frame_sp->GetFrameIndex() == unwind_idx)
681 return stack_sp->GetStackID() < stack_id;
696 if (pos != m_frames.end() && (*pos)->GetStackID() == stack_id)
702 if (frame_sp && frame_sp->GetStackID() == stack_id)
726 if (m_thread.GetProcess()->CurrentThreadIsPrivateStateThread())
738 RecognizedStackFrameSP recognized_frame_sp = frame_sp->GetRecognizedFrame();
742 recognized_frame_sp->GetMostRelevantFrame()) {
744 most_relevant_frame_sp->GetFrameIndex());
751 // If this thread has a non-trivial StopInfo, then let it suggest
762 stop_info_sp->GetSuggestedStackFrameIndex(inlined);
808 if (pos->get() == frame) {
812 m_selected_frame_idx = *m_selected_frame_idx - inlined_depth;
831 m_thread.GetProcess()->GetThreadList().GetSelectedThread()->GetID()) {
835 SymbolContext sc = frame_sp->GetSymbolContext(eSymbolContextLineEntry);
837 m_thread.CalculateTarget()->GetSourceManager().SetDefaultFileAndLine(
845 // Note, we don't actually re-use StackFrameLists, we always make a new
866 if (pos->get() == stack_frame_ptr) {
917 if (!show_hidden && frame_sp != selected_frame_sp && frame_sp->IsHidden())
922 Debugger &dbg = m_thread.GetProcess()->GetTarget().GetDebugger();
929 if (!frame_sp->GetStatus(strm, show_frame_info,
930 num_frames_with_source > (first_frame - frame_idx),