diff options
Diffstat (limited to 'lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp')
-rw-r--r-- | lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp b/lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp index 5f2f6eeb82611..22508969ceed1 100644 --- a/lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp +++ b/lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp @@ -1,4 +1,4 @@ -//===-- ArchitectureMips.cpp -------------------------------------*- C++ -*-===// +//===-- ArchitectureMips.cpp ----------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -21,6 +21,8 @@ using namespace lldb_private; using namespace lldb; +LLDB_PLUGIN_DEFINE(ArchitectureMips) + ConstString ArchitectureMips::GetPluginNameStatic() { return ConstString("mips"); } @@ -118,9 +120,7 @@ lldb::addr_t ArchitectureMips::GetBreakableLoadAddress(lldb::addr_t addr, if (current_offset == 0) return addr; - ExecutionContext ctx; - target.CalculateExecutionContext(ctx); - auto insn = GetInstructionAtAddress(ctx, current_offset, addr); + auto insn = GetInstructionAtAddress(target, current_offset, addr); if (nullptr == insn || !insn->HasDelaySlot()) return addr; @@ -136,8 +136,7 @@ lldb::addr_t ArchitectureMips::GetBreakableLoadAddress(lldb::addr_t addr, } Instruction *ArchitectureMips::GetInstructionAtAddress( - const ExecutionContext &exe_ctx, const Address &resolved_addr, - addr_t symbol_offset) const { + Target &target, const Address &resolved_addr, addr_t symbol_offset) const { auto loop_count = symbol_offset / 2; @@ -169,10 +168,11 @@ Instruction *ArchitectureMips::GetInstructionAtAddress( for (uint32_t i = 1; i <= loop_count; i++) { // Adjust the address to read from. addr.Slide(-2); - AddressRange range(addr, i * 2); uint32_t insn_size = 0; - disasm_sp->ParseInstructions(&exe_ctx, range, nullptr, prefer_file_cache); + disasm_sp->ParseInstructions(target, addr, + {Disassembler::Limit::Bytes, i * 2}, nullptr, + prefer_file_cache); uint32_t num_insns = disasm_sp->GetInstructionList().GetSize(); if (num_insns) { |