1 //===-- ThreadPlanCallFunctionUsingABI.h --------------------------------*- C++ 2 //-*-===// 3 // 4 // The LLVM Compiler Infrastructure 5 // 6 // This file is distributed under the University of Illinois Open Source 7 // License. See LICENSE.TXT for details. 8 // 9 //===----------------------------------------------------------------------===// 10 11 #ifndef liblldb_ThreadPlanCallFunctionUsingABI_h_ 12 #define liblldb_ThreadPlanCallFunctionUsingABI_h_ 13 14 #include "lldb/Target/ABI.h" 15 #include "lldb/Target/Thread.h" 16 #include "lldb/Target/ThreadPlanCallFunction.h" 17 #include "lldb/lldb-private.h" 18 19 #include "llvm/ADT/ArrayRef.h" 20 #include "llvm/IR/DerivedTypes.h" 21 22 namespace lldb_private { 23 24 class ThreadPlanCallFunctionUsingABI : public ThreadPlanCallFunction { 25 // Create a thread plan to call a function at the address passed in the 26 // "function" argument, this function is executed using register manipulation 27 // instead of JIT. Class derives from ThreadPlanCallFunction and differs by 28 // calling a alternative 29 // ABI interface ABI::PrepareTrivialCall() which provides more detailed 30 // information. 31 public: 32 ThreadPlanCallFunctionUsingABI(Thread &thread, 33 const Address &function_address, 34 llvm::Type &function_prototype, 35 llvm::Type &return_type, 36 llvm::ArrayRef<ABI::CallArgument> args, 37 const EvaluateExpressionOptions &options); 38 39 ~ThreadPlanCallFunctionUsingABI() override; 40 41 void GetDescription(Stream *s, lldb::DescriptionLevel level) override; 42 43 protected: 44 void SetReturnValue() override; 45 46 private: 47 llvm::Type &m_return_type; 48 DISALLOW_COPY_AND_ASSIGN(ThreadPlanCallFunctionUsingABI); 49 }; 50 51 } // namespace lldb_private 52 53 #endif // liblldb_ThreadPlanCallFunctionUsingABI_h_ 54