[Lldb-commits] [PATCH] D129652: [lldb] [llgs] Convert m_debugged_processes into a map of structs

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 15 01:48:20 PDT 2022


labath added inline comments.
Herald added a subscriber: JDevlieghere.


================
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.
----------------
mgorny wrote:
> 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).
Ah, yes, that makes sense. I should have looked at the code as well. Thanks for explaining.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129652



More information about the lldb-commits mailing list