Page MenuHomePhabricator

Fix TestThreadSpecificBreakpoint with LLGS
ClosedPublic

Authored by tberghammer on Feb 3 2015, 8:44 AM.

Details

Summary

Fix TestThreadSpecificBreakpoint with LLGS

  • Set the state of the process into running/stepping on continue/step operations
  • Add mutex to use transactions in Thread State Coordinator
    • It is required because the events from two Signal Handler or form a Signal handler and a Resume request shouldn't overlap
  • Send Stop Replay Packet only when the state of the process changed

Diff Detail

Event Timeline

tberghammer updated this revision to Diff 19231.Feb 3 2015, 8:44 AM
tberghammer retitled this revision from to Fix TestThreadSpecificBreakpoint with LLGS.
tberghammer updated this object.
tberghammer edited the test plan for this revision. (Show Details)
tberghammer added reviewers: vharron, sivachandra.
tberghammer added a subscriber: Unknown Object (MLST).
vharron edited edge metadata.

LGTM but ovyalov must review.

ovyalov edited edge metadata.Feb 4 2015, 2:17 PM

Please make sure that there are no test regressions with LLGS_LOCAL on.

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

Should we update process state only if the following Resume call succeeds?

2627

Should we update process state only if the following SingleStep call succeeds?

2727

minor optimization - could you move locker down to "for (auto thread_sp : m_threads)"?

tberghammer updated this revision to Diff 19393.Feb 5 2015, 3:52 AM
tberghammer edited edge metadata.

Address issues requested in review

No regression with LLGS LOCAL (I think it uses different code path)

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

Fixed

2627

Fixed (if step is unsuccessful then the assert will fire)

2727

Moved it just before the for loop. It can't be moved inside as the main purpose of this mutex is to make events inside the loop unbreakable by other thread state changing events

ovyalov accepted this revision.Feb 5 2015, 8:01 AM
ovyalov edited edge metadata.
This revision is now accepted and ready to land.Feb 5 2015, 8:01 AM
This revision was automatically updated to reflect the committed changes.