Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@ges.redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFC: ``detach remote''
Date: Wed, 07 Aug 2002 12:31:00 -0000	[thread overview]
Message-ID: <3D517576.2070001@ges.redhat.com> (raw)
In-Reply-To: <20020806210009.GA29965@nevyn.them.org>

> So, the GDB manual has this to say about remote debugging:
> 
>      To resume the remote program and stop debugging it, use the `detach'
>   command.
> 
> This is not how gdbserver works, and it isn't how any stubs I've worked with
> behave, either.  They'll sit and wait for a reconnection.  Rather than
> change the status quo, I would like to update the documentation and provide
> a way to get the previously documented behavior.  This uses the "K" packet
> described in my email to gdb@ last week.  The new command is `detach remote'
> which I'm not thrilled with but I'm a little short on ideas.  It's hard to
> find something to call this.
> 
> GDB and gdbserver patches attached.  Comments?

I don't think this is right - either for GDB or for the remote debug 
agent.  Local or remote, the user should be able to use:

	[attach PID]
	detach

The remote protocol has two modes -- ``remote'' and ``extended-remote''. 
  In the latter case, GDB doesn't drop the connection -- it assumes that 
the remote end will stay around.  (Lets ignore my desire to merge the 
pair and instead have remote probe the other end for extended-remote 
support :-)  Hence:

In ``remote'' mode.  A detach command should: drop the tcp connection; 
set the process free.

In ``extended-remote'' mode.  A detach coommand should: set the process 
free.  (Lets also ignore that there is no attach mechanism :-).

That leaves the question of how to implement it using protocol 
mechanisms.  The ``D'' is messed up, GDB sends the D and then totally 
ignores the reply.

As for remote debug agents, the ones I've used (pretty sure this applied 
to gdbserver when I last used it) quit as soon as the connection went 
down.  An explict daemon mode was required to make them hang around.

enjoy,
Andrew



  parent reply	other threads:[~2002-08-07 19:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-06 14:00 Daniel Jacobowitz
2002-08-06 22:17 ` Eli Zaretskii
2002-08-07 12:31 ` Andrew Cagney [this message]
2002-08-07 12:49   ` Daniel Jacobowitz
2002-08-07 15:31     ` Andrew Cagney
2002-08-08  6:24       ` Daniel Jacobowitz
2002-08-09 10:48         ` Andrew Cagney
2002-08-10 20:01           ` Daniel Jacobowitz
2002-08-11  8:15             ` Andrew Cagney
2002-08-11  9:35               ` Daniel Jacobowitz
2002-08-11  9:42                 ` Andrew Cagney
2002-08-11  9:52                   ` Daniel Jacobowitz
2002-08-11 11:02                 ` Andrew Cagney
2002-08-11 11:34                   ` Daniel Jacobowitz
2002-08-11 13:52                     ` Daniel Jacobowitz
2002-08-12  7:36                       ` Andrew Cagney
2002-08-12  7:47                         ` Daniel Jacobowitz
2002-08-29 15:07                           ` Daniel Jacobowitz
2002-09-03 14:32                             ` Andrew Cagney
2002-09-03 14:41                               ` Daniel Jacobowitz
2002-09-03 22:04                                 ` Eli Zaretskii
2002-09-03 22:04                               ` Eli Zaretskii
2002-09-03 22:14                               ` Eli Zaretskii
2002-08-12 10:29                         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D517576.2070001@ges.redhat.com \
    --to=ac131313@ges.redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox