ThreadPlanCallFunctionUsingABI.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //===-- ThreadPlanCallFunctionUsingABI.h --------------------------------*- C++
  2. //-*-===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef LLDB_TARGET_THREADPLANCALLFUNCTIONUSINGABI_H
  10. #define LLDB_TARGET_THREADPLANCALLFUNCTIONUSINGABI_H
  11. #include "lldb/Target/ABI.h"
  12. #include "lldb/Target/Thread.h"
  13. #include "lldb/Target/ThreadPlanCallFunction.h"
  14. #include "lldb/lldb-private.h"
  15. #include "llvm/ADT/ArrayRef.h"
  16. #include "llvm/IR/DerivedTypes.h"
  17. namespace lldb_private {
  18. class ThreadPlanCallFunctionUsingABI : public ThreadPlanCallFunction {
  19. // Create a thread plan to call a function at the address passed in the
  20. // "function" argument, this function is executed using register manipulation
  21. // instead of JIT. Class derives from ThreadPlanCallFunction and differs by
  22. // calling a alternative
  23. // ABI interface ABI::PrepareTrivialCall() which provides more detailed
  24. // information.
  25. public:
  26. ThreadPlanCallFunctionUsingABI(Thread &thread,
  27. const Address &function_address,
  28. llvm::Type &function_prototype,
  29. llvm::Type &return_type,
  30. llvm::ArrayRef<ABI::CallArgument> args,
  31. const EvaluateExpressionOptions &options);
  32. ~ThreadPlanCallFunctionUsingABI() override;
  33. void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
  34. protected:
  35. void SetReturnValue() override;
  36. private:
  37. llvm::Type &m_return_type;
  38. ThreadPlanCallFunctionUsingABI(const ThreadPlanCallFunctionUsingABI &) =
  39. delete;
  40. const ThreadPlanCallFunctionUsingABI &
  41. operator=(const ThreadPlanCallFunctionUsingABI &) = delete;
  42. };
  43. } // namespace lldb_private
  44. #endif // LLDB_TARGET_THREADPLANCALLFUNCTIONUSINGABI_H