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