LLDB mainline
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
lldb_private::MCBasedABI Class Referenceabstract

#include <ABI.h>

Inheritance diagram for lldb_private::MCBasedABI:
Inheritance graph
[legend]

Public Member Functions

void AugmentRegisterInfo (std::vector< DynamicRegisterInfo::Register > &regs) override
 
- Public Member Functions inherited from lldb_private::ABI
 ~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 bool CreateFunctionEntryUnwindPlan (UnwindPlan &unwind_plan)=0
 
virtual bool CreateDefaultUnwindPlan (UnwindPlan &unwind_plan)=0
 
virtual bool RegisterIsVolatile (const RegisterInfo *reg_info)=0
 
virtual bool GetFallbackRegisterLocation (const RegisterInfo *reg_info, UnwindPlan::Row::RegisterLocation &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 void MapRegisterName (std::string &reg, 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>[<number>]".
 
- Static Public Member Functions inherited from lldb_private::ABI
static lldb::ABISP FindPlugin (lldb::ProcessSP process_sp, const ArchSpec &arch)
 

Protected Member Functions

virtual std::pair< uint32_t, uint32_t > GetEHAndDWARFNums (llvm::StringRef reg)
 Return eh_frame and dwarf numbers for the given register.
 
virtual uint32_t GetGenericNum (llvm::StringRef reg)=0
 Return the generic number of the given register.
 
virtual std::string GetMCName (std::string reg)
 For the given (capitalized) lldb register name, return the name of this register in the MCRegisterInfo struct.
 
 ABI (lldb::ProcessSP process_sp, std::unique_ptr< llvm::MCRegisterInfo > info_up)
 
- Protected Member Functions inherited from lldb_private::ABI
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)
 

Additional Inherited Members

- Static Protected Member Functions inherited from lldb_private::ABI
static std::unique_ptr< llvm::MCRegisterInfo > MakeMCRegisterInfo (const ArchSpec &arch)
 Utility function to construct a MCRegisterInfo using the ArchSpec triple.
 
- Protected Attributes inherited from lldb_private::ABI
lldb::ProcessWP m_process_wp
 
std::unique_ptr< llvm::MCRegisterInfo > m_mc_register_info_up
 

Detailed Description

Definition at line 187 of file ABI.h.

Member Function Documentation

◆ ABI()

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

Definition at line 155 of file ABI.h.

◆ AugmentRegisterInfo()

void MCBasedABI::AugmentRegisterInfo ( std::vector< DynamicRegisterInfo::Register > &  regs)
overridevirtual

Implements lldb_private::ABI.

Reimplemented in ABIAArch64, and ABIX86.

Definition at line 271 of file ABI.cpp.

References GetEHAndDWARFNums(), GetGenericNum(), and LLDB_INVALID_REGNUM.

Referenced by ABIAArch64::AugmentRegisterInfo(), and ABIX86::AugmentRegisterInfo().

◆ GetEHAndDWARFNums()

std::pair< uint32_t, uint32_t > MCBasedABI::GetEHAndDWARFNums ( llvm::StringRef  reg)
protectedvirtual

Return eh_frame and dwarf numbers for the given register.

Reimplemented in ABIAArch64.

Definition at line 287 of file ABI.cpp.

References GetMCName(), LLDB_INVALID_REGNUM, and lldb_private::ABI::m_mc_register_info_up.

Referenced by AugmentRegisterInfo().

◆ GetGenericNum()

virtual uint32_t lldb_private::MCBasedABI::GetGenericNum ( llvm::StringRef  reg)
protectedpure virtual

Return the generic number of the given register.

Implemented in ABIAArch64, ABIX86_i386, ABISysV_x86_64, and ABIWindows_x86_64.

Referenced by AugmentRegisterInfo().

◆ GetMCName()

virtual std::string lldb_private::MCBasedABI::GetMCName ( std::string  reg)
inlineprotectedvirtual

For the given (capitalized) lldb register name, return the name of this register in the MCRegisterInfo struct.

Reimplemented in ABIMacOSX_i386, ABIX86_64, and ABIAArch64.

Definition at line 208 of file ABI.h.

Referenced by GetEHAndDWARFNums().

◆ MapRegisterName()

void MCBasedABI::MapRegisterName ( std::string &  reg,
llvm::StringRef  from_prefix,
llvm::StringRef  to_prefix 
)
static

If the register name is of the form "<from_prefix>[<number>]" then change the name to "<to_prefix>[<number>]".

Otherwise, leave the name unchanged.

Definition at line 305 of file ABI.cpp.

Referenced by ABIMacOSX_i386::GetMCName(), ABIX86_64::GetMCName(), and ABIAArch64::GetMCName().


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