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