On Friday 19 September 2008 17:29:49, Daniel Jacobowitz wrote: > There's two things I don't want to end up with: crashes or other > inconsistent behavior if you connect to a multi-process stub > using target remote (which is what I was worried about here), > and gratuitous differences between remote and extended-remote. > > It seems to me that we should define the actual difference - to the > user - between target remote and target extended-remote.  Is it the > fact that kill does not disconnect you from the remote target (and > usually cause it to exit)?  If so, I don't think we should announce or > support the multiprocess extensions when using target remote. > It'll be just like things are today. As we talked this on IRC, the only current description of "extended" in the current docs is: "In extended mode, the remote server is made persistent". The other difference is attach and run support. If we make GDB assume that on a "target remote" connection kill ('k') and detach ('D') kills and detaches from all inferiors, I doesn't seem to be that much different from what we have today. At least, the single-inferior case shouldn't be different, except, ... The only issue I see, is that "target remote"'s detach would need be know to remove breakpoints from all inferiors, because the common code's common case of detaching from the current inferior wouldn't know that this target would have this different behaviour. Hmmm, for that reason, I propose sticking to the original plan for now, and only indeed only announce multi-process support in target extended-remote. At least, until we need it in target remote. I do have a strong feeling we're coming come back to this soonish. :-) Attached patch does that. The differences from the previous patches are: The changes we're discussing: - new remote_state field `extended' - new predicate function remote_multi_process_p, which checks for extended-remote usage. And what I refered I had forgotten to merge into this patch: - detecting new inferiors in remote_threads_info - Getting rid of the inferiors when getting rid of the target. Retested against a x86_64-unknown-linux-gnu gdbserver. Confirmed that connecting against a multi-process aware gdbserver (in the works), behaves as we're discussing. OK? -- Pedro Alves