mgorny added inline comments.

================
Comment at: 
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:1058-1060
     // Terminate the main loop only if vKill has not been used.
     // When running in non-stop mode, wait for the vStopped to clear
     // the notification queue.
----------------
labath wrote:
> Btw, is this actually correct. E.g. I don't think we ought to terminate the 
> connection if a process dies "naturally", and there are still other processes 
> around...
> 
> Isn't it more like the opposite, that if `k` is used, *then* we close the 
> connection (after all processes exit)? And maybe also when the process exits, 
> and multiprocess extensions are disabled?
Well, the comment describes some of the cases when we don't terminate it, i.e. 
it skips the kinda-obvious case when there are additional processes running, 
i.e. we stop it only if all of the following apply: a. all processes have 
exited, b. we are not in non-stop mode (in non-stop mode we wait for 
`vStopped`) and c. the last process wasn't killed by `vKill` (to match the 
behavior of GDB).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129652/new/

https://reviews.llvm.org/D129652

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to