aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-02-19 21:36:54 +0000
committerPedro Alves <palves@redhat.com>2008-02-19 21:36:54 +0000
commitfd96d2509cf0467d293f63f3c83dee43a62099ba (patch)
tree275d09b6857e1b9e5e5796dec988679afbecbcf1 /gdb/gdbserver
parentd9bf65d51a514fca5b56b75b0e4b7d0364c78207 (diff)
downloadgdb-fd96d2509cf0467d293f63f3c83dee43a62099ba.zip
gdb-fd96d2509cf0467d293f63f3c83dee43a62099ba.tar.gz
gdb-fd96d2509cf0467d293f63f3c83dee43a62099ba.tar.bz2
doc/
* 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.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog6
-rw-r--r--gdb/gdbserver/server.c10
2 files changed, 12 insertions, 4 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 6ec1704..855a607 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -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.
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 79bde64..31f8a6c 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -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;