LLDB mainline
Public Member Functions | List of all members
lldb_private::Architecture Class Referenceabstract

#include <Architecture.h>

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

Public Member Functions

virtual void OverrideStopInfo (Thread &thread) const =0
 This is currently intended to handle cases where a program stops at an instruction that won't get executed and it allows the stop reason, like "breakpoint hit", to be replaced with a different stop reason like "no stop reason".
 
virtual size_t GetBytesToSkip (Symbol &func, const Address &curr_addr) const
 This method is used to get the number of bytes that should be skipped, from function start address, to reach the first instruction after the prologue.
 
virtual void AdjustBreakpointAddress (const Symbol &func, Address &addr) const
 Adjust function breakpoint address, if needed.
 
virtual lldb::addr_t GetCallableLoadAddress (lldb::addr_t addr, AddressClass addr_class=AddressClass::eInvalid) const
 Get load_addr as a callable code load address for this target.
 
virtual lldb::addr_t GetOpcodeLoadAddress (lldb::addr_t addr, AddressClass addr_class=AddressClass::eInvalid) const
 Get load_addr as an opcode for this target.
 
virtual lldb::addr_t GetBreakableLoadAddress (lldb::addr_t addr, Target &target) const
 
virtual const MemoryTagManagerGetMemoryTagManager () const
 
virtual bool RegisterWriteCausesReconfigure (const llvm::StringRef name) const
 
virtual bool ReconfigureRegisterInfo (DynamicRegisterInfo &reg_info, DataExtractor &reg_data, RegisterContext &reg_context) const
 
- 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
 

Detailed Description

Definition at line 18 of file Architecture.h.

Member Function Documentation

◆ AdjustBreakpointAddress()

virtual void lldb_private::Architecture::AdjustBreakpointAddress ( const Symbol func,
Address addr 
) const
inlinevirtual

Adjust function breakpoint address, if needed.

In some cases, the function start address is not the right place to set the breakpoint, specially in functions with multiple entry points.

This is specifically used for PPC64, for functions that have both a global and a local entry point. In this case, the breakpoint is adjusted to the first function address reached by both entry points.

Reimplemented in lldb_private::ArchitecturePPC64.

Definition at line 59 of file Architecture.h.

Referenced by lldb_private::BreakpointResolverName::SearchCallback().

◆ GetBreakableLoadAddress()

virtual lldb::addr_t lldb_private::Architecture::GetBreakableLoadAddress ( lldb::addr_t  addr,
Target target 
) const
inlinevirtual

Reimplemented in lldb_private::ArchitectureMips.

Definition at line 98 of file Architecture.h.

◆ GetBytesToSkip()

virtual size_t lldb_private::Architecture::GetBytesToSkip ( Symbol func,
const Address curr_addr 
) const
inlinevirtual

This method is used to get the number of bytes that should be skipped, from function start address, to reach the first instruction after the prologue.

If overrode, it must return non-zero only if the current address matches one of the known function entry points.

This method is called only if the standard platform-independent code fails to get the number of bytes to skip, giving the plugin a chance to try to find the missing info.

This is specifically used for PPC64, where functions may have more than one entry point, global and local, so both should be compared with current address, in order to find out the number of bytes that should be skipped, in case we are stopped at either function entry point.

Reimplemented in lldb_private::ArchitecturePPC64.

Definition at line 47 of file Architecture.h.

Referenced by lldb_private::ThreadPlanStepInRange::ShouldStop().

◆ GetCallableLoadAddress()

virtual lldb::addr_t lldb_private::Architecture::GetCallableLoadAddress ( lldb::addr_t  addr,
AddressClass  addr_class = AddressClass::eInvalid 
) const
inlinevirtual

Get load_addr as a callable code load address for this target.

Take load_addr and potentially add any address bits that are needed to make the address callable. For ARM this can set bit zero (if it already isn't) if load_addr is a thumb function. If addr_class is set to AddressClass::eInvalid, then the address adjustment will always happen. If it is set to an address class that doesn't have code in it, LLDB_INVALID_ADDRESS will be returned.

Reimplemented in lldb_private::ArchitectureArm, and lldb_private::ArchitectureMips.

Definition at line 72 of file Architecture.h.

◆ GetMemoryTagManager()

virtual const MemoryTagManager * lldb_private::Architecture::GetMemoryTagManager ( ) const
inlinevirtual

Reimplemented in lldb_private::ArchitectureAArch64.

Definition at line 110 of file Architecture.h.

Referenced by lldb_private::Process::GetMemoryTagManager().

◆ GetOpcodeLoadAddress()

virtual lldb::addr_t lldb_private::Architecture::GetOpcodeLoadAddress ( lldb::addr_t  addr,
AddressClass  addr_class = AddressClass::eInvalid 
) const
inlinevirtual

Get load_addr as an opcode for this target.

Take load_addr and potentially strip any address bits that are needed to make the address point to an opcode. For ARM this can clear bit zero (if it already isn't) if load_addr is a thumb function and load_addr is in code. If addr_class is set to AddressClass::eInvalid, then the address adjustment will always happen. If it is set to an address class that doesn't have code in it, LLDB_INVALID_ADDRESS will be returned.

Reimplemented in lldb_private::ArchitectureArm, and lldb_private::ArchitectureMips.

Definition at line 88 of file Architecture.h.

◆ OverrideStopInfo()

virtual void lldb_private::Architecture::OverrideStopInfo ( Thread thread) const
pure virtual

This is currently intended to handle cases where a program stops at an instruction that won't get executed and it allows the stop reason, like "breakpoint hit", to be replaced with a different stop reason like "no stop reason".

This is specifically used for ARM in Thumb code when we stop in an IT instruction (if/then/else) where the instruction won't get executed and therefore it wouldn't be correct to show the program stopped at the current PC. The code is generic and applies to all ARM CPUs.

Implemented in lldb_private::ArchitectureAArch64, lldb_private::ArchitectureArm, lldb_private::ArchitectureMips, and lldb_private::ArchitecturePPC64.

◆ ReconfigureRegisterInfo()

virtual bool lldb_private::Architecture::ReconfigureRegisterInfo ( DynamicRegisterInfo reg_info,
DataExtractor reg_data,
RegisterContext reg_context 
) const
inlinevirtual

◆ RegisterWriteCausesReconfigure()

virtual bool lldb_private::Architecture::RegisterWriteCausesReconfigure ( const llvm::StringRef  name) const
inlinevirtual

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