003 File Manager
Current Path:
/usr/src/contrib/llvm-project/lldb/include/lldb/Target
usr
/
src
/
contrib
/
llvm-project
/
lldb
/
include
/
lldb
/
Target
/
📁
..
📄
ABI.h
(7 KB)
📄
AssertFrameRecognizer.h
(1.79 KB)
📄
DynamicLoader.h
(12.8 KB)
📄
ExecutionContext.h
(23.91 KB)
📄
ExecutionContextScope.h
(2.07 KB)
📄
InstrumentationRuntime.h
(3.06 KB)
📄
InstrumentationRuntimeStopInfo.h
(1.3 KB)
📄
JITLoader.h
(2.15 KB)
📄
JITLoaderList.h
(1.17 KB)
📄
Language.h
(9.42 KB)
📄
LanguageRuntime.h
(6.71 KB)
📄
Memory.h
(4.66 KB)
📄
MemoryHistory.h
(998 B)
📄
MemoryRegionInfo.h
(4.76 KB)
📄
ModuleCache.h
(2.42 KB)
📄
OperatingSystem.h
(2.66 KB)
📄
PathMappingList.h
(4.09 KB)
📄
Platform.h
(42.4 KB)
📄
Process.h
(110.8 KB)
📄
ProcessStructReader.h
(3.27 KB)
📄
Queue.h
(5.04 KB)
📄
QueueItem.h
(5.24 KB)
📄
QueueList.h
(3.32 KB)
📄
RegisterCheckpoint.h
(1.89 KB)
📄
RegisterContext.h
(7.73 KB)
📄
RegisterContextUnwind.h
(9.73 KB)
📄
RegisterNumber.h
(1.71 KB)
📄
RemoteAwarePlatform.h
(3.76 KB)
📄
SectionLoadHistory.h
(2.79 KB)
📄
SectionLoadList.h
(2.36 KB)
📄
StackFrame.h
(20.05 KB)
📄
StackFrameList.h
(5.83 KB)
📄
StackFrameRecognizer.h
(5.65 KB)
📄
StackID.h
(3.16 KB)
📄
StopInfo.h
(6.92 KB)
📄
StructuredDataPlugin.h
(7.14 KB)
📄
SystemRuntime.h
(11.83 KB)
📄
Target.h
(49.2 KB)
📄
TargetList.h
(7.75 KB)
📄
Thread.h
(49.21 KB)
📄
ThreadCollection.h
(1.63 KB)
📄
ThreadList.h
(4.65 KB)
📄
ThreadPlan.h
(24.41 KB)
📄
ThreadPlanBase.h
(1.79 KB)
📄
ThreadPlanCallFunction.h
(5.55 KB)
📄
ThreadPlanCallFunctionUsingABI.h
(1.98 KB)
📄
ThreadPlanCallOnFunctionExit.h
(1.56 KB)
📄
ThreadPlanCallUserExpression.h
(2.21 KB)
📄
ThreadPlanPython.h
(2.11 KB)
📄
ThreadPlanRunToAddress.h
(2.04 KB)
📄
ThreadPlanShouldStopHere.h
(5.02 KB)
📄
ThreadPlanStack.h
(5.48 KB)
📄
ThreadPlanStepInRange.h
(4.66 KB)
📄
ThreadPlanStepInstruction.h
(1.86 KB)
📄
ThreadPlanStepOut.h
(3.67 KB)
📄
ThreadPlanStepOverBreakpoint.h
(1.84 KB)
📄
ThreadPlanStepOverRange.h
(1.83 KB)
📄
ThreadPlanStepRange.h
(3.69 KB)
📄
ThreadPlanStepThrough.h
(1.97 KB)
📄
ThreadPlanStepUntil.h
(2.12 KB)
📄
ThreadPlanTracer.h
(2.32 KB)
📄
ThreadSpec.h
(3.35 KB)
📄
UnixSignals.h
(4.25 KB)
📄
Unwind.h
(2.4 KB)
📄
UnwindAssembly.h
(1.81 KB)
📄
UnwindLLDB.h
(5.69 KB)
Editing: StackFrameList.h
//===-- StackFrameList.h ----------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLDB_TARGET_STACKFRAMELIST_H #define LLDB_TARGET_STACKFRAMELIST_H #include <memory> #include <mutex> #include <vector> #include "lldb/Target/StackFrame.h" namespace lldb_private { class StackFrameList { public: // Constructors and Destructors StackFrameList(Thread &thread, const lldb::StackFrameListSP &prev_frames_sp, bool show_inline_frames); ~StackFrameList(); /// Get the number of visible frames. Frames may be created if \p can_create /// is true. Synthetic (inline) frames expanded from the concrete frame #0 /// (aka invisible frames) are not included in this count. uint32_t GetNumFrames(bool can_create = true); /// Get the frame at index \p idx. Invisible frames cannot be indexed. lldb::StackFrameSP GetFrameAtIndex(uint32_t idx); /// Get the first concrete frame with index greater than or equal to \p idx. /// Unlike \ref GetFrameAtIndex, this cannot return a synthetic frame. lldb::StackFrameSP GetFrameWithConcreteFrameIndex(uint32_t unwind_idx); /// Retrieve the stack frame with the given ID \p stack_id. lldb::StackFrameSP GetFrameWithStackID(const StackID &stack_id); /// Mark a stack frame as the currently selected frame and return its index. uint32_t SetSelectedFrame(lldb_private::StackFrame *frame); /// Get the currently selected frame index. uint32_t GetSelectedFrameIndex() const; /// Mark a stack frame as the currently selected frame using the frame index /// \p idx. Like \ref GetFrameAtIndex, invisible frames cannot be selected. bool SetSelectedFrameByIndex(uint32_t idx); /// If the current inline depth (i.e the number of invisible frames) is valid, /// subtract it from \p idx. Otherwise simply return \p idx. uint32_t GetVisibleStackFrameIndex(uint32_t idx) { if (m_current_inlined_depth < UINT32_MAX) return idx - m_current_inlined_depth; else return idx; } /// Calculate and set the current inline depth. This may be used to update /// the StackFrameList's set of inline frames when execution stops, e.g when /// a breakpoint is hit. void CalculateCurrentInlinedDepth(); /// If the currently selected frame comes from the currently selected thread, /// point the default file and line of the thread's target to the location /// specified by the frame. void SetDefaultFileAndLineToSelectedFrame(); /// Clear the cache of frames. void Clear(); void Dump(Stream *s); /// If \p stack_frame_ptr is contained in this StackFrameList, return its /// wrapping shared pointer. lldb::StackFrameSP GetStackFrameSPForStackFramePtr(StackFrame *stack_frame_ptr); 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); protected: friend class Thread; bool SetFrameAtIndex(uint32_t idx, lldb::StackFrameSP &frame_sp); static void Merge(std::unique_ptr<StackFrameList> &curr_up, lldb::StackFrameListSP &prev_sp); void GetFramesUpTo(uint32_t end_idx); void GetOnlyConcreteFramesUpTo(uint32_t end_idx, Unwind &unwinder); void SynthesizeTailCallFrames(StackFrame &next_frame); bool GetAllFramesFetched() { return m_concrete_frames_fetched == UINT32_MAX; } void SetAllFramesFetched() { m_concrete_frames_fetched = UINT32_MAX; } bool DecrementCurrentInlinedDepth(); void ResetCurrentInlinedDepth(); uint32_t GetCurrentInlinedDepth(); void SetCurrentInlinedDepth(uint32_t new_depth); typedef std::vector<lldb::StackFrameSP> collection; typedef collection::iterator iterator; typedef collection::const_iterator const_iterator; /// The thread this frame list describes. Thread &m_thread; /// The old stack frame list. // TODO: The old stack frame list is used to fill in missing frame info // heuristically when it's otherwise unavailable (say, because the unwinder // fails). We should have stronger checks to make sure that this is a valid // source of information. lldb::StackFrameListSP m_prev_frames_sp; /// A mutex for this frame list. // TODO: This mutex may not always be held when required. In particular, uses // of the StackFrameList APIs in lldb_private::Thread look suspect. Consider // passing around a lock_guard reference to enforce proper locking. mutable std::recursive_mutex m_mutex; /// A cache of frames. This may need to be updated when the program counter /// changes. collection m_frames; /// The currently selected frame. uint32_t m_selected_frame_idx; /// The number of concrete frames fetched while filling the frame list. This /// is only used when synthetic frames are enabled. uint32_t m_concrete_frames_fetched; /// The number of synthetic function activations (invisible frames) expanded /// from the concrete frame #0 activation. // TODO: Use an optional instead of UINT32_MAX to denote invalid values. uint32_t m_current_inlined_depth; /// The program counter value at the currently selected synthetic activation. /// This is only valid if m_current_inlined_depth is valid. // TODO: Use an optional instead of UINT32_MAX to denote invalid values. lldb::addr_t m_current_inlined_pc; /// Whether or not to show synthetic (inline) frames. Immutable. const bool m_show_inlined_frames; private: StackFrameList(const StackFrameList &) = delete; const StackFrameList &operator=(const StackFrameList &) = delete; }; } // namespace lldb_private #endif // LLDB_TARGET_STACKFRAMELIST_H
Upload File
Create Folder