This is an archive of the discontinued LLVM Phabricator instance.

Remove handling of eStateStopped from NativeProcessLinux::Resume
ClosedPublic

Authored by labath on May 11 2015, 5:00 AM.

Details

Summary

NPL::Resume attempted to handle eStateStopped as a resume action. However:

  • GDBRemoteCommunicationServerLLGS (the only user of NPL) never sets this action
  • it could set this action in response to a vCont:t packet, but LLDB never produces this packet
  • gdb-remote protocol documentation says vCont:t packet is used only in non-stop mode, but LLDB does not support non-stop mode
  • even if LLDB supported non-stop mode, this implementation of eStateStopped does something different from what the spec says it should (according to spec, it should stop the specified thread, but this seems to want to stop all threads).

Given the facts above, I believe we should remove this unused and untested code, as it probably
doesn't even work and removing it makes the rest of the code noticably simpler.

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 25460.May 11 2015, 5:00 AM
labath retitled this revision from to Remove handling of eStateStopped from NativeProcessLinux::Resume.
labath updated this object.
labath edited the test plan for this revision. (Show Details)
labath added reviewers: ovyalov, chaoren.
labath added a subscriber: Unknown Object (MLST).
ovyalov accepted this revision.May 11 2015, 10:52 AM
ovyalov edited edge metadata.

Looks good.

source/Plugins/Process/Linux/NativeProcessLinux.cpp
3096 ↗(On Diff #25460)

We not always thoroughly examine logs (especially considering their amounts..) - what do you think about leaving these states for now with assert?

This revision is now accepted and ready to land.May 11 2015, 10:52 AM
This revision was automatically updated to reflect the committed changes.
labath added inline comments.May 12 2015, 2:09 AM
source/Plugins/Process/Linux/NativeProcessLinux.cpp
3096 ↗(On Diff #25460)

Sure. Sounds like a job for one of those lldbasserts.