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 // C Includes 15 // C++ Includes 16 // Other libraries and framework includes 17 // Project includes 18 #include "lldb/Target/ABI.h" 19 #include "lldb/Target/Thread.h" 20 #include "lldb/Target/ThreadPlanCallFunction.h" 21 #include "lldb/lldb-private.h" 22 23 #include "llvm/ADT/ArrayRef.h" 24 #include "llvm/IR/DerivedTypes.h" 25 26 namespace lldb_private { 27 28 class ThreadPlanCallFunctionUsingABI : public ThreadPlanCallFunction { 29 // Create a thread plan to call a function at the address passed in the 30 // "function" 31 // argument, this function is executed using register manipulation instead of 32 // JIT. 33 // Class derives from ThreadPlanCallFunction and differs by calling a 34 // alternative 35 // ABI interface ABI::PrepareTrivialCall() which provides more detailed 36 // information. 37 public: 38 ThreadPlanCallFunctionUsingABI(Thread &thread, 39 const Address &function_address, 40 llvm::Type &function_prototype, 41 llvm::Type &return_type, 42 llvm::ArrayRef<ABI::CallArgument> args, 43 const EvaluateExpressionOptions &options); 44 45 ~ThreadPlanCallFunctionUsingABI() override; 46 47 void GetDescription(Stream *s, lldb::DescriptionLevel level) override; 48 49 protected: 50 void SetReturnValue() override; 51 52 private: 53 llvm::Type &m_return_type; 54 DISALLOW_COPY_AND_ASSIGN(ThreadPlanCallFunctionUsingABI); 55 }; 56 57 } // namespace lldb_private 58 59 #endif // liblldb_ThreadPlanCallFunctionUsingABI_h_ 60