]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h
Vendor import of stripped lldb trunk r256633:
[FreeBSD/FreeBSD.git] / source / Plugins / UnwindAssembly / x86 / UnwindAssembly-x86.h
1 //===-- UnwindAssembly-x86.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_UnwindAssembly_x86_h_
11 #define liblldb_UnwindAssembly_x86_h_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 #include "llvm-c/Disassembler.h"
17
18 // Project includes
19 #include "lldb/lldb-private.h"
20 #include "lldb/Target/UnwindAssembly.h"
21
22 class UnwindAssembly_x86 : public lldb_private::UnwindAssembly
23 {
24 public:
25     ~UnwindAssembly_x86() override;
26
27     bool
28     GetNonCallSiteUnwindPlanFromAssembly(lldb_private::AddressRange& func,
29                                          lldb_private::Thread& thread,
30                                          lldb_private::UnwindPlan& unwind_plan) override;
31
32     bool
33     AugmentUnwindPlanFromCallSite(lldb_private::AddressRange& func,
34                                   lldb_private::Thread& thread,
35                                   lldb_private::UnwindPlan& unwind_plan) override;
36
37     bool
38     GetFastUnwindPlan(lldb_private::AddressRange& func,
39                       lldb_private::Thread& thread,
40                       lldb_private::UnwindPlan &unwind_plan) override;
41
42     // thread may be NULL in which case we only use the Target (e.g. if this is called pre-process-launch).
43     bool
44     FirstNonPrologueInsn(lldb_private::AddressRange& func,
45                          const lldb_private::ExecutionContext &exe_ctx,
46                          lldb_private::Address& first_non_prologue_insn) override;
47
48     static lldb_private::UnwindAssembly *
49     CreateInstance (const lldb_private::ArchSpec &arch);
50
51     //------------------------------------------------------------------
52     // PluginInterface protocol
53     //------------------------------------------------------------------
54     static void
55     Initialize();
56
57     static void
58     Terminate();
59
60     static lldb_private::ConstString
61     GetPluginNameStatic();
62
63     static const char *
64     GetPluginDescriptionStatic();
65
66     lldb_private::ConstString
67     GetPluginName() override;
68     
69     uint32_t
70     GetPluginVersion() override;
71     
72 private:
73     UnwindAssembly_x86 (const lldb_private::ArchSpec &arch, int cpu);
74
75     int m_cpu;
76     lldb_private::ArchSpec m_arch;
77 };
78
79 #endif // liblldb_UnwindAssembly_x86_h_