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" argument, this function is executed using register manipulation 31 // instead of JIT. Class derives from ThreadPlanCallFunction and differs by 32 // calling a alternative 33 // ABI interface ABI::PrepareTrivialCall() which provides more detailed 34 // information. 35 public: 36 ThreadPlanCallFunctionUsingABI(Thread &thread, 37 const Address &function_address, 38 llvm::Type &function_prototype, 39 llvm::Type &return_type, 40 llvm::ArrayRef<ABI::CallArgument> args, 41 const EvaluateExpressionOptions &options); 42 43 ~ThreadPlanCallFunctionUsingABI() override; 44 45 void GetDescription(Stream *s, lldb::DescriptionLevel level) override; 46 47 protected: 48 void SetReturnValue() override; 49 50 private: 51 llvm::Type &m_return_type; 52 DISALLOW_COPY_AND_ASSIGN(ThreadPlanCallFunctionUsingABI); 53 }; 54 55 } // namespace lldb_private 56 57 #endif // liblldb_ThreadPlanCallFunctionUsingABI_h_ 58