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