]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryUnwind.h
Merge ^/head r294169 through r294598.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / source / Plugins / Process / Utility / HistoryUnwind.h
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/Host/Mutex.h"
21 #include "lldb/Target/Unwind.h"
22
23 namespace lldb_private {
24
25 class HistoryUnwind : public lldb_private::Unwind
26 {
27 public:
28     HistoryUnwind (Thread &thread, std::vector<lldb::addr_t> pcs, bool stop_id_is_valid);
29
30     ~HistoryUnwind() override;
31
32 protected:
33     void
34     DoClear() override;
35
36     lldb::RegisterContextSP
37     DoCreateRegisterContextForFrame(StackFrame *frame) override;
38
39     bool
40     DoGetFrameInfoAtIndex(uint32_t frame_idx,
41                           lldb::addr_t& cfa, 
42                           lldb::addr_t& pc) override;
43     uint32_t
44     DoGetFrameCount() override;
45
46 private:
47
48     std::vector<lldb::addr_t>   m_pcs;
49     bool                        m_stop_id_is_valid;
50 };
51
52 } // namespace lldb_private
53
54 #endif // liblldb_HistoryUnwind_h_