LLDB mainline
lldb_private::ABI Class Referenceabstract

#include <ABI.h>

Inheritance diagram for lldb_private::ABI:
[legend]

Classes

struct  CallArgument

Public Member Functions

 ~ABI () override
virtual size_t GetRedZoneSize () const =0
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 GetArgumentValues (Thread &thread, ValueList &values) const =0
lldb::ValueObjectSP GetReturnValueObject (Thread &thread, CompilerType &type, bool persistent=true) const
lldb::ValueObjectSP GetReturnValueObject (Thread &thread, llvm::Type &type, bool persistent=true) const
virtual Status SetReturnValueObject (lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value)=0
virtual lldb::UnwindPlanSP CreateFunctionEntryUnwindPlan ()=0
virtual lldb::UnwindPlanSP CreateDefaultUnwindPlan ()=0
virtual bool RegisterIsVolatile (const RegisterInfo *reg_info)=0
virtual bool GetFallbackRegisterLocation (const RegisterInfo *reg_info, UnwindPlan::Row::AbstractRegisterLocation &unwind_regloc)
virtual bool CallFrameAddressIsValid (lldb::addr_t cfa)=0
virtual bool CodeAddressIsValid (lldb::addr_t pc)=0
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.
llvm::MCRegisterInfo & GetMCRegisterInfo ()
virtual void AugmentRegisterInfo (std::vector< DynamicRegisterInfo::Register > &regs)=0
virtual bool GetPointerReturnRegister (const char *&name)
virtual uint64_t GetStackFrameSize ()
virtual lldb::addr_t FixCodeAddress (lldb::addr_t pc)
 Some targets might use bits in a code address to indicate a mode switch.
virtual lldb::addr_t FixDataAddress (lldb::addr_t pc)
Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
virtual ~PluginInterface ()=default
virtual llvm::StringRef GetPluginName ()=0
 PluginInterface (const PluginInterface &)=delete
PluginInterfaceoperator= (const PluginInterface &)=delete

Static Public Member Functions

static lldb::ABISP FindPlugin (lldb::ProcessSP process_sp, const ArchSpec &arch)

Protected Member Functions

virtual lldb::ValueObjectSP GetReturnValueObjectImpl (Thread &thread, CompilerType &ast_type) const =0
virtual lldb::ValueObjectSP GetReturnValueObjectImpl (Thread &thread, llvm::Type &ir_type) const
lldb::ProcessSP GetProcessSP () const
 Request to get a Process shared pointer.
 ABI (lldb::ProcessSP process_sp, std::unique_ptr< llvm::MCRegisterInfo > info_up)

Static Protected Member Functions

static std::unique_ptr< llvm::MCRegisterInfo > MakeMCRegisterInfo (const ArchSpec &arch)
 Utility function to construct a MCRegisterInfo using the ArchSpec triple.

Protected Attributes

lldb::ProcessWP m_process_wp
std::unique_ptr< llvm::MCRegisterInfo > m_mc_register_info_up

Private Member Functions

 ABI (const ABI &)=delete
const ABIoperator= (const ABI &)=delete

Detailed Description

Definition at line 28 of file ABI.h.

Constructor & Destructor Documentation

◆ ~ABI()

ABI::~ABI ( )
overridedefault

◆ ABI() [1/2]

lldb_private::ABI::ABI ( lldb::ProcessSP process_sp,
std::unique_ptr< llvm::MCRegisterInfo > info_up )
inlineprotected

Definition at line 156 of file ABI.h.

References m_mc_register_info_up, and m_process_wp.

Referenced by ABI(), and operator=().

◆ ABI() [2/2]

lldb_private::ABI::ABI ( const ABI & )
privatedelete

References ABI().

Member Function Documentation

◆ AugmentRegisterInfo()

virtual void lldb_private::ABI::AugmentRegisterInfo ( std::vector< DynamicRegisterInfo::Register > & regs)
pure virtual

◆ CallFrameAddressIsValid()

◆ CodeAddressIsValid()

◆ CreateDefaultUnwindPlan()

◆ CreateFunctionEntryUnwindPlan()

◆ FindPlugin()

◆ FixAnyAddress()

virtual lldb::addr_t lldb_private::ABI::FixAnyAddress ( lldb::addr_t pc)
inlinevirtual

Use this method when you do not know, or do not care what kind of address you are fixing.

On platforms where there would be a difference between the two types, it will pick the safest option.

Its purpose is to signal that no specific choice was made and provide an alternative to randomly picking FixCode/FixData address. Which could break platforms where there is a difference (only Arm Thumb at this time).

Definition at line 137 of file ABI.h.

References FixDataAddress(), and pc.

◆ FixCodeAddress()

addr_t ABI::FixCodeAddress ( lldb::addr_t pc)
virtual

Some targets might use bits in a code address to indicate a mode switch.

ARM uses bit zero to signify a code address is thumb, so any ARM ABI plug-ins would strip those bits.

Reimplemented in ABIAArch64, ABIMacOSX_arm64, ABIMacOSX_arm, ABISysV_arm64, and ABISysV_arm.

Definition at line 150 of file ABI.cpp.

References GetProcessSP(), LLDB_INVALID_ADDRESS_MASK, and pc.

Referenced by CommandObjectTargetModulesShowUnwind::DoExecute().

◆ FixDataAddress()

addr_t ABI::FixDataAddress ( lldb::addr_t pc)
virtual

Reimplemented in ABIAArch64, ABIMacOSX_arm64, and ABISysV_arm64.

Definition at line 167 of file ABI.cpp.

References GetProcessSP(), LLDB_INVALID_ADDRESS_MASK, and pc.

Referenced by FixAnyAddress().

◆ GetArgumentValues()

◆ GetFallbackRegisterLocation()

◆ GetMCRegisterInfo()

llvm::MCRegisterInfo & lldb_private::ABI::GetMCRegisterInfo ( )
inline

Definition at line 144 of file ABI.h.

References m_mc_register_info_up.

Referenced by lldb_private::DWARFExpression::DumpLocation().

◆ GetPointerReturnRegister()

virtual bool lldb_private::ABI::GetPointerReturnRegister ( const char *& name)
inlinevirtual

Reimplemented in ABISysV_arm64, ABISysV_x86_64, and ABIWindows_x86_64.

Definition at line 149 of file ABI.h.

◆ GetProcessSP()

lldb::ProcessSP lldb_private::ABI::GetProcessSP ( ) const
inlineprotected

◆ GetRedZoneSize()

◆ GetReturnValueObject() [1/2]

◆ GetReturnValueObject() [2/2]

ValueObjectSP ABI::GetReturnValueObject ( Thread & thread,
llvm::Type & type,
bool persistent = true ) const

Definition at line 183 of file ABI.cpp.

References GetReturnValueObjectImpl().

◆ GetReturnValueObjectImpl() [1/2]

◆ GetReturnValueObjectImpl() [2/2]

lldb::ValueObjectSP ABI::GetReturnValueObjectImpl ( Thread & thread,
llvm::Type & ir_type ) const
protectedvirtual

Reimplemented in ABISysV_arc, ABISysV_hexagon, and ABISysV_riscv.

Definition at line 194 of file ABI.cpp.

◆ GetStackFrameSize()

virtual uint64_t lldb_private::ABI::GetStackFrameSize ( )
inlinevirtual

Reimplemented in ABISysV_msp430.

Definition at line 151 of file ABI.h.

◆ MakeMCRegisterInfo()

◆ operator=()

const ABI & lldb_private::ABI::operator= ( const ABI & )
privatedelete

References ABI().

◆ PrepareTrivialCall() [1/2]

◆ PrepareTrivialCall() [2/2]

virtual bool lldb_private::ABI::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

References sp.

◆ RegisterIsVolatile()

◆ SetReturnValueObject()

Member Data Documentation

◆ m_mc_register_info_up

std::unique_ptr<llvm::MCRegisterInfo> lldb_private::ABI::m_mc_register_info_up
protected

Definition at line 168 of file ABI.h.

Referenced by ABI(), lldb_private::MCBasedABI::GetEHAndDWARFNums(), and GetMCRegisterInfo().

◆ m_process_wp

lldb::ProcessWP lldb_private::ABI::m_process_wp
protected

Definition at line 167 of file ABI.h.

Referenced by ABI(), and GetProcessSP().


The documentation for this class was generated from the following files: