ABI.h revision 37f962e785be99dc4f0c5e9d02416992ff03bbd0
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 virtual bool 62 StackUsesFrames () = 0; 63 64 virtual bool 65 CallFrameAddressIsValid (lldb::addr_t cfa) = 0; 66 67 virtual bool 68 CodeAddressIsValid (lldb::addr_t pc) = 0; 69 70 virtual const RegisterInfo * 71 GetRegisterInfoArray (uint32_t &count) = 0; 72 73 74 75 bool 76 GetRegisterInfoByName (const ConstString &name, RegisterInfo &info); 77 78 bool 79 GetRegisterInfoByKind (lldb::RegisterKind reg_kind, 80 uint32_t reg_num, 81 RegisterInfo &info); 82 83 static lldb::ABISP 84 FindPlugin (const ArchSpec &arch); 85 86protected: 87 //------------------------------------------------------------------ 88 // Classes that inherit from ABI can see and modify these 89 //------------------------------------------------------------------ 90 ABI(); 91private: 92 DISALLOW_COPY_AND_ASSIGN (ABI); 93}; 94 95} // namespace lldb_private 96 97#endif // liblldb_ABI_h_ 98