aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/server.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-03-14 01:38:08 +0000
committerPedro Alves <palves@redhat.com>2009-03-14 01:38:08 +0000
commit0b16c5cfafcd58f3b5f069c8058069814986f859 (patch)
treeaa12014acd4497f30b4fe86ffaaa137e97a8504e /gdb/gdbserver/server.c
parent57898e02966028ed9da8a402eeeb27e8fe5c04c0 (diff)
downloadgdb-0b16c5cfafcd58f3b5f069c8058069814986f859.zip
gdb-0b16c5cfafcd58f3b5f069c8058069814986f859.tar.gz
gdb-0b16c5cfafcd58f3b5f069c8058069814986f859.tar.bz2
2009-03-14 Pedro Alves <pedro@codesourcery.com>
gdb/ * remote.c (PACKET_qAttached): New. (remote_query_attached): New. (remote_add_inferior): Add new `attached' argument. Handle it. (remote_notice_new_inferior, remote_start_remote): Adjust to pass -1 to remote_add_inferior in new parameter. (extended_remote_attach_1): Adjust to pass 1 to remote_add_inferior in the new parameter. (extended_remote_create_inferior_1): Adjust to pass 0 to remote_add_inferior in the new parameter. (_initialize_remote): Add "set/show remote query-attached-packet" commands. 2009-03-14 Pedro Alves <pedro@codesourcery.com> gdb/gdbserver/ * server.c (handle_query): Handle "qAttached". 2009-03-14 Pedro Alves <pedro@codesourcery.com> gdb/doc/ * gdb.texinfo (Remote Configuration): Document query-attached. (General Query Packets): Document qAttached.
Diffstat (limited to 'gdb/gdbserver/server.c')
-rw-r--r--gdb/gdbserver/server.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 416ceb3..0a51a7f 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -1040,6 +1040,13 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
return;
}
+ if (strcmp (own_buf, "qAttached") == 0)
+ {
+ require_running (own_buf);
+ strcpy (own_buf, attached ? "1" : "0");
+ return;
+ }
+
/* Otherwise we didn't know what packet it was. Say we didn't
understand it. */
own_buf[0] = 0;