24 "Arm-specific algorithms",
72 const uint32_t cpsr = reg_ctx_sp->GetFlags(0);
77 const uint32_t J =
Bit32(cpsr, 24);
78 const uint32_t T =
Bit32(cpsr, 5);
79 const uint32_t ISETSTATE = J << 1 | T;
92 const addr_t pc = reg_ctx_sp->GetPC();
99 const uint32_t condition =
Bits32((uint32_t)opcode, 31, 28);
109 }
else if (ISETSTATE == 1) {
111 const uint32_t ITSTATE =
Bits32(cpsr, 15, 10) << 2 |
Bits32(cpsr, 26, 25);
113 const uint32_t condition =
Bits32(ITSTATE, 7, 4);
126 bool is_alternate_isa =
false;
128 switch (addr_class) {
133 is_alternate_isa =
true;
138 if ((code_addr & 2u) || is_alternate_isa)
139 return code_addr | 1u;
145 switch (addr_class) {
151 return opcode_addr & ~(1ull);
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_PLUGIN_DEFINE(PluginName)
An architecture specification class.
llvm::Triple::ArchType GetMachine() const
Returns a machine family for the current architecture.
static std::unique_ptr< Architecture > Create(const ArchSpec &arch)
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.
ArchitectureArm()=default
void OverrideStopInfo(Thread &thread) const override
This is currently intended to handle cases where a program stops at an instruction that won't get exe...
lldb::addr_t GetOpcodeLoadAddress(lldb::addr_t load_addr, AddressClass addr_class) const override
Get load_addr as an opcode for this target.
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
virtual lldb::RegisterContextSP GetRegisterContext()=0
void SetStopInfo(const lldb::StopInfoSP &stop_info_sp)
lldb::ProcessSP GetProcess() const
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
static bool ARMConditionPassed(const uint32_t condition, const uint32_t cpsr)
static uint32_t Bits32(const uint32_t bits, const uint32_t msbit, const uint32_t lsbit)
static uint32_t Bit32(const uint32_t bits, const uint32_t bit)
std::shared_ptr< lldb_private::StopInfo > StopInfoSP
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP