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 #include <vector> 14 15 #include "lldb/Target/Unwind.h" 16 #include "lldb/lldb-private.h" 17 18 namespace lldb_private { 19 20 class HistoryUnwind : public lldb_private::Unwind { 21 public: 22 HistoryUnwind(Thread &thread, std::vector<lldb::addr_t> pcs, 23 bool stop_id_is_valid); 24 25 ~HistoryUnwind() override; 26 27 protected: 28 void DoClear() override; 29 30 lldb::RegisterContextSP 31 DoCreateRegisterContextForFrame(StackFrame *frame) override; 32 33 bool DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa, 34 lldb::addr_t &pc) override; 35 uint32_t DoGetFrameCount() override; 36 37 private: 38 std::vector<lldb::addr_t> m_pcs; 39 bool m_stop_id_is_valid; 40 }; 41 42 } // namespace lldb_private 43 44 #endif // liblldb_HistoryUnwind_h_ 45