1 //===-- HistoryUnwind.h -----------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef liblldb_HistoryUnwind_h_ 11 #define liblldb_HistoryUnwind_h_ 12 13 // C Includes 14 // C++ Includes 15 #include <vector> 16 17 // Other libraries and framework includes 18 // Project includes 19 #include "lldb/Target/Unwind.h" 20 #include "lldb/lldb-private.h" 21 22 namespace lldb_private { 23 24 class HistoryUnwind : public lldb_private::Unwind { 25 public: 26 HistoryUnwind(Thread &thread, std::vector<lldb::addr_t> pcs, 27 bool stop_id_is_valid); 28 29 ~HistoryUnwind() override; 30 31 protected: 32 void DoClear() override; 33 34 lldb::RegisterContextSP 35 DoCreateRegisterContextForFrame(StackFrame *frame) override; 36 37 bool DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa, 38 lldb::addr_t &pc) override; 39 uint32_t DoGetFrameCount() override; 40 41 private: 42 std::vector<lldb::addr_t> m_pcs; 43 bool m_stop_id_is_valid; 44 }; 45 46 } // namespace lldb_private 47 48 #endif // liblldb_HistoryUnwind_h_ 49