From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13230 invoked by alias); 11 Aug 2002 20:52:26 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13223 invoked from network); 11 Aug 2002 20:52:25 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 11 Aug 2002 20:52:25 -0000 Received: from dsl093-061-169.pit1.dsl.speakeasy.net ([66.93.61.169] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17dzhI-0006MG-00; Sun, 11 Aug 2002 15:52:24 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17dzhW-00069d-00; Sun, 11 Aug 2002 16:52:38 -0400 Date: Sun, 11 Aug 2002 13:52:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney , gdb-patches@sources.redhat.com Subject: Re: RFC: ``detach remote'' Message-ID: <20020811205238.GA23632@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com References: <3D517576.2070001@ges.redhat.com> <20020807194959.GA1535@nevyn.them.org> <3D519FB2.6090605@ges.redhat.com> <20020808132512.GA1840@nevyn.them.org> <3D540069.6010203@ges.redhat.com> <20020811030130.GA10208@nevyn.them.org> <3D567F7B.7080502@ges.redhat.com> <20020811163515.GA14609@nevyn.them.org> <3D56A6A1.7040904@ges.redhat.com> <20020811183448.GA19112@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020811183448.GA19112@nevyn.them.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-08/txt/msg00257.txt.bz2 On Sun, Aug 11, 2002 at 02:34:48PM -0400, Daniel Jacobowitz wrote: > > >One other thorny issue becomes what to do when the user quits or closes > > >the remote target etc. Right now GDB offers the "kill" prompt as I > > >showed above. For extended-remote that doesn't make a lot of sense to > > >me... I think that either "disconnect" or a "kill"/"terminate" sequence > > >makes more sense. Thoughts? > > > > The sequence is: > > > > (gdb) attach 20856 > > Attaching to program: /home/scratch/GDB/native/gdb/gdb, process 20856 > > 0x41b44a04 in ?? () > > (gdb) target core gdb.core > > A program is being debugged already. Kill it? (y or n) > > > > In certain situtations, yes that message doesn't make sense. The > > default [y] should still be to do something pretty fatal though. > > Perhaphs suggest ``detaching'' first. > > The think is, now it uses kill. Kill would not close the agent > session, which is obviously not the desired behavior. If you want it > to kill the agent (I think this is reasonable!) then there needs to be > a command for it other than the ``monitor'' odds-and-ends command, so > that extended-remote targets will have some obligation to know what to > do when they receive the kill message. This whole question put another way: Obviously, if you start something with "run", you want to end it with "kill". Obviously, if you start something with "attach", you want to end it with "detach". [These are not hard and fast, of course. You can detach a run process or kill an attached process. But you surely see what I mean - they're logical opposites.] If you start something with "target", how do you end it? I propose "disconnect". -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer