This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 10/16 v3] Extended-remote fork event documentation
- From: Don Breazeal <donb at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Fri, 31 Oct 2014 16:28:48 -0700
- Subject: [PATCH 10/16 v3] Extended-remote fork event documentation
- Authentication-results: sourceware.org; auth=none
- References: <1408580964-27916-1-git-send-email-donb at codesourcery dot com>
This patch adds documentation for fork events on extended-remote linux
targets in the gdb manual and the NEWS file.
[This patch was approved by Eli:
https://sourceware.org/ml/gdb-patches/2014-08/msg00157.html]
Thanks
--Don
gdb/
2014-08-20 Don Breazeal <donb@codesourcery.com>
* gdb/NEWS: Describe new gdbserver support for fork events and new
fork event support in RSP.
gdb/doc
2014-08-20 Don Breazeal <donb@codesourcery.com>
* gdb/doc/gdb.texinfo (Forks): Describe fork debugging support in
gdbserver.
(Set Catchpoints): Describe fork catchpoint support in gdbserver.
(Stop Reply Packets): Describe fork event support in RSP.
---
gdb/NEWS | 15 +++++++++++++++
gdb/doc/gdb.texinfo | 33 +++++++++++++++++++++++++++++----
2 files changed, 44 insertions(+), 4 deletions(-)
diff --git a/gdb/NEWS b/gdb/NEWS
index 01cdc36..1c07663 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -59,6 +59,21 @@ SGI Irix-6.x mips-*-irix6*
VAX running (4.2 - 4.3 Reno) BSD vax-*-bsd*
VAX running Ultrix vax-*-ultrix*
+* Remote fork events
+
+ GDBserver extended-remote Linux targets now support fork events.
+ This enables follow-fork-mode, detach-on-fork, catch fork, and
+ catch vfork for those targets with Linux kernels 2.5.60 and later.
+
+* New remote packets
+
+T Stop Reply Packet's reason
+ The T stop reply packet supports new stop reasons 'fork', 'vfork'
+ and 'vforkdone'. The 'fork' and 'vfork' reasons signify that the
+ specified inferior has executed a fork or vfork. The 'vforkdone'
+ reason signifies that a vforked child process has executed either
+ an exec or an exit.
+
*** Changes in GDB 7.8
* New command line options
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 15c2908..9787623 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -3107,6 +3107,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.
@@ -4387,13 +4390,15 @@ Again, in this case @value{GDBN} would not be able to display syscall's names.
@item fork
@kindex catch fork
-A call to @code{fork}. This is currently only available for HP-UX
-and @sc{gnu}/Linux.
+A call to @code{fork}. This is currently only available for native
+HP-UX and @sc{gnu}/Linux, and when connected to @code{gdbserver} running
+on @sc{gnu}/Linux with @kbd{target extended-remote}.
@item vfork
@kindex catch vfork
-A call to @code{vfork}. This is currently only available for HP-UX
-and @sc{gnu}/Linux.
+A call to @code{vfork}. This is currently only available for native
+HP-UX and @sc{gnu}/Linux, and when connected to @code{gdbserver} running
+on @sc{gnu}/Linux with @kbd{target extended-remote}.
@item load @r{[}regexp@r{]}
@itemx unload @r{[}regexp@r{]}
@@ -34700,6 +34705,26 @@ The packet indicates that the loaded libraries have changed.
@value{GDBN} should use @samp{qXfer:libraries:read} to fetch a new
list of loaded libraries. The @var{r} part is ignored.
+@cindex fork events, remote reply
+@item fork
+The packet indicates that @code{fork} was called, and @var{r}
+is the ptid of the new child process. This packet is only
+applicable to targets that support fork events.
+
+@cindex vfork events, remote reply
+@item vfork
+The packet indicates that @code{vfork} was called, and @var{r}
+is the ptid of the new child process. This packet is only
+applicable to targets that support vfork events.
+
+@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.
+
@cindex replay log events, remote reply
@item replaylog
The packet indicates that the target cannot continue replaying
--
1.7.0.4