[Lldb-commits] [PATCH] D134642: Propagate FORK events back to client

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 10 16:59:15 PST 2023


jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.

First off,  Is there a meaningful distinction between "fork" and "clone" in this context? we call the act whereby a process generates a child process a fork everywhere else in lldb (e.g. in follow-fork-mode) so unless "clone" really does mean something different from fork, it's confusing to have this setting use "clone".

This patch seems to be two orthogonal pieces.  One is adding the "detach and keep stopped" capability to the NativeProcess classes.  That part seems fine to me, and fairly uncontroversial.  This is useful behavior independently of whether the any forks went on or not.  This part could really be a separate patch on its own.

And the other piece is to stop or not on fork events.  That also seems like a generally useful ability, but I'm a little unclear on how this interacts with follow-fork-mode.  If I'm following into the child, and I stop on the event, will I stop in the child already?  Or does it stop before, then when you "continue" you'll end up switching to the child?  If I stop at the fork event, then set "follow-fork-mode" to follow into the child and continue, will I end up in the child?  Seems like we should know how we think that's going to go, and test the various different combinations to ensure that behavior.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134642



More information about the lldb-commits mailing list