public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Don Breazeal <donb@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [pushed][PATCH 7/7] Extended-remote fork event docs
Date: Tue, 12 May 2015 17:29:00 -0000	[thread overview]
Message-ID: <1431451695-12273-7-git-send-email-donb@codesourcery.com> (raw)
In-Reply-To: <1431451695-12273-1-git-send-email-donb@codesourcery.com>

This is the version of the patch that I pushed.
Thanks
--Don


This patch contains the accumulated documentation changes for the
rest of the extended-remote follow fork patchset.

gdb/ChangeLog:

        * NEWS: Announce fork support in the RSP and support
          for fork debugging in extended mode.

gdb/doc/ChangeLog:

        * gdb.texinfo (Forks): Note that fork debugging is
          supported in extended mode.
          (Remote Configuration): Add fork event features to table
          of packet settings.
          (Stop Reply Packets): Add fork events to list of stop reasons.
          (General Query Packets): Add fork events to tables of
          'gdbfeatures' and 'stub features' supported in the qSupported
          packet, as well as to the list containing stub feature
          details.
---
 gdb/ChangeLog       |  5 ++++
 gdb/NEWS            | 24 ++++++++++++++++
 gdb/doc/ChangeLog   | 12 ++++++++
 gdb/doc/gdb.texinfo | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 124 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 53d6d5d..a316b4e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2015-05-12  Don Breazeal  <donb@codesourcery.com>
 
+	* NEWS: Announce fork support in the RSP and support
+	for fork debugging in extended mode.
+
+2015-05-12  Don Breazeal  <donb@codesourcery.com>
+
 	* remote.c (remote_insert_fork_catchpoint): New function.
 	(remote_remove_fork_catchpoint): New function.
 	(remote_insert_vfork_catchpoint): New function.
diff --git a/gdb/NEWS b/gdb/NEWS
index 51e4f4e..bf12101 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -128,6 +128,30 @@ qXfer:exec-file:read
   Return the full absolute name of the file that was executed to
   create a process running on the remote system.
 
+fork stop reason
+  Indicates that a fork system call was executed.
+
+vfork stop reason
+  Indicates that a vfork system call was executed.
+
+vforkdone stop reason
+  Indicates that a vfork child of the specified process has executed
+  an exec or exit, allowing the vfork parent to resume execution.
+
+fork-events and vfork-events features in qSupported
+  The qSupported packet allows GDB to request support for fork and 
+  vfork events using new 'gdbfeatures' fork-events and vfork-events,
+  and the qSupported response can contain the corresponding
+  'stubfeatures'.  Set and show commands can be used to display
+  whether these features are enabled.
+
+* Extended-remote fork events
+
+  ** GDB now has support for fork events on extended-remote Linux
+     targets.  For targets with Linux kernels 2.5.60 and later, this
+     enables follow-fork-mode and detach-on-fork for both fork and
+     vfork, as well as fork and vfork catchpoints.
+
 * The info record command now shows the recording format and the
   branch tracing configuration for the current thread when using
   the btrace record target.
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 05aeab7..849deb8 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,15 @@
+2015-05-12  Don Breazeal  <donb@codesourcery.com>
+
+	* gdb.texinfo (Forks): Note that fork debugging is
+	supported in extended mode.
+	(Remote Configuration): Add fork event features to table
+	of packet settings.
+	(Stop Reply Packets): Add fork events to list of stop reasons.
+	(General Query Packets): Add fork events to tables of
+	'gdbfeatures' and 'stub features' supported in the qSupported
+	packet, as well as to the list containing stub feature
+	details.
+
 2015-05-12  Gary Benson <gbenson@redhat.com>
 
 	* gdb.texinfo (General Query Packets): Document
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 5461356..cb9cd35 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -3135,6 +3135,9 @@ create additional processes using the @code{fork} or @code{vfork} functions.
 Currently, the only platforms with this feature are HP-UX (11.x and later
 only?) and @sc{gnu}/Linux (kernel version 2.5.60 and later).
 
+The fork debugging commands are supported in both native mode and when
+connected to @code{gdbserver} using @kbd{target extended-remote}.
+
 By default, when a program forks, @value{GDBN} will continue to debug
 the parent process and the child process will run unimpeded.
 
@@ -19938,6 +19941,14 @@ are:
 @tab @code{hwbreak stop reason}
 @tab @code{hbreak}
 
+@item @code{fork-event-feature}
+@tab @code{fork stop reason}
+@tab @code{fork}
+
+@item @code{vfork-event-feature}
+@tab @code{vfork stop reason}
+@tab @code{vfork}
+
 @end multitable
 
 @node Remote Stub
@@ -35372,6 +35383,49 @@ The @var{r} part must be left empty.
 
 The same remarks about @samp{qSupported} and non-stop mode above
 apply.
+
+@cindex fork events, remote reply
+@item fork
+The packet indicates that @code{fork} was called, and @var{r}
+is the thread ID of the new child process.  Refer to
+@ref{thread-id syntax} for the format of the @var{thread-id}
+field.  This packet is only applicable to targets that support
+fork events.
+
+This packet should not be sent by default; older @value{GDBN} versions
+did not support it.  @value{GDBN} requests it, by supplying an
+appropriate @samp{qSupported} feature (@pxref{qSupported}).  The
+remote stub must also supply the appropriate @samp{qSupported} feature
+indicating support.
+
+@cindex vfork events, remote reply
+@item vfork
+The packet indicates that @code{vfork} was called, and @var{r}
+is the thread ID of the new child process. Refer to
+@ref{thread-id syntax} for the format of the @var{thread-id}
+field.  This packet is only applicable to targets that support
+vfork events.
+
+This packet should not be sent by default; older @value{GDBN} versions
+did not support it.  @value{GDBN} requests it, by supplying an
+appropriate @samp{qSupported} feature (@pxref{qSupported}).  The
+remote stub must also supply the appropriate @samp{qSupported} feature
+indicating support.
+
+@cindex vforkdone events, remote reply
+@item vforkdone
+The packet indicates that a child process created by a vfork
+has either called @code{exec} or terminated, so that the
+address spaces of the parent and child process are no longer
+shared. The @var{r} part is ignored.  This packet is only
+applicable to targets that support vforkdone events.
+
+This packet should not be sent by default; older @value{GDBN} versions
+did not support it.  @value{GDBN} requests it, by supplying an
+appropriate @samp{qSupported} feature (@pxref{qSupported}).  The
+remote stub must also supply the appropriate @samp{qSupported} feature
+indicating support.
+
 @end table
 
 @item W @var{AA}
@@ -35964,6 +36018,18 @@ reason in stop replies.  @xref{swbreak stop reason}, for details.
 @item hwbreak
 This feature indicates whether @value{GDBN} supports the hwbreak stop
 reason in stop replies.  @xref{swbreak stop reason}, for details.
+
+@item fork-events
+This feature indicates whether @value{GDBN} supports fork event
+extensions to the remote protocol.  @value{GDBN} does not use such
+extensions unless the stub also reports that it supports them by
+including @samp{fork-events+} in its @samp{qSupported} reply.
+
+@item vfork-events
+This feature indicates whether @value{GDBN} supports vfork event
+extensions to the remote protocol.  @value{GDBN} does not use such
+extensions unless the stub also reports that it supports them by
+including @samp{vfork-events+} in its @samp{qSupported} reply.
 @end table
 
 Stubs should ignore any unknown values for
@@ -36207,6 +36273,16 @@ These are the currently defined stub features and their properties:
 @tab @samp{-}
 @tab No
 
+@item @samp{fork-events}
+@tab No
+@tab @samp{-}
+@tab No
+
+@item @samp{vfork-events}
+@tab No
+@tab @samp{-}
+@tab No
+
 @end multitable
 
 These are the currently defined stub features, in more detail:
@@ -36399,6 +36475,13 @@ breakpoints.
 The remote stub reports the @samp{hwbreak} stop reason for hardware
 breakpoints.
 
+@item fork-events
+The remote stub reports the @samp{fork} stop reason for fork events.
+
+@item vfork-events
+The remote stub reports the @samp{vfork} stop reason for vfork events
+and vforkdone events.
+
 @end table
 
 @item qSymbol::
-- 
1.8.1.1

      parent reply	other threads:[~2015-05-12 17:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 17:28 [pushed][PATCH 1/7] Identify remote fork event support Don Breazeal
2015-05-12 17:28 ` [pushed][PATCH 3/7] Extended-remote Linux follow fork Don Breazeal
2015-05-12 17:28 ` [pushed][PATCH 2/7] Clone remote breakpoints Don Breazeal
2015-05-12 17:29 ` [pushed][PATCH 5/7] Extended-remote follow vfork Don Breazeal
2015-05-12 17:29 ` [pushed][PATCH 6/7] Extended-remote fork catch Don Breazeal
2015-05-14 22:11   ` Sergio Durigan Junior
2015-05-14 23:26     ` Don Breazeal
2015-05-14 23:41       ` Sergio Durigan Junior
2015-05-28 22:22         ` Don Breazeal
2015-05-12 17:29 ` [pushed][PATCH 4/7] Arch-specific remote follow fork Don Breazeal
2015-05-14 10:25   ` Vidya Praveen
2015-05-14 16:02     ` Breazeal, Don
2015-05-12 17:29 ` Don Breazeal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431451695-12273-7-git-send-email-donb@codesourcery.com \
    --to=donb@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).