]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / source / Plugins / UnwindAssembly / x86 / UnwindAssembly-x86.h
1 //===-- UnwindAssembly-x86.h ------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef liblldb_UnwindAssembly_x86_h_
10 #define liblldb_UnwindAssembly_x86_h_
11
12 #include "x86AssemblyInspectionEngine.h"
13
14 #include "lldb/Target/UnwindAssembly.h"
15 #include "lldb/lldb-private.h"
16
17 class UnwindAssembly_x86 : public lldb_private::UnwindAssembly {
18 public:
19   ~UnwindAssembly_x86() override;
20
21   bool GetNonCallSiteUnwindPlanFromAssembly(
22       lldb_private::AddressRange &func, lldb_private::Thread &thread,
23       lldb_private::UnwindPlan &unwind_plan) override;
24
25   bool
26   AugmentUnwindPlanFromCallSite(lldb_private::AddressRange &func,
27                                 lldb_private::Thread &thread,
28                                 lldb_private::UnwindPlan &unwind_plan) override;
29
30   bool GetFastUnwindPlan(lldb_private::AddressRange &func,
31                          lldb_private::Thread &thread,
32                          lldb_private::UnwindPlan &unwind_plan) override;
33
34   // thread may be NULL in which case we only use the Target (e.g. if this is
35   // called pre-process-launch).
36   bool
37   FirstNonPrologueInsn(lldb_private::AddressRange &func,
38                        const lldb_private::ExecutionContext &exe_ctx,
39                        lldb_private::Address &first_non_prologue_insn) override;
40
41   static lldb_private::UnwindAssembly *
42   CreateInstance(const lldb_private::ArchSpec &arch);
43
44   // PluginInterface protocol
45   static void Initialize();
46
47   static void Terminate();
48
49   static lldb_private::ConstString GetPluginNameStatic();
50
51   static const char *GetPluginDescriptionStatic();
52
53   lldb_private::ConstString GetPluginName() override;
54
55   uint32_t GetPluginVersion() override;
56
57 private:
58   UnwindAssembly_x86(const lldb_private::ArchSpec &arch);
59
60   lldb_private::ArchSpec m_arch;
61
62   lldb_private::x86AssemblyInspectionEngine *m_assembly_inspection_engine;
63 };
64
65 #endif // liblldb_UnwindAssembly_x86_h_