This is an archive of the discontinued LLVM Phabricator instance.

[NativeProcessLinux] Fix removal of temporary breakpoints
ClosedPublic

Authored by labath on May 15 2015, 6:33 AM.

Details

Summary

There was an issue in NPL, where we attempted removal of temporary breakpoints (used to implement
software single stepping), while some threads of the process were running. This is a problem
since we currently always use the main thread's ID in the removal ptrace call. Therefore, if the
main thread was still running, the ptrace call would fail, and the software breakpoint would
remain, causing all kinds of problems. This change removes the breakpoints after all threads have
stopped. This fixes TestExitDuringStep on Android arm and can also potentially help in other
situations, as previously the breakpoint would not get removed if the thread stopped for another
reason.

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 25862.May 15 2015, 6:33 AM
labath retitled this revision from to [NativeProcessLinux] Fix removal of temporary breakpoints.
labath updated this object.
labath edited the test plan for this revision. (Show Details)
labath added a reviewer: tberghammer.
labath added a subscriber: Unknown Object (MLST).
tberghammer accepted this revision.May 15 2015, 6:49 AM
tberghammer edited edge metadata.

LGTM

This revision is now accepted and ready to land.May 15 2015, 6:49 AM
This revision was automatically updated to reflect the committed changes.