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