Page MenuHomePhabricator

Work around a stepping bug in arm64 android M

Authored by labath on Feb 22 2016, 8:23 AM.



On arm64, linux<=4.4 and Android<=M there is a bug, which prevents single-stepping from working when
the system comes back from suspend, because of incorrectly initialized CPUs. This did not really
affect Android<M, because it did not use software suspend, but it is a problem for M, which uses
suspend (doze) quite extensively. Fortunately, it seems that the first CPU is not affected by
this bug, so this commit implements a workaround by forcing the inferior to execute on the first
cpu whenever we are doing single stepping.

While inside, I have moved the implementations of Resume() and SingleStep() to the thread class
(instead of process).

Diff Detail


Event Timeline

labath updated this revision to Diff 48689.Feb 22 2016, 8:23 AM
labath retitled this revision from to Work around a stepping bug in arm64 android M.
labath updated this object.
labath added reviewers: tberghammer, ovyalov.
labath added a subscriber: lldb-commits.
labath updated this revision to Diff 48690.Feb 22 2016, 8:29 AM

Avoid an unused function warning on non-arm64 arches.

ovyalov accepted this revision.Feb 22 2016, 10:45 AM
ovyalov edited edge metadata.
ovyalov added inline comments.
250 ↗(On Diff #48690)

Could you use Error error(errno, eErrorTypePOSIX) instead of strerror here?

79 ↗(On Diff #48690)

Kill child before return?

41 ↗(On Diff #48690)


This revision is now accepted and ready to land.Feb 22 2016, 10:45 AM
This revision was automatically updated to reflect the committed changes.
labath marked 2 inline comments as done.