aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
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/doc
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/doc')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdb.texinfo28
2 files changed, 33 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 2217332..65aa06b 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-14 Pedro Alves <pedro@codesourcery.com>
+
+ * gdb.texinfo (Remote Configuration): Document query-attached.
+ (General Query Packets): Document qAttached.
+
2009-03-05 Pedro Alves <pedro@codesourcery.com>
* gdb.texinfo (Background Execution): Better describe the set
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 5b3c50b..33bac26 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -14425,6 +14425,10 @@ are:
@item @code{osdata}
@tab @code{qXfer:osdata:read}
@tab @code{info os}
+
+@item @code{query-attached}
+@tab @code{qAttached}
+@tab Querying remote process attach state.
@end multitable
@node Remote Stub
@@ -27306,6 +27310,30 @@ not recognize the @var{object} keyword, or its support for
@var{object} does not recognize the @var{operation} keyword, the stub
must respond with an empty packet.
+@item qAttached:@var{pid}
+@cindex query attached, remote request
+@cindex @samp{qAttached} packet
+Return an indication of whether the remote server attached to an
+existing process or created a new process. When the multiprocess
+protocol extensions are supported (@pxref{multiprocess extensions}),
+@var{pid} is an integer in hexadecimal format identifying the target
+process. Otherwise, @value{GDBN} will omit the @var{pid} field and
+the query packet will be simplified as @samp{qAttached}.
+
+This query is used, for example, to know whether the remote process
+should be detached or killed when a @value{GDBN} session is ended with
+the @code{quit} command.
+
+Reply:
+@table @samp
+@item 1
+The remote server attached to an existing process.
+@item 0
+The remote server created a new process.
+@item E @var{NN}
+A badly formed request or an error was encountered.
+@end table
+
@end table
@node Register Packet Format