]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
doc/
authorPedro Alves <palves@redhat.com>
Tue, 19 Feb 2008 21:36:54 +0000 (21:36 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 19 Feb 2008 21:36:54 +0000 (21:36 +0000)
* gdb.texinfo (vAttach, vRun): Remove requirement of the stub
killing the inferior when it is already debugging a process.

gdbserver/
* server.c (handle_v_requests): When handling the vRun and vAttach
packets, if already debugging a process, don't kill it.  Return an
error instead.

gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/gdbserver/ChangeLog
gdb/gdbserver/server.c

index 9f2dcf98ce654791214c57b76a36bb8e8a9616c4..347b78a7b16a20cda5bd772dd3d425a61a47a1d6 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-19  Pedro Alves  <pedro@codesourcery.com>
+
+       * gdb.texinfo (vAttach, vRun): Remove requirement of the stub
+       killing the inferior when it is already debugging a process.
+
 2008-02-13  Markus Deuling  <deuling@de.ibm.com>
 
        * gdbint.texinfo (Build Script): New section. Mention new build script
index 87543508527e71c7e8a6e91f0bfd4146f8479898..9061fa252f3c3c55e8cc4a5a12813de51fc844f2 100644 (file)
@@ -23706,8 +23706,8 @@ up to the first @samp{;} or @samp{?} (or the end of the packet).
 @item vAttach;@var{pid}
 @cindex @samp{vAttach} packet
 Attach to a new process with the specified process ID.  @var{pid} is a
-hexadecimal integer identifying the process.  If the stub is currently
-controlling a process, it is killed.  The attached process is stopped.
+hexadecimal integer identifying the process.  The attached process is
+stopped.
 
 This packet is only available in extended mode (@pxref{extended mode}).
 
@@ -23821,7 +23821,7 @@ Run the program @var{filename}, passing it each @var{argument} on its
 command line.  The file and arguments are hex-encoded strings.  If
 @var{filename} is an empty string, the stub may use a default program
 (e.g.@: the last program run).  The program is created in the stopped
-state.  If the stub is currently controlling a process, it is killed.
+state.
 
 This packet is only available in extended mode (@pxref{extended mode}).
 
index 6ec1704c41e2635f3837643eca9a8d368ea41c05..855a6071b5f91db8d189b742459e716f99a126cc 100644 (file)
@@ -1,3 +1,9 @@
+2008-02-19  Pedro Alves  <pedro@codesourcery.com>
+
+       * server.c (handle_v_requests): When handling the vRun and vAttach
+       packets, if already debugging a process, don't kill it.  Return an
+       error instead.
+
 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * server.c (handle_query): Correct length check.
index 79bde643bdc7b93d0113bc31f5ec83ef176a10ea..31f8a6cd155c3d50c4d587c86767b0e0e895fd34 100644 (file)
@@ -928,8 +928,9 @@ handle_v_requests (char *own_buf, char *status, int *signal,
     {
       if (target_running ())
        {
-         fprintf (stderr, "Killing inferior\n");
-         kill_inferior ();
+         fprintf (stderr, "Already debugging a process\n");
+         write_enn (own_buf);
+         return;
        }
       handle_v_attach (own_buf, status, signal);
       return;
@@ -939,8 +940,9 @@ handle_v_requests (char *own_buf, char *status, int *signal,
     {
       if (target_running ())
        {
-         fprintf (stderr, "Killing inferior\n");
-         kill_inferior ();
+         fprintf (stderr, "Already debugging a process\n");
+         write_enn (own_buf);
+         return;
        }
       handle_v_run (own_buf, status, signal);
       return;