HistoryUnwind.h revision 360784
1//===-- HistoryUnwind.h -----------------------------------------*- C++ -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9#ifndef liblldb_HistoryUnwind_h_ 10#define liblldb_HistoryUnwind_h_ 11 12#include <vector> 13 14#include "lldb/Target/Unwind.h" 15#include "lldb/lldb-private.h" 16 17namespace lldb_private { 18 19class HistoryUnwind : public lldb_private::Unwind { 20public: 21 HistoryUnwind(Thread &thread, std::vector<lldb::addr_t> pcs); 22 23 ~HistoryUnwind() override; 24 25protected: 26 void DoClear() override; 27 28 lldb::RegisterContextSP 29 DoCreateRegisterContextForFrame(StackFrame *frame) override; 30 31 bool DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa, 32 lldb::addr_t &pc, 33 bool &behaves_like_zeroth_frame) override; 34 uint32_t DoGetFrameCount() override; 35 36private: 37 std::vector<lldb::addr_t> m_pcs; 38}; 39 40} // namespace lldb_private 41 42#endif // liblldb_HistoryUnwind_h_ 43