UnwindAssembly.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #ifndef LLDB_TARGET_UNWINDASSEMBLY_H
  9. #define LLDB_TARGET_UNWINDASSEMBLY_H
  10. #include "lldb/Core/PluginInterface.h"
  11. #include "lldb/Utility/ArchSpec.h"
  12. #include "lldb/lldb-private.h"
  13. namespace lldb_private {
  14. class UnwindAssembly : public std::enable_shared_from_this<UnwindAssembly>,
  15. public PluginInterface {
  16. public:
  17. static lldb::UnwindAssemblySP FindPlugin(const ArchSpec &arch);
  18. virtual bool
  19. GetNonCallSiteUnwindPlanFromAssembly(AddressRange &func, Thread &thread,
  20. UnwindPlan &unwind_plan) = 0;
  21. virtual bool AugmentUnwindPlanFromCallSite(AddressRange &func, Thread &thread,
  22. UnwindPlan &unwind_plan) = 0;
  23. virtual bool GetFastUnwindPlan(AddressRange &func, Thread &thread,
  24. UnwindPlan &unwind_plan) = 0;
  25. // thread may be NULL in which case we only use the Target (e.g. if this is
  26. // called pre-process-launch).
  27. virtual bool
  28. FirstNonPrologueInsn(AddressRange &func,
  29. const lldb_private::ExecutionContext &exe_ctx,
  30. Address &first_non_prologue_insn) = 0;
  31. protected:
  32. UnwindAssembly(const ArchSpec &arch);
  33. ArchSpec m_arch;
  34. };
  35. } // namespace lldb_private
  36. #endif // LLDB_TARGET_UNWINDASSEMBLY_H