[LLDB][MIPS] Software single stepping

Patch by Jaydeep Patil

Reviewers: clayborg, jasonmolenda
Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits.
Differential Revision: http://reviews.llvm.org/D9519

llvm-svn: 236696
This commit is contained in:
Mohit K. Bhakkad
2015-05-07 05:56:27 +00:00
parent 2668a487a7
commit cdc22a889e
5 changed files with 76 additions and 10 deletions

View File

@@ -2885,10 +2885,8 @@ ReadRegisterCallback (EmulateInstruction *instruction,
Error error = emulator_baton->m_reg_context->ReadRegister(full_reg_info, reg_value);
if (error.Success())
{
emulator_baton->m_register_values[reg_info->kinds[eRegisterKindDWARF]] = reg_value;
return true;
}
return false;
}
@@ -2995,6 +2993,9 @@ NativeProcessLinux::SetupSoftwareSingleStepping(NativeThreadProtocolSP thread_sp
error = SetSoftwareBreakpoint(next_pc, 4);
}
}
else if (m_arch.GetMachine() == llvm::Triple::mips64
|| m_arch.GetMachine() == llvm::Triple::mips64el)
error = SetSoftwareBreakpoint(next_pc, 4);
else
{
// No size hint is given for the next breakpoint
@@ -3012,7 +3013,10 @@ NativeProcessLinux::SetupSoftwareSingleStepping(NativeThreadProtocolSP thread_sp
bool
NativeProcessLinux::SupportHardwareSingleStepping() const
{
return m_arch.GetMachine() != llvm::Triple::arm;
if (m_arch.GetMachine() == llvm::Triple::arm
|| m_arch.GetMachine() == llvm::Triple::mips64 || m_arch.GetMachine() == llvm::Triple::mips64el)
return false;
return true;
}
Error