This is an archive of the discontinued LLVM Phabricator instance.

[LLGS] Avoid bogus error message on process termination
ClosedPublic

Authored by labath on Jul 27 2015, 4:09 AM.

Details

Summary

Handle_k was printing an error when killing a process because KillSpawnedProcess was expecting to
be asynchronously notified of the process death, which no longer works, since we don't wait for
the process on a separate thread. However, the whole usage of KillSpawnedProcess is dubious here,
since it tries to be nice and terminate the process first with SIGTERM, which will not have the
intended effect on a ptraced process. I replace this code with a call to
NativeProcessProtocol::Kill, which does not suffer from these problems.

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 30683.Jul 27 2015, 4:09 AM
labath retitled this revision from to [LLGS] Avoid bogus error message on process termination.
labath updated this object.
labath added reviewers: chaoren, ovyalov.
labath added a subscriber: lldb-commits.
ovyalov accepted this revision.Jul 27 2015, 9:56 AM
ovyalov edited edge metadata.
ovyalov added inline comments.
source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
1158 ↗(On Diff #30683)

Could you log the error string as well?

This revision is now accepted and ready to land.Jul 27 2015, 9:56 AM
This revision was automatically updated to reflect the committed changes.
labath marked an inline comment as done.