This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC]: Remote Protocol "attach" command.
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: [RFC]: Remote Protocol "attach" command.
- From: jtc at redback dot com (J.T. Conklin)
- Date: 26 Sep 2000 14:07:35 -0700
- Cc: Michael Snyder <msnyder at redhat dot com>,gdb-patches at sourceware dot cygnus dot com
- References: <39AD801B.2C7C@redhat.com> <5mem2wqbwi.fsf@jtc.redback.com> <39D0F042.FE0BD152@cygnus.com>
- Reply-To: jtc at redback dot com
>>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
>> There already is a detach command. I think the protocol spec could be
>> worded to indicate that the program under debug is released to
>> continue executing. It does not appear that gdbserver understands the
>> command. Question: after the inferior is detached, should you be able
>> to re-attach (or attach to a different process) without
>> re-establishing communication to the debug agent (with `target remote
>> <foo>')?
Andrew> That detatch command is something else again. I think it is
Andrew> wrong / broken. The rationale is similar to why the set-baud
Andrew> packet was broken.
Andrew> GDB sends the ``detatch'' packet just before the connection is
Andrew> dropped. This allows something haning of a semi-permenant
Andrew> serial connection (ie serial port) to be notified of GDB's
Andrew> pending departure. What should happen is that the transport
Andrew> layer should shut its self down. The detatch packet scrambles
Andrew> protocol layers :-(
I didn't realize that the existing detach packet was used like that.
I 100% agree that no packet should effect the transport layer.
However, if there is a way to attach to the target (where attach is
distinct from establishing a connection to it), I believe that there
should also be some way to detach from it and have it continue as if
nothing happened.
--jtc
--
J.T. Conklin
RedBack Networks