diff options
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index f5204a6e6fa..bab2a71de3d 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -948,25 +948,25 @@ NativeProcessLinux::SetupSoftwareSingleStepping(NativeThreadLinux &thread) { Status error; NativeRegisterContext& register_context = thread.GetRegisterContext(); - std::unique_ptr<EmulateInstruction> emulator_ap( + std::unique_ptr<EmulateInstruction> emulator_up( EmulateInstruction::FindPlugin(m_arch, eInstructionTypePCModifying, nullptr)); - if (emulator_ap == nullptr) + if (emulator_up == nullptr) return Status("Instruction emulator not found!"); EmulatorBaton baton(*this, register_context); - emulator_ap->SetBaton(&baton); - emulator_ap->SetReadMemCallback(&ReadMemoryCallback); - emulator_ap->SetReadRegCallback(&ReadRegisterCallback); - emulator_ap->SetWriteMemCallback(&WriteMemoryCallback); - emulator_ap->SetWriteRegCallback(&WriteRegisterCallback); + emulator_up->SetBaton(&baton); + emulator_up->SetReadMemCallback(&ReadMemoryCallback); + emulator_up->SetReadRegCallback(&ReadRegisterCallback); + emulator_up->SetWriteMemCallback(&WriteMemoryCallback); + emulator_up->SetWriteRegCallback(&WriteRegisterCallback); - if (!emulator_ap->ReadInstruction()) + if (!emulator_up->ReadInstruction()) return Status("Read instruction failed!"); bool emulation_result = - emulator_ap->EvaluateInstruction(eEmulateInstructionOptionAutoAdvancePC); + emulator_up->EvaluateInstruction(eEmulateInstructionOptionAutoAdvancePC); const RegisterInfo *reg_info_pc = register_context.GetRegisterInfo( eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC); @@ -994,7 +994,7 @@ NativeProcessLinux::SetupSoftwareSingleStepping(NativeThreadLinux &thread) { // the size of the current opcode because the emulation of all // PC modifying instruction should be successful. The failure most // likely caused by a not supported instruction which don't modify PC. - next_pc = register_context.GetPC() + emulator_ap->GetOpcode().GetByteSize(); + next_pc = register_context.GetPC() + emulator_up->GetOpcode().GetByteSize(); next_flags = ReadFlags(register_context); } else { // The instruction emulation failed after it modified the PC. It is an |