9#ifndef LLDB_TARGET_ABI_H
10#define LLDB_TARGET_ABI_H
18#include "llvm/ADT/ArrayRef.h"
19#include "llvm/MC/MCRegisterInfo.h"
48 llvm::ArrayRef<lldb::addr_t> args)
const = 0;
63 llvm::Type &prototype,
64 llvm::ArrayRef<CallArgument> args)
const;
69 bool persistent =
true)
const;
73 bool persistent =
true)
const;
163 static std::unique_ptr<llvm::MCRegisterInfo>
177 std::vector<DynamicRegisterInfo::Register> ®s)
override;
190 std::vector<DynamicRegisterInfo::Register> ®s)
override;
194 static void MapRegisterName(std::string ®, llvm::StringRef from_prefix,
195 llvm::StringRef to_prefix);
208 virtual std::string
GetMCName(std::string reg) {
return reg; }
virtual bool CodeAddressIsValid(lldb::addr_t pc)=0
virtual bool GetPointerReturnRegister(const char *&name)
lldb::ProcessWP m_process_wp
llvm::MCRegisterInfo & GetMCRegisterInfo()
ABI(lldb::ProcessSP process_sp, std::unique_ptr< llvm::MCRegisterInfo > info_up)
const ABI & operator=(const ABI &)=delete
virtual lldb::addr_t FixAnyAddress(lldb::addr_t pc)
Use this method when you do not know, or do not care what kind of address you are fixing.
virtual bool CallFrameAddressIsValid(lldb::addr_t cfa)=0
virtual void AugmentRegisterInfo(std::vector< DynamicRegisterInfo::Register > ®s)=0
virtual lldb::ValueObjectSP GetReturnValueObjectImpl(Thread &thread, CompilerType &ast_type) const =0
static lldb::ABISP FindPlugin(lldb::ProcessSP process_sp, const ArchSpec &arch)
virtual bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp, lldb::addr_t functionAddress, lldb::addr_t returnAddress, llvm::ArrayRef< lldb::addr_t > args) const =0
virtual bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp, lldb::addr_t functionAddress, lldb::addr_t returnAddress, llvm::Type &prototype, llvm::ArrayRef< CallArgument > args) const
virtual bool GetFallbackRegisterLocation(const RegisterInfo *reg_info, UnwindPlan::Row::RegisterLocation &unwind_regloc)
virtual bool GetArgumentValues(Thread &thread, ValueList &values) const =0
lldb::ValueObjectSP GetReturnValueObject(Thread &thread, CompilerType &type, bool persistent=true) const
static std::unique_ptr< llvm::MCRegisterInfo > MakeMCRegisterInfo(const ArchSpec &arch)
Utility function to construct a MCRegisterInfo using the ArchSpec triple.
virtual bool RegisterIsVolatile(const RegisterInfo *reg_info)=0
virtual size_t GetRedZoneSize() const =0
std::unique_ptr< llvm::MCRegisterInfo > m_mc_register_info_up
virtual lldb::addr_t FixCodeAddress(lldb::addr_t pc)
Some targets might use bits in a code address to indicate a mode switch.
lldb::ProcessSP GetProcessSP() const
Request to get a Process shared pointer.
virtual bool CreateDefaultUnwindPlan(UnwindPlan &unwind_plan)=0
virtual lldb::addr_t FixDataAddress(lldb::addr_t pc)
virtual bool CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan)=0
virtual uint64_t GetStackFrameSize()
virtual Status SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value)=0
An architecture specification class.
Generic representation of a type in a programming language.
virtual std::string GetMCName(std::string reg)
For the given (capitalized) lldb register name, return the name of this register in the MCRegisterInf...
void AugmentRegisterInfo(std::vector< DynamicRegisterInfo::Register > ®s) override
virtual uint32_t GetGenericNum(llvm::StringRef reg)=0
Return the generic number of the given register.
virtual std::pair< uint32_t, uint32_t > GetEHAndDWARFNums(llvm::StringRef reg)
Return eh_frame and dwarf numbers for the given register.
static void MapRegisterName(std::string ®, llvm::StringRef from_prefix, llvm::StringRef to_prefix)
If the register name is of the form "<from_prefix>[<number>]" then change the name to "<to_prefix>[<n...
bool GetRegisterInfoByName(llvm::StringRef name, RegisterInfo &info)
virtual const RegisterInfo * GetRegisterInfoArray(uint32_t &count)=0
void AugmentRegisterInfo(std::vector< DynamicRegisterInfo::Register > ®s) override
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ABI > ABISP
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::Process > ProcessSP
std::weak_ptr< lldb_private::Process > ProcessWP
std::unique_ptr< uint8_t[]> data_up
Every register is described in detail including its name, alternate name (optional),...