diff options
author | Pedro Alves <palves@redhat.com> | 2009-03-14 01:38:08 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-03-14 01:38:08 +0000 |
commit | 0b16c5cfafcd58f3b5f069c8058069814986f859 (patch) | |
tree | aa12014acd4497f30b4fe86ffaaa137e97a8504e /gdb/gdbserver | |
parent | 57898e02966028ed9da8a402eeeb27e8fe5c04c0 (diff) | |
download | gdb-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')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/gdbserver/server.c | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 89d088a..07d772d 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2009-03-14 Pedro Alves <pedro@codesourcery.com> + + * server.c (handle_query): Handle "qAttached". + 2009-03-13 Nathan Sidwell <nathan@codesourcery.com> * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to 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; |