|
LLDB mainline
|
#include <ArchitectureArm.h>
Public Member Functions | |
| llvm::StringRef | GetPluginName () override |
| void | OverrideStopInfo (Thread &thread) const override |
| 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". | |
| lldb::addr_t | GetCallableLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const override |
| Get load_addr as a callable code load address for this target. | |
| lldb::addr_t | GetOpcodeLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const override |
| Get load_addr as an opcode for this target. | |
| lldb::UnwindPlanSP | GetArchitectureUnwindPlan (lldb_private::Thread &thread, lldb_private::RegisterContextUnwind *regctx, std::shared_ptr< const UnwindPlan > current_unwindplan) override |
| Return an UnwindPlan that allows architecture-defined rules for finding saved registers, given a particular set of register values. | |
| bool | IsValidTrapInstruction (llvm::ArrayRef< uint8_t > reference, llvm::ArrayRef< uint8_t > observed) const override |
| Returns whether a given byte sequence is a valid trap instruction for the architecture. | |
| Public Member Functions inherited from lldb_private::Architecture | |
| 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 | GetBreakableLoadAddress (lldb::addr_t addr, Target &target) const |
| virtual const MemoryTagManager * | GetMemoryTagManager () const |
| virtual bool | RegisterWriteCausesReconfigure (const llvm::StringRef name) const |
| virtual bool | ReconfigureRegisterInfo (DynamicRegisterInfo ®_info, DataExtractor ®_data, RegisterContext ®_context) const |
| Public Member Functions inherited from lldb_private::PluginInterface | |
| PluginInterface ()=default | |
| virtual | ~PluginInterface ()=default |
| PluginInterface (const PluginInterface &)=delete | |
| PluginInterface & | operator= (const PluginInterface &)=delete |
Static Public Member Functions | |
| static llvm::StringRef | GetPluginNameStatic () |
| static void | Initialize () |
| static void | Terminate () |
Private Member Functions | |
| ArchitectureArm ()=default | |
Static Private Member Functions | |
| static std::unique_ptr< Architecture > | Create (const ArchSpec &arch) |
Definition at line 17 of file ArchitectureArm.h.
|
privatedefault |
Referenced by Create(), and Initialize().
|
staticprivate |
Definition at line 42 of file ArchitectureArm.cpp.
References ArchitectureArm(), and lldb_private::ArchSpec::GetMachine().
Referenced by Initialize(), and Terminate().
|
overridevirtual |
Return an UnwindPlan that allows architecture-defined rules for finding saved registers, given a particular set of register values.
Reimplemented from lldb_private::Architecture.
Definition at line 179 of file ArchitectureArm.cpp.
References dwarf_cpsr, dwarf_lr, dwarf_pc, dwarf_r0, dwarf_r1, dwarf_r12, dwarf_r2, dwarf_r3, dwarf_s0, dwarf_s1, dwarf_s10, dwarf_s11, dwarf_s12, dwarf_s13, dwarf_s14, dwarf_s15, dwarf_s2, dwarf_s3, dwarf_s4, dwarf_s5, dwarf_s6, dwarf_s7, dwarf_s8, dwarf_s9, dwarf_sp, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::UnwindLLDB::eRegisterFound, lldb::eRegisterKindDWARF, lldb::eRegisterKindGeneric, lldb::eRegisterKindLLDB, error(), lldb_private::ArchSpec::GetAddressByteSize(), RegisterNumber::GetAsKind(), lldb_private::RegisterValue::GetAsUInt32(), lldb_private::RegisterContextUnwind::GetCFA(), lldb_private::GetLog(), lldb_private::RegisterContextUnwind::GetRegisterInfoAtIndex(), lldb_private::ArchSpec::GetTriple(), LLDB_INVALID_ADDRESS, LLDB_INVALID_REGNUM, LLDB_LOGF, LLDB_REGNUM_GENERIC_PC, LLDB_REGNUM_GENERIC_RA, lldb_private::RegisterContextUnwind::ReadRegisterValueFromRegisterLocation(), lldb_private::RegisterContextUnwind::SavedLocationForRegister(), lldb_private::UnwindPlan::Row::SetRegisterLocationToAtCFAPlusOffset(), lldb_private::UnwindPlan::Row::SetRegisterLocationToIsCFAPlusOffset(), and lldb_private::Unwind.
|
overridevirtual |
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 from lldb_private::Architecture.
Definition at line 134 of file ArchitectureArm.cpp.
References lldb_private::eCodeAlternateISA, lldb_private::eData, lldb_private::eDebug, and LLDB_INVALID_ADDRESS.
|
overridevirtual |
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 from lldb_private::Architecture.
Definition at line 153 of file ArchitectureArm.cpp.
References lldb_private::eData, lldb_private::eDebug, and LLDB_INVALID_ADDRESS.
|
inlineoverridevirtual |
Implements lldb_private::PluginInterface.
Definition at line 23 of file ArchitectureArm.h.
References GetPluginNameStatic().
|
inlinestatic |
Definition at line 19 of file ArchitectureArm.h.
Referenced by GetPluginName(), and Initialize().
|
static |
Definition at line 32 of file ArchitectureArm.cpp.
References ArchitectureArm(), Create(), GetPluginNameStatic(), Initialize(), and lldb_private::PluginManager::RegisterPlugin().
Referenced by Initialize().
|
overridevirtual |
Returns whether a given byte sequence is a valid trap instruction for the architecture.
Some architectures feature instructions that have immediates that can take on any value, resulting in a family of valid byte sequences. If the observed byte sequence is shorter than the reference then they are considered not to match, even if the initial bytes would match.
Reimplemented from lldb_private::Architecture.
Definition at line 342 of file ArchitectureArm.cpp.
|
overridevirtual |
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.
Implements lldb_private::Architecture.
Definition at line 48 of file ArchitectureArm.cpp.
References lldb_private::ARMConditionPassed(), lldb_private::Bit32(), lldb_private::Bits32(), error(), pc, UINT32_MAX, and UINT64_MAX.
|
static |
Definition at line 38 of file ArchitectureArm.cpp.
References Create(), and lldb_private::PluginManager::UnregisterPlugin().