[PATCH 15/16 v2] Extended-remote exec event documentation

Don Breazeal
2014-08-21T00:36:07Z

This patch adds documentation of the new RSP support for exec events.

[This was previously approved by Eli:
https://sourceware.org/ml/gdb-patches/2014-05/msg00690.html]

Thanks
--Don

gdb/
2014-08-20 Don Breazeal <donb@codesourcery.com>

* NEWS: Mention RSP Stop Reply Packet, new stop reason 'exec'.
Mention gdbserver support for exec events on Linux.

gdb/doc/
2014-08-20 Don Breazeal <donb@codesourcery.com>

* gdb.texinfo (Stop Reply Packets): Document RSP support
for exec events.

---
gdb/NEWS | 21 ++++++++++++---------
gdb/doc/gdb.texinfo | 9 ++++++++-
2 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/gdb/NEWS b/gdb/NEWS
index c3b1d23..3faeb05 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -14,20 +14,23 @@
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.

-* Remote fork events
+* Remote fork and exec 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.
+ GDBserver extended-remote Linux targets now support fork and exec
+ events. This enables follow-fork-mode, detach-on-fork, follow-exec-mode,
+ catch fork, catch vfork, and catch exec for those targets with Linux
+ kernels that support these events. Linux kernel versions 2.5.60 and
+ later support all of these events.

* 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.
+ The T stop reply packet supports new stop reasons 'fork', 'vfork',
+ 'vforkdone', and 'exec'. 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. The 'exec' reason signifies
+ that the specified inferior executed a call to execve.

*** Changes in GDB 7.8

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 07c151b..5c333d5 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -3196,7 +3196,8 @@ process, use the @code{file} command with the parent executable name
as its argument. By default, after an @code{exec} call executes,
@value{GDBN} discards the symbols of the previous executable image.
You can change this behaviour with the @w{@code{set follow-exec-mode}}
-command.
+command. This command is supported when connected to @code{gdbserver}
++using @kbd{target extended-remote} as well as in native mode.

@table @code
@kindex set follow-exec-mode
@@ -34746,6 +34747,12 @@ 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 exec events, remote reply
+@item exec
+The packet indicates that @code{execve} was called, and @var{r} is the
+absolute pathname of the file that was executed, in hex. This packet
+is only applicable to targets that support exec events.
+
@cindex replay log events, remote reply
@item replaylog
The packet indicates that the target cannot continue replaying
--
1.7.0.4