diff options
| author | Pavel Labath <labath@google.com> | 2016-10-26 11:13:56 +0000 |
|---|---|---|
| committer | Pavel Labath <labath@google.com> | 2016-10-26 11:13:56 +0000 |
| commit | 42eb6908e035c0b8160591c680007936ec306400 (patch) | |
| tree | 19bdf1269aa7e2be921d278b94fe6800e534c906 /lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | |
| parent | b380b24e6edc83030ea6bcc815763b77cbbf9a75 (diff) | |
Don't set a software stepping breakpoint at 0 on arm or mips.
Summary:
Check whether the setting the breakpoint failed during instruction emulation. If
it did, the next pc is likely in unmapped memory, and the inferior will crash
anyway after the next instruction. Do not return an error in this case, but just
continue stepping.
Reenabled the crash during step test for android/linux.
Reviewers: labath
Subscribers: aemerson, rengolin, tberghammer, danalbert, srhines, lldb-commits
Differential Revision: https://reviews.llvm.org/D25926
Author: Jason Majors <jmajors@google.com>
llvm-svn: 285187
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
| -rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 2510d27dc3be..8e2587bce0e2 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -1361,7 +1361,11 @@ Error NativeProcessLinux::SetupSoftwareSingleStepping( error = SetSoftwareBreakpoint(next_pc, 0); } - if (error.Fail()) + // If setting the breakpoint fails because next_pc is out of + // the address space, ignore it and let the debugee segfault. + if (error.GetError() == EIO || error.GetError() == EFAULT) { + return Error(); + } else if (error.Fail()) return error; m_threads_stepping_with_breakpoint.insert({thread.GetID(), next_pc}); |
