ABI.h revision 989816b9505219cd67ce044d655c54ac86ecf64b
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 *arg1_ptr = NULL, 38 lldb::addr_t *arg2_ptr = NULL, 39 lldb::addr_t *arg3_ptr = NULL, 40 lldb::addr_t *arg4_ptr = NULL, 41 lldb::addr_t *arg5_ptr = NULL, 42 lldb::addr_t *arg6_ptr = NULL) const = 0; 43 44 virtual bool 45 GetArgumentValues (Thread &thread, 46 ValueList &values) const = 0; 47 48 virtual bool 49 GetReturnValue (Thread &thread, 50 Value &value) const = 0; 51 52 virtual bool 53 CreateFunctionEntryUnwindPlan (UnwindPlan &unwind_plan) = 0; 54 55 virtual bool 56 CreateDefaultUnwindPlan (UnwindPlan &unwind_plan) = 0; 57 58 virtual bool 59 RegisterIsVolatile (const RegisterInfo *reg_info) = 0; 60 61 static lldb::ABISP 62 FindPlugin (const ArchSpec &arch); 63 64protected: 65 //------------------------------------------------------------------ 66 // Classes that inherit from ABI can see and modify these 67 //------------------------------------------------------------------ 68 ABI(); 69private: 70 DISALLOW_COPY_AND_ASSIGN (ABI); 71}; 72 73} // namespace lldb_private 74 75#endif // liblldb_ABI_h_ 76