]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Target/UnwindAssembly.h
MFV r266995:
[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/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     virtual
28     ~UnwindAssembly();
29
30     virtual bool
31     GetNonCallSiteUnwindPlanFromAssembly (AddressRange& func, 
32                                           Thread& thread, 
33                                           UnwindPlan& unwind_plan) = 0;
34
35     virtual bool
36     AugmentUnwindPlanFromCallSite (AddressRange& func,
37                                    Thread& thread,
38                                    UnwindPlan& unwind_plan) = 0;
39
40     virtual bool
41     GetFastUnwindPlan (AddressRange& func, 
42                        Thread& thread, 
43                        UnwindPlan &unwind_plan) = 0;
44
45     // thread may be NULL in which case we only use the Target (e.g. if this is called pre-process-launch).
46     virtual bool
47     FirstNonPrologueInsn (AddressRange& func, 
48                           const lldb_private::ExecutionContext &exe_ctx,
49                           Address& first_non_prologue_insn) = 0;
50
51 protected:
52     UnwindAssembly (const ArchSpec &arch);
53     ArchSpec m_arch;
54
55 private:
56     UnwindAssembly(); // Outlaw default constructor
57     DISALLOW_COPY_AND_ASSIGN (UnwindAssembly);
58 };
59
60 } // namespace lldb_private
61
62 #endif //utility_UnwindAssembly_h_
63
64