ABI.h revision 3c9c5eb466869ede185e879d14a47335fb43194d
1//===-- ABI.h ---------------------------------------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef liblldb_ABI_h_ 11#define liblldb_ABI_h_ 12 13// C Includes 14// C++ Includes 15// Other libraries and framework includes 16// Project includes 17#include "lldb/Core/PluginInterface.h" 18#include "lldb/lldb-private.h" 19 20namespace lldb_private { 21 22class ABI : 23 public PluginInterface 24{ 25public: 26 virtual 27 ~ABI(); 28 29 virtual size_t 30 GetRedZoneSize () const = 0; 31 32 virtual bool 33 PrepareTrivialCall (Thread &thread, 34 lldb::addr_t sp, 35 lldb::addr_t functionAddress, 36 lldb::addr_t returnAddress, 37 lldb::addr_t arg, 38 lldb::addr_t *this_arg) const = 0; 39 40 virtual bool 41 PrepareNormalCall (Thread &thread, 42 lldb::addr_t sp, 43 lldb::addr_t functionAddress, 44 lldb::addr_t returnAddress, 45 ValueList &args) const = 0; 46 47 virtual bool 48 GetArgumentValues (Thread &thread, 49 ValueList &values) const = 0; 50 51 virtual bool 52 GetReturnValue (Thread &thread, 53 Value &value) const = 0; 54 55 static ABI* 56 FindPlugin (const ConstString &triple); 57protected: 58 //------------------------------------------------------------------ 59 // Classes that inherit from ABI can see and modify these 60 //------------------------------------------------------------------ 61 ABI(); 62private: 63 DISALLOW_COPY_AND_ASSIGN (ABI); 64}; 65 66} // namespace lldb_private 67 68#endif // liblldb_ABI_h_ 69