LLDB  mainline
UnwindAssembly.h
Go to the documentation of this file.
1 //===-- UnwindAssembly.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 LLDB_TARGET_UNWINDASSEMBLY_H
10 #define LLDB_TARGET_UNWINDASSEMBLY_H
11 
13 #include "lldb/Utility/ArchSpec.h"
14 #include "lldb/lldb-private.h"
15 
16 namespace lldb_private {
17 
18 class UnwindAssembly : public std::enable_shared_from_this<UnwindAssembly>,
19  public PluginInterface {
20 public:
21  static lldb::UnwindAssemblySP FindPlugin(const ArchSpec &arch);
22 
23  ~UnwindAssembly() override;
24 
25  virtual bool
27  UnwindPlan &unwind_plan) = 0;
28 
29  virtual bool AugmentUnwindPlanFromCallSite(AddressRange &func, Thread &thread,
30  UnwindPlan &unwind_plan) = 0;
31 
32  virtual bool GetFastUnwindPlan(AddressRange &func, Thread &thread,
33  UnwindPlan &unwind_plan) = 0;
34 
35  // thread may be NULL in which case we only use the Target (e.g. if this is
36  // called pre-process-launch).
37  virtual bool
39  const lldb_private::ExecutionContext &exe_ctx,
40  Address &first_non_prologue_insn) = 0;
41 
42 protected:
43  UnwindAssembly(const ArchSpec &arch);
45 
46 private:
47  UnwindAssembly() = delete;
48  UnwindAssembly(const UnwindAssembly &) = delete;
49  const UnwindAssembly &operator=(const UnwindAssembly &) = delete;
50 };
51 
52 } // namespace lldb_private
53 
54 #endif // LLDB_TARGET_UNWINDASSEMBLY_H
A class that represents a running process on the host machine.
An architecture specification class.
Definition: ArchSpec.h:33
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
static lldb::UnwindAssemblySP FindPlugin(const ArchSpec &arch)
virtual bool GetNonCallSiteUnwindPlanFromAssembly(AddressRange &func, Thread &thread, UnwindPlan &unwind_plan)=0
virtual bool GetFastUnwindPlan(AddressRange &func, Thread &thread, UnwindPlan &unwind_plan)=0
virtual bool FirstNonPrologueInsn(AddressRange &func, const lldb_private::ExecutionContext &exe_ctx, Address &first_non_prologue_insn)=0
A section + offset based address class.
Definition: Address.h:59
virtual bool AugmentUnwindPlanFromCallSite(AddressRange &func, Thread &thread, UnwindPlan &unwind_plan)=0
const UnwindAssembly & operator=(const UnwindAssembly &)=delete
A section + offset based address range class.
Definition: AddressRange.h:25