]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Target/UnwindAssembly.h
MFV r329774:
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Target / UnwindAssembly.h
1 //===-- UnwindAssembly.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 utility_UnwindAssembly_h_
11 #define utility_UnwindAssembly_h_
12
13 #include "lldb/Core/PluginInterface.h"
14 #include "lldb/Utility/ArchSpec.h"
15 #include "lldb/lldb-private.h"
16
17 namespace lldb_private {
18
19 class UnwindAssembly : public std::enable_shared_from_this<UnwindAssembly>,
20                        public PluginInterface {
21 public:
22   static lldb::UnwindAssemblySP FindPlugin(const ArchSpec &arch);
23
24   ~UnwindAssembly() override;
25
26   virtual bool
27   GetNonCallSiteUnwindPlanFromAssembly(AddressRange &func, Thread &thread,
28                                        UnwindPlan &unwind_plan) = 0;
29
30   virtual bool AugmentUnwindPlanFromCallSite(AddressRange &func, Thread &thread,
31                                              UnwindPlan &unwind_plan) = 0;
32
33   virtual bool GetFastUnwindPlan(AddressRange &func, Thread &thread,
34                                  UnwindPlan &unwind_plan) = 0;
35
36   // thread may be NULL in which case we only use the Target (e.g. if this is
37   // called pre-process-launch).
38   virtual bool
39   FirstNonPrologueInsn(AddressRange &func,
40                        const lldb_private::ExecutionContext &exe_ctx,
41                        Address &first_non_prologue_insn) = 0;
42
43 protected:
44   UnwindAssembly(const ArchSpec &arch);
45   ArchSpec m_arch;
46
47 private:
48   UnwindAssembly(); // Outlaw default constructor
49   DISALLOW_COPY_AND_ASSIGN(UnwindAssembly);
50 };
51
52 } // namespace lldb_private
53
54 #endif // utility_UnwindAssembly_h_