This is an archive of the discontinued LLVM Phabricator instance.

Don't set a software stepping breakpoint at 0 on arm or mips.
ClosedPublic

Authored by jmajors on Oct 24 2016, 1:44 PM.

Details

Summary

Added a test for the next_pc being zero before setting a software breakpoint
in arm32 and mips.
Reenabled the crash during step test for android/linux.

Event Timeline

jmajors updated this revision to Diff 75646.Oct 24 2016, 1:44 PM
jmajors retitled this revision from to Don't set a software stepping breakpoint at 0 on arm or mips..
jmajors updated this object.
jmajors added a reviewer: labath.
jmajors added a subscriber: lldb-commits.
labath edited edge metadata.Oct 25 2016, 4:39 AM

Could you make two more changes to this patch?

source/Plugins/Process/Linux/NativeProcessLinux.cpp
1365

You can put the code behind this switch on the architecture below, so we don't duplicate it needlessly -- I don't know of any arch which uses software single stepping and is not arm or mips, so probably the else branch is dead code, but even if such arch existed, this should be correct for it as well. (Also, probably the whole switch should be a bit deduplicated but that's for a different change).

1378

I don't think the thread should be added to this list if setting the breakpoint failed, as we will then just try to remove (and fail) the non-existing breakpoint in SignalIfAllThreadsStopped().

jmajors updated this revision to Diff 75779.Oct 25 2016, 1:18 PM
jmajors edited edge metadata.

Restructured the code to skip setting a software breakpoint at 0.

jmajors marked 2 inline comments as done.Oct 25 2016, 1:21 PM
labath accepted this revision.Oct 26 2016, 4:24 AM
labath edited edge metadata.

Thanks. I've committed this as r285187.

This revision is now accepted and ready to land.Oct 26 2016, 4:24 AM
labath closed this revision.Oct 26 2016, 4:24 AM