This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: ``detach remote''


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]