1296417Sdim//===-- UnwindAssembly-x86.h ------------------------------------*- C++ -*-===//
2254721Semaste//
3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4353358Sdim// See https://llvm.org/LICENSE.txt for license information.
5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6254721Semaste//
7254721Semaste//===----------------------------------------------------------------------===//
8254721Semaste
9254721Semaste#ifndef liblldb_UnwindAssembly_x86_h_
10254721Semaste#define liblldb_UnwindAssembly_x86_h_
11254721Semaste
12314564Sdim#include "x86AssemblyInspectionEngine.h"
13254721Semaste
14314564Sdim#include "lldb/Target/UnwindAssembly.h"
15254721Semaste#include "lldb/lldb-private.h"
16254721Semaste
17314564Sdimclass UnwindAssembly_x86 : public lldb_private::UnwindAssembly {
18254721Semastepublic:
19314564Sdim  ~UnwindAssembly_x86() override;
20254721Semaste
21314564Sdim  bool GetNonCallSiteUnwindPlanFromAssembly(
22314564Sdim      lldb_private::AddressRange &func, lldb_private::Thread &thread,
23314564Sdim      lldb_private::UnwindPlan &unwind_plan) override;
24254721Semaste
25314564Sdim  bool
26314564Sdim  AugmentUnwindPlanFromCallSite(lldb_private::AddressRange &func,
27314564Sdim                                lldb_private::Thread &thread,
28314564Sdim                                lldb_private::UnwindPlan &unwind_plan) override;
29254721Semaste
30314564Sdim  bool GetFastUnwindPlan(lldb_private::AddressRange &func,
31314564Sdim                         lldb_private::Thread &thread,
32314564Sdim                         lldb_private::UnwindPlan &unwind_plan) override;
33276479Sdim
34314564Sdim  // thread may be NULL in which case we only use the Target (e.g. if this is
35314564Sdim  // called pre-process-launch).
36314564Sdim  bool
37314564Sdim  FirstNonPrologueInsn(lldb_private::AddressRange &func,
38314564Sdim                       const lldb_private::ExecutionContext &exe_ctx,
39314564Sdim                       lldb_private::Address &first_non_prologue_insn) override;
40254721Semaste
41314564Sdim  static lldb_private::UnwindAssembly *
42314564Sdim  CreateInstance(const lldb_private::ArchSpec &arch);
43254721Semaste
44314564Sdim  // PluginInterface protocol
45314564Sdim  static void Initialize();
46254721Semaste
47314564Sdim  static void Terminate();
48254721Semaste
49314564Sdim  static lldb_private::ConstString GetPluginNameStatic();
50254721Semaste
51314564Sdim  static const char *GetPluginDescriptionStatic();
52254721Semaste
53314564Sdim  lldb_private::ConstString GetPluginName() override;
54314564Sdim
55314564Sdim  uint32_t GetPluginVersion() override;
56314564Sdim
57254721Semasteprivate:
58314564Sdim  UnwindAssembly_x86(const lldb_private::ArchSpec &arch);
59254721Semaste
60314564Sdim  lldb_private::ArchSpec m_arch;
61314564Sdim
62314564Sdim  lldb_private::x86AssemblyInspectionEngine *m_assembly_inspection_engine;
63254721Semaste};
64254721Semaste
65254721Semaste#endif // liblldb_UnwindAssembly_x86_h_
66