labath added a comment.

In D98822#2637871 <https://reviews.llvm.org/D98822#2637871>, @jingham wrote:

> The gdb model - since gdb only supports one debugee per gdb - is to either 
> follow the fork or follow the parent.  It would be more in keeping with 
> lldb's model to make a new target for the child side of the fork, and use 
> that to follow the child.  That way you can continue to debug both the parent 
> and the child processes.  It doesn't look like you've gotten that far yet, 
> but IMO that's the direction we should be going for lldb.

This is no longer true -- gdb supports multiple inferiors these days (I'm not 
sure when exactly did it grow that support). The automatic detaching of the 
fork child can be disabled by the "detach-on-fork" setting, at which point you 
get two inferiors for each fork.

Michal doesn't appear to be interested in this feature right now, just the 
ability to follow the child process. I think that's fair, as the two inferior 
setup would be more complicated. However, I am keeping this scenario in mind 
and making sure that it's possible to support it in the future. The idea is 
that at the gdb protocol level we will have the notion of two inferiors (using 
the same syntax that gdb does), but the only thing that the client (and server, 
mostly) support is to immediately detach from one of the processes after a 
fork. Later this could be changed to do something more interesting.


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

https://reviews.llvm.org/D98822

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

Reply via email to