Blob Blame History Raw
commit 2be51225ab0155c384bc0366c34bcdb6e69def15
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Date:   Fri Apr 5 13:19:12 2013 +0000

    Fix double 'the the' in documentation.
    
    git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13363 a5019735-40e9-0310-863c-91ae7b9d1cf9

diff --git a/cachegrind/docs/cg-manual.xml b/cachegrind/docs/cg-manual.xml
index 13331d8..f45bda8 100644
--- a/cachegrind/docs/cg-manual.xml
+++ b/cachegrind/docs/cg-manual.xml
@@ -352,7 +352,7 @@ a column contains only a dot it means the function never performs
 that event (e.g. the third row shows that
 <computeroutput>strcmp()</computeroutput> contains no
 instructions that write to memory). The name
-<computeroutput>???</computeroutput> is used if the the file name
+<computeroutput>???</computeroutput> is used if the file name
 and/or function name could not be determined from debugging
 information. If most of the entries have the form
 <computeroutput>???:???</computeroutput> the program probably
@@ -1367,7 +1367,7 @@ shortcomings:</para>
 </itemizedlist>
 
 <para>Another thing worth noting is that results are very sensitive.
-Changing the size of the the executable being profiled, or the sizes
+Changing the size of the executable being profiled, or the sizes
 of any of the shared libraries it uses, or even the length of their
 file names, can perturb the results.  Variations will be small, but
 don't expect perfectly repeatable results if your program changes at
diff --git a/docs/xml/manual-core-adv.xml b/docs/xml/manual-core-adv.xml
index 73bdb5a..ff17351 100644
--- a/docs/xml/manual-core-adv.xml
+++ b/docs/xml/manual-core-adv.xml
@@ -1542,7 +1542,7 @@ that wildcards are allowed for both sonames and function names.
 The details are discussed below.</para>
 
 <para><computeroutput>VALGRIND_GET_ORIG_FN</computeroutput>: 
-once in the the wrapper, the first priority is
+once in the wrapper, the first priority is
 to get hold of the address of the original (and any other supporting
 information needed).  This is stored in a value of opaque 
 type <computeroutput>OrigFn</computeroutput>.
diff --git a/drd/docs/drd-manual.xml b/drd/docs/drd-manual.xml
index a94d612..7e20d99 100644
--- a/drd/docs/drd-manual.xml
+++ b/drd/docs/drd-manual.xml
@@ -497,7 +497,7 @@ behavior of the DRD tool itself:</para>
         Print stack usage at thread exit time. When a program creates a large
         number of threads it becomes important to limit the amount of virtual
         memory allocated for thread stacks. This option makes it possible to
-        observe how much stack memory has been used by each thread of the the
+        observe how much stack memory has been used by each thread of the
         client program. Note: the DRD tool itself allocates some temporary
         data on the client thread stack. The space necessary for this
         temporary data must be allocated by the client program when it
diff --git a/exp-sgcheck/docs/sg-manual.xml b/exp-sgcheck/docs/sg-manual.xml
index 8b717e8..a8ee313 100644
--- a/exp-sgcheck/docs/sg-manual.xml
+++ b/exp-sgcheck/docs/sg-manual.xml
@@ -217,7 +217,7 @@ of.</para>
   </listitem>
 
   <listitem>
-   <para>Coverage: SGCheck does not check whether the the areas read
+   <para>Coverage: SGCheck does not check whether the areas read
    or written by system calls do overrun stack or global arrays.  This
    would be easy to add.</para>
   </listitem>
diff --git a/memcheck/docs/mc-manual.xml b/memcheck/docs/mc-manual.xml
index 7a22401..c007759 100644
--- a/memcheck/docs/mc-manual.xml
+++ b/memcheck/docs/mc-manual.xml
@@ -821,7 +821,7 @@ is <option>--errors-for-leak-kinds=definite,possible</option>
       bytes are marked as initialised.</para>
 
       <para>Note that code that behaves in this way is in violation of
-      the the ISO C/C++ standards, and should be considered broken.  If
+      the ISO C/C++ standards, and should be considered broken.  If
       at all possible, such code should be fixed.  This option should be
       used only as a last resort.</para>
     </listitem>
diff --git a/memcheck/docs/mc-tech-docs.xml b/memcheck/docs/mc-tech-docs.xml
index 1de368e..94911d0 100644
--- a/memcheck/docs/mc-tech-docs.xml
+++ b/memcheck/docs/mc-tech-docs.xml
@@ -848,7 +848,7 @@ turn maintained by
 <title>Introduction to UCode</title>
 
 <para>UCode lies at the heart of the x86-to-x86 JITter.  The
-basic premise is that dealing the the x86 instruction set head-on
+basic premise is that dealing with the x86 instruction set head-on
 is just too darn complicated, so we do the traditional
 compiler-writer's trick and translate it into a simpler,
 easier-to-deal-with form.</para>

commit b0bd2e9aca5eab4f1c8e6e2cb15d2ee325200e63
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Date:   Wed Jul 3 10:00:19 2013 +0000

    Bug 321738 Add manpages for vgdb and valgrind-listener.
    
    git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13443 a5019735-40e9-0310-863c-91ae7b9d1cf9

diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am
index a9f4b03..7cb0308 100644
--- a/auxprogs/Makefile.am
+++ b/auxprogs/Makefile.am
@@ -11,6 +11,7 @@ dist_noinst_SCRIPTS = \
 	posixtestsuite-1.5.1-diff-results
 
 EXTRA_DIST = \
+	docs/valgrind-listener-manpage.xml \
 	DotToScc.hs \
 	Merge3Way.hs \
 	gsl16-badfree.patch \
diff --git a/auxprogs/docs/valgrind-listener-manpage.xml b/auxprogs/docs/valgrind-listener-manpage.xml
new file mode 100644
index 0000000..da761b1
--- /dev/null
+++ b/auxprogs/docs/valgrind-listener-manpage.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0"?> <!-- -*- sgml -*- -->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+          "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[ <!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities; ]>
+
+
+<refentry id="listener">
+
+<refmeta>
+  <refentrytitle>valgrind-listener</refentrytitle>
+  <manvolnum>1</manvolnum>
+  <refmiscinfo>Release &rel-version;</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+  <refname>valgrind-listener</refname>
+  <refpurpose>listens on a socket for Valgrind commentary</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<cmdsynopsis>
+  <command>valgrind-listener</command>
+  <arg><replaceable>options</replaceable></arg>
+</cmdsynopsis>
+</refsynopsisdiv>
+
+
+<refsect1 id="description">
+<title>Description</title>
+
+<para><command>valgrind-listener</command> accepts (multiple) connections
+from <command>valgrind</command> processes that use the
+<option>--log-socket</option> option on the specified port and copies the
+commentary it is sent to stdout.
+</para>
+
+</refsect1>
+
+
+
+<refsect1 id="options">
+<title>Options</title>
+
+<xi:include href="../../docs/xml/manual-core.xml" xpointer="listener.opts.list"
+            xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+</refsect1>
+
+
+
+
+<refsect1 id="see_also">
+<title>See Also</title>
+
+<para>
+valgrind(1),
+<filename>&vg-docs-path;</filename> or
+<filename>&vg-docs-url;</filename>.
+</para>
+
+</refsect1>
+
+
+<refsect1 id="author">
+<title>Author</title>
+
+<para>Julian Seward.</para>
+
+</refsect1>
+
+
+</refentry>
+
+
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
index 6d0fe83..32b0286 100644
--- a/coregrind/Makefile.am
+++ b/coregrind/Makefile.am
@@ -24,7 +24,8 @@ endif
 EXTRA_DIST = \
 	m_debuginfo/UNUSED_STABS.txt \
 	m_debuginfo/README.txt \
-	m_gdbserver/README_DEVELOPERS
+	m_gdbserver/README_DEVELOPERS \
+	docs/vgdb-manpage.xml
 
 #----------------------------------------------------------------------------
 # The launcher.  Built for the primary target only.
diff --git a/coregrind/docs/vgdb-manpage.xml b/coregrind/docs/vgdb-manpage.xml
new file mode 100644
index 0000000..85a62aa
--- /dev/null
+++ b/coregrind/docs/vgdb-manpage.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0"?> <!-- -*- sgml -*- -->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+          "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[ <!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities; ]>
+
+
+<refentry id="vgdb">
+
+<refmeta>
+  <refentrytitle>vgdb</refentrytitle>
+  <manvolnum>1</manvolnum>
+  <refmiscinfo>Release &rel-version;</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+  <refname>vgdb</refname>
+  <refpurpose>intermediary between Valgrind and GDB or a shell</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<cmdsynopsis>
+  <command>vgdb</command>
+  <arg><replaceable>options</replaceable></arg>
+</cmdsynopsis>
+</refsynopsisdiv>
+
+
+<refsect1 id="description">
+<title>Description</title>
+
+<para><command>vgdb</command> ("Valgrind to GDB") is used as an
+intermediary between Valgrind and GDB or a shell.  It has two usage modes:
+</para>
+
+<xi:include href="../../docs/xml/manual-core-adv.xml"
+            xpointer="vgdb.desc.modes"
+            xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+</refsect1>
+
+<refsect1 id="options">
+<title>Options</title>
+
+<xi:include href="../../docs/xml/manual-core-adv.xml"
+            xpointer="vgdb.opts.list"
+            xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+</refsect1>
+
+
+
+
+<refsect1 id="see_also">
+<title>See Also</title>
+
+<para>
+valgrind(1),
+<filename>&vg-docs-path;</filename> or
+<filename>&vg-docs-url;</filename>,
+<ulink id="&vg-gdbserver-id;"
+       xreflabel="&vg-gdbserver-label;"
+       url="&vg-gdbserver-url;">&vg-gdbserver-label;</ulink>
+<ulink id="&vg-vgdb-id;"
+       xreflabel="&vg-vgdb-label;"
+       url="&vg-vgdb-url;">&vg-vgdb-label;</ulink>,
+<ulink id="&vg-monitor-id;"
+       xreflabel="&vg-monitor-label;"
+       url="&vg-monitor-url;">&vg-monitor-label;</ulink>.
+</para>
+
+</refsect1>
+
+
+<refsect1 id="author">
+<title>Author</title>
+
+<para>Philippe Waroquiers.</para>
+
+</refsect1>
+
+
+</refentry>
+
+
diff --git a/docs/xml/manpages-index.xml b/docs/xml/manpages-index.xml
index a1a8979..7d774e5 100644
--- a/docs/xml/manpages-index.xml
+++ b/docs/xml/manpages-index.xml
@@ -35,5 +35,13 @@
 <xi:include href="../../massif/docs/ms_print-manpage.xml" parse="xml"  
     xmlns:xi="http://www.w3.org/2001/XInclude" />
 
+<!-- valgrind-listener -->
+<xi:include href="../../auxprogs/docs/valgrind-listener-manpage.xml"
+    parse="xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+<!-- vgdb -->
+<xi:include href="../../coregrind/docs/vgdb-manpage.xml"
+    parse="xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
 </set>
 
diff --git a/docs/xml/manual-core-adv.xml b/docs/xml/manual-core-adv.xml
index 870996f..23b88fe 100644
--- a/docs/xml/manual-core-adv.xml
+++ b/docs/xml/manual-core-adv.xml
@@ -1102,7 +1102,8 @@ $5 = 36
 intermediary between Valgrind and GDB or a shell.
 Therefore, it has two usage modes:
 </para>
-<orderedlist>
+<!-- start of xi:include in the manpage -->
+<orderedlist id="vgdb.desc.modes">
   <listitem id="manual-core-adv.vgdb-standalone" xreflabel="vgdb standalone">
     <para>As a standalone utility, it is used from a shell command
     line to send monitor commands to a process running under
@@ -1121,28 +1122,33 @@ Therefore, it has two usage modes:
   </listitem>
 
 </orderedlist>
+<!-- end of xi:include in the manpage -->
 
 <para><computeroutput>vgdb</computeroutput> accepts the following
 options:</para>
-<itemizedlist>
-  <listitem>
-    <para><option>--pid=&lt;number&gt;</option>: specifies the PID of
+<!-- start of xi:include in the manpage -->
+<variablelist id="vgdb.opts.list">
+  <varlistentry>
+    <term><option>--pid=&lt;number&gt;</option></term>
+    <listitem><para>Specifies the PID of
     the process to which vgdb must connect to.  This option is useful
     in case more than one Valgrind gdbserver can be connected to.  If
     the <option>--pid</option> argument is not given and multiple
     Valgrind gdbserver processes are running, vgdb will report the
-    list of such processes and then exit.</para>
-  </listitem>
+    list of such processes and then exit.</para></listitem>
+  </varlistentry>
 
-  <listitem>
-    <para><option>--vgdb-prefix</option> must be given to both
+  <varlistentry>
+    <term><option>--vgdb-prefix</option></term>
+    <listitem><para>Must be given to both
     Valgrind and vgdb if you want to change the default prefix for the
     FIFOs (named pipes) used for communication between the Valgrind
-    gdbserver and vgdb. </para>
-  </listitem>
+    gdbserver and vgdb.</para></listitem>
+  </varlistentry>
 
-  <listitem>
-    <para><option>--wait=&lt;number&gt;</option> instructs vgdb to
+  <varlistentry>
+    <term><option>--wait=&lt;number&gt;</option></term>
+    <listitem><para>Instructs vgdb to
     search for available Valgrind gdbservers for the specified number
     of seconds.  This makes it possible start a vgdb process 
     before starting the Valgrind gdbserver with which you intend the
@@ -1153,11 +1159,12 @@ options:</para>
     "target remote" command, you must set the GDB remotetimeout to a
     value bigger than the --wait argument value.  See option
     <option>--max-invoke-ms</option> (just below)
-    for an example of setting the remotetimeout value.</para>
-  </listitem>
+    for an example of setting the remotetimeout value.</para></listitem>
+  </varlistentry>
 
-  <listitem>
-    <para><option>--max-invoke-ms=&lt;number&gt;</option> gives the
+  <varlistentry>
+    <term><option>--max-invoke-ms=&lt;number&gt;</option></term>
+    <listitem><para>Gives the
     number of milliseconds after which vgdb will force the invocation
     of gdbserver embedded in Valgrind.  The default value is 100
     milliseconds. A value of 0 disables forced invocation. The forced
@@ -1175,18 +1182,20 @@ options:</para>
     <screen><![CDATA[
     (gdb) set remotetimeout 6
     ]]></screen>
-    </para>
-  </listitem>
+    </para></listitem>
+  </varlistentry>
 
-  <listitem>
-    <para><option>--cmd-time-out=&lt;number&gt;</option> instructs a
+  <varlistentry>
+    <term><option>--cmd-time-out=&lt;number&gt;</option></term>
+    <listitem><para>Instructs a
     standalone vgdb to exit if the Valgrind gdbserver it is connected
     to does not process a command in the specified number of seconds.
-    The default value is to never time out.</para>
-  </listitem>
+    The default value is to never time out.</para></listitem>
+  </varlistentry>
 
-  <listitem>
-    <para><option>--port=&lt;portnr&gt;</option> instructs vgdb to
+  <varlistentry>
+    <term><option>--port=&lt;portnr&gt;</option></term>
+    <listitem><para>Instructs vgdb to
     use tcp/ip and listen for GDB on the specified port nr rather than
     to use a pipe to communicate with GDB. Using tcp/ip allows to have
     GDB running on one computer and debugging a Valgrind process
@@ -1204,41 +1213,46 @@ gdb prog
 (gdb) target remote targetip:1234
 ]]></screen>
     where targetip is the ip address or hostname of the target computer.
-    </para>
-  </listitem>
+    </para></listitem>
+  </varlistentry>
    
-  <listitem>
-    <para><option>-c</option> To give more than one command to a
+  <varlistentry>
+    <term><option>-c</option></term>
+    <listitem><para>To give more than one command to a
     standalone vgdb, separate the commands by an
     option <option>-c</option>. Example:
     <screen><![CDATA[
 vgdb v.set log_output -c leak_check any
-]]></screen></para>
-  </listitem>  
+]]></screen></para></listitem>
+  </varlistentry>  
 
-  <listitem>
-    <para><option>-l</option> instructs a standalone vgdb to report
+  <varlistentry>
+    <term><option>-l</option></term>
+    <listitem><para>Instructs a standalone vgdb to report
     the list of the Valgrind gdbserver processes running and then
-    exit.</para>
-  </listitem>
+    exit.</para></listitem>
+  </varlistentry>
 
-  <listitem>
-    <para><option>-D</option> instructs a standalone vgdb to show the
+  <varlistentry>
+    <term><option>-D</option></term>
+    <listitem><para>Instructs a standalone vgdb to show the
     state of the shared memory used by the Valgrind gdbserver.  vgdb
     will exit after having shown the Valgrind gdbserver shared memory
-    state.</para>
-  </listitem>
+    state.</para></listitem>
+  </varlistentry>
 
-  <listitem>
-    <para><option>-d</option> instructs vgdb to produce debugging
+  <varlistentry>
+    <term><option>-d</option></term>
+    <listitem><para>Instructs vgdb to produce debugging
     output.  Give multiple <option>-d</option> args to increase the
     verbosity. When giving <option>-d</option> to a relay vgdb, you better
     redirect the standard error (stderr) of vgdb to a file to avoid
-    interaction between GDB and vgdb debugging output.</para>
-  </listitem>
+    interaction between GDB and vgdb debugging output.</para></listitem>
+  </varlistentry>
   
-</itemizedlist>
- 
+</variablelist>
+<!-- end of xi:include in the manpage -->
+
 </sect2>
 
 
diff --git a/docs/xml/manual-core.xml b/docs/xml/manual-core.xml
index e489fd6..9e2708a 100644
--- a/docs/xml/manual-core.xml
+++ b/docs/xml/manual-core.xml
@@ -237,21 +237,27 @@ re-run, passing the <option>-v</option> option to Valgrind.  A second
 
     <para><computeroutput>valgrind-listener</computeroutput> accepts two
     command-line options:</para>
-    <itemizedlist>
-       <listitem>
-         <para><option>-e</option> or <option>--exit-at-zero</option>: 
-         when the number of connected processes falls back to zero,
-         exit.  Without this, it will run forever, that is, until you
-         send it Control-C.</para>
-       </listitem>
-       <listitem>
-        <para><option>portnumber</option>: changes the port it listens
-        on from the default (1500).  The specified port must be in the
-        range 1024 to 65535.  The same restriction applies to port
-        numbers specified by a <option>--log-socket</option> to
-        Valgrind itself.</para>
-      </listitem>
-    </itemizedlist>
+    <!-- start of xi:include in the manpage -->
+    <variablelist id="listener.opts.list">
+       <varlistentry>
+         <term><option>-e --exit-at-zero</option></term>
+         <listitem>
+           <para>When the number of connected processes falls back to zero,
+           exit.  Without this, it will run forever, that is, until you
+           send it Control-C.</para>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+        <term><option>portnumber</option></term>
+        <listitem>
+          <para>Changes the port it listens on from the default (1500).
+          The specified port must be in the range 1024 to 65535.
+          The same restriction applies to port numbers specified by a
+          <option>--log-socket</option> to Valgrind itself.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+    <!-- end of xi:include in the manpage -->
 
     <para>If a Valgrinded process fails to connect to a listener, for
     whatever reason (the listener isn't running, invalid or unreachable

commit c6dba7749d99a509ab06d930be7090a99deb65ae
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Date:   Wed Jul 3 10:00:17 2013 +0000

    Bug 321730 Add cg_merge and cg_diff man pages.
    
    git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13442 a5019735-40e9-0310-863c-91ae7b9d1cf9

diff --git a/cachegrind/Makefile.am b/cachegrind/Makefile.am
index 43a44af..ef29961 100644
--- a/cachegrind/Makefile.am
+++ b/cachegrind/Makefile.am
@@ -2,7 +2,9 @@ include $(top_srcdir)/Makefile.tool.am
 
 EXTRA_DIST = \
 	docs/cg-manual.xml \
-	docs/cg_annotate-manpage.xml
+	docs/cg_annotate-manpage.xml \
+	docs/cg_diff-manpage.xml \
+	docs/cg_merge-manpage.xml
 
 #----------------------------------------------------------------------------
 # Headers, etc
diff --git a/cachegrind/docs/cg-manual.xml b/cachegrind/docs/cg-manual.xml
index f45bda8..0f61e0a 100644
--- a/cachegrind/docs/cg-manual.xml
+++ b/cachegrind/docs/cg-manual.xml
@@ -112,7 +112,7 @@ information, and then run cg_annotate to get a detailed presentation of that
 information.  As an optional intermediate step, you can use cg_merge to sum
 together the outputs of multiple Cachegrind runs into a single file which
 you then use as the input for cg_annotate.  Alternatively, you can use
-cg_diff to difference the outputs of two Cachegrind runs into a signel file
+cg_diff to difference the outputs of two Cachegrind runs into a single file
 which you then use as the input for cg_annotate.</para>
 
 
@@ -1001,6 +1001,29 @@ small differences like these;  it works in the same way as
 </sect1>
 
 
+<sect1 id="cg-manual.mergeopts" xreflabel="cg_merge Command-line Options">
+<title>cg_merge Command-line Options</title>
+
+<!-- start of xi:include in the manpage -->
+<variablelist id="cg_merge.opts.list">
+
+  <varlistentry>
+    <term>
+      <option><![CDATA[-o outfile]]></option>
+    </term>
+    <listitem>
+      <para>Write the profile data to <computeroutput>outfile</computeroutput>
+            rather than to standard output.
+      </para>
+    </listitem>
+  </varlistentry>
+
+</variablelist>
+<!-- end of xi:include in the manpage -->
+
+</sect1>
+
+
 <sect1 id="cg-manual.diffopts" xreflabel="cg_diff Command-line Options">
 <title>cg_diff Command-line Options</title>
 
diff --git a/cachegrind/docs/cg_diff-manpage.xml b/cachegrind/docs/cg_diff-manpage.xml
new file mode 100644
index 0000000..4823db0
--- /dev/null
+++ b/cachegrind/docs/cg_diff-manpage.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0"?> <!-- -*- sgml -*- -->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+          "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[ <!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities; ]>
+
+
+<refentry id="cg_diff">
+
+<refmeta>
+  <refentrytitle>cg_diff</refentrytitle>
+  <manvolnum>1</manvolnum>
+  <refmiscinfo>Release &rel-version;</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+  <refname>cg_diff</refname>
+  <refpurpose>compares two Cachegrind output files</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<cmdsynopsis>
+  <command>cg_diff</command>
+  <arg><replaceable>options</replaceable></arg>
+  <arg choice="plain"><replaceable>cachegrind-out-file1</replaceable></arg>
+  <arg choice="plain"><replaceable>cachegrind-out-file2</replaceable></arg>
+</cmdsynopsis>
+</refsynopsisdiv>
+
+
+<refsect1 id="description">
+<title>Description</title>
+
+<para><command>cg_diff</command> takes two output files produced by the
+Valgrind tool Cachegrind, computes the difference and prints the result
+in the same format that Cachegrinds outputs.
+</para>
+
+</refsect1>
+
+
+
+<refsect1 id="options">
+<title>Options</title>
+
+<xi:include href="cg-manual.xml" xpointer="cg_diff.opts.list"
+            xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+</refsect1>
+
+
+
+
+<refsect1 id="see_also">
+<title>See Also</title>
+
+<para>
+cg_annotate(1), valgrind(1),
+<filename>&vg-docs-path;</filename> or
+<filename>&vg-docs-url;</filename>.
+</para>
+
+</refsect1>
+
+
+<refsect1 id="author">
+<title>Author</title>
+
+<para>Nicholas Nethercote.</para>
+
+</refsect1>
+
+
+</refentry>
+
+
diff --git a/cachegrind/docs/cg_merge-manpage.xml b/cachegrind/docs/cg_merge-manpage.xml
new file mode 100644
index 0000000..5e733d2
--- /dev/null
+++ b/cachegrind/docs/cg_merge-manpage.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0"?> <!-- -*- sgml -*- -->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+          "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[ <!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities; ]>
+
+
+<refentry id="cg_merge">
+
+<refmeta>
+  <refentrytitle>cg_merge</refentrytitle>
+  <manvolnum>1</manvolnum>
+  <refmiscinfo>Release &rel-version;</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+  <refname>cg_merge</refname>
+  <refpurpose>merges multiple Cachegrind output files into one</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<cmdsynopsis>
+  <command>cg_merge</command>
+  <arg><replaceable>options</replaceable></arg>
+  <arg choice="opt" rep="repeat"><replaceable>cachegrind-out-files</replaceable></arg>
+</cmdsynopsis>
+</refsynopsisdiv>
+
+
+<refsect1 id="description">
+<title>Description</title>
+
+<para><command>cg_merge</command> sums together the outputs of multiple
+Cachegrind runs into a single output file.
+</para>
+
+</refsect1>
+
+
+
+<refsect1 id="options">
+<title>Options</title>
+
+<xi:include href="cg-manual.xml" xpointer="cg_merge.opts.list"
+            xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+</refsect1>
+
+
+
+
+<refsect1 id="see_also">
+<title>See Also</title>
+
+<para>
+cg_annotate(1), valgrind(1),
+<filename>&vg-docs-path;</filename> or
+<filename>&vg-docs-url;</filename>.
+</para>
+
+</refsect1>
+
+
+<refsect1 id="author">
+<title>Author</title>
+
+<para>Nicholas Nethercote.</para>
+
+</refsect1>
+
+
+</refentry>
+
+
diff --git a/docs/xml/manpages-index.xml b/docs/xml/manpages-index.xml
index b02fc9c..a1a8979 100644
--- a/docs/xml/manpages-index.xml
+++ b/docs/xml/manpages-index.xml
@@ -15,6 +15,14 @@
 <xi:include href="../../cachegrind/docs/cg_annotate-manpage.xml" parse="xml"  
     xmlns:xi="http://www.w3.org/2001/XInclude" />
 
+<!-- cg_diff -->
+<xi:include href="../../cachegrind/docs/cg_diff-manpage.xml" parse="xml"
+    xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+<!-- cg_merge -->
+<xi:include href="../../cachegrind/docs/cg_merge-manpage.xml" parse="xml"
+    xmlns:xi="http://www.w3.org/2001/XInclude" />
+
 <!-- callgrind_annotate -->
 <xi:include href="../../callgrind/docs/callgrind_annotate-manpage.xml" parse="xml"  
     xmlns:xi="http://www.w3.org/2001/XInclude" />
--- valgrind-3.8.1.orig/docs/callgrind_annotate.1	2013-07-08 15:15:20.681963472 +0200
+++ valgrind-3.8.1/docs/callgrind_annotate.1	2013-07-08 15:29:31.000000000 +0200
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: Callgrind Annotate
 .\"    Author: [see the "Author" section]
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\"      Date: 03/12/2013
-.\"    Manual: Release 3.8.0
-.\"    Source: Release 3.8.0
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\"      Date: 07/08/2013
+.\"    Manual: Release 3.8.1
+.\"    Source: Release 3.8.1
 .\"  Language: English
 .\"
-.TH "CALLGRIND ANNOTATE" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1"
+.TH "CALLGRIND ANNOTATE" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
--- valgrind-3.8.1.orig/docs/callgrind_control.1	2013-07-08 15:15:20.668963358 +0200
+++ valgrind-3.8.1/docs/callgrind_control.1	2013-07-08 15:29:31.000000000 +0200
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: Callgrind Control
 .\"    Author: [see the "Author" section]
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\"      Date: 03/12/2013
-.\"    Manual: Release 3.8.0
-.\"    Source: Release 3.8.0
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\"      Date: 07/08/2013
+.\"    Manual: Release 3.8.1
+.\"    Source: Release 3.8.1
 .\"  Language: English
 .\"
-.TH "CALLGRIND CONTROL" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1"
+.TH "CALLGRIND CONTROL" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -34,7 +34,6 @@
 \fBcallgrind_control\fR [\fIoptions\fR] [\fIpid|program\-name\fR...]
 .SH "DESCRIPTION"
 .PP
-
 \fBcallgrind_control\fR
 controls programs being run by the Valgrind tool Callgrind\&. When a
 \fBpid/program name\fR
--- valgrind-3.8.1.orig/docs/cg_annotate.1	2013-07-08 15:15:20.675963418 +0200
+++ valgrind-3.8.1/docs/cg_annotate.1	2013-07-08 15:29:31.000000000 +0200
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: cg_annotate
 .\"    Author: [see the "Author" section]
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\"      Date: 03/12/2013
-.\"    Manual: Release 3.8.0
-.\"    Source: Release 3.8.0
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\"      Date: 07/08/2013
+.\"    Manual: Release 3.8.1
+.\"    Source: Release 3.8.1
 .\"  Language: English
 .\"
-.TH "CG_ANNOTATE" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1"
+.TH "CG_ANNOTATE" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN valgrind-3.8.1.orig/docs/cg_diff.1 docs/cg_diff.1
--- valgrind-3.8.1.orig/docs/cg_diff.1	1970-01-01 01:00:00.000000000 +0100
+++ valgrind-3.8.1/docs/cg_diff.1	2013-07-08 15:29:31.000000000 +0200
@@ -0,0 +1,69 @@
+'\" t
+.\"     Title: cg_diff
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\"      Date: 07/08/2013
+.\"    Manual: Release 3.8.1
+.\"    Source: Release 3.8.1
+.\"  Language: English
+.\"
+.TH "CG_DIFF" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+cg_diff \- compares two Cachegrind output files
+.SH "SYNOPSIS"
+.HP \w'\fBcg_diff\fR\ 'u
+\fBcg_diff\fR [\fIoptions\fR] \fIcachegrind\-out\-file1\fR \fIcachegrind\-out\-file2\fR
+.SH "DESCRIPTION"
+.PP
+\fBcg_diff\fR
+takes two output files produced by the Valgrind tool Cachegrind, computes the difference and prints the result in the same format that Cachegrinds outputs\&.
+.SH "OPTIONS"
+.PP
+\fB\-h \-\-help \fR
+.RS 4
+Show the help message\&.
+.RE
+.PP
+\fB\-\-version \fR
+.RS 4
+Show the version number\&.
+.RE
+.PP
+\fB\-\-mod\-filename=<expr> [default: none]\fR
+.RS 4
+Specifies a Perl search\-and\-replace expression that is applied to all filenames\&. Useful for removing minor differences in paths between two different versions of a program that are sitting in different directories\&.
+.RE
+.PP
+\fB\-\-mod\-funcname=<expr> [default: none]\fR
+.RS 4
+Like
+\fB\-\-mod\-filename\fR, but for filenames\&. Useful for removing minor differences in randomized names of auto\-generated functions generated by some compilers\&.
+.RE
+.SH "SEE ALSO"
+.PP
+cg_annotate(1), valgrind(1),
+$INSTALL/share/doc/valgrind/html/index\&.html
+or
+http://www\&.valgrind\&.org/docs/manual/index\&.html\&.
+.SH "AUTHOR"
+.PP
+Nicholas Nethercote\&.
--- valgrind-3.8.1.orig/docs/cg_merge.1	1970-01-01 01:00:00.000000000 +0100
+++ valgrind-3.8.1/docs/cg_merge.1	2013-07-08 15:29:31.000000000 +0200
@@ -0,0 +1,55 @@
+'\" t
+.\"     Title: cg_merge
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\"      Date: 07/08/2013
+.\"    Manual: Release 3.8.1
+.\"    Source: Release 3.8.1
+.\"  Language: English
+.\"
+.TH "CG_MERGE" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+cg_merge \- merges multiple Cachegrind output files into one
+.SH "SYNOPSIS"
+.HP \w'\fBcg_merge\fR\ 'u
+\fBcg_merge\fR [\fIoptions\fR] [\fIcachegrind\-out\-files\fR...]
+.SH "DESCRIPTION"
+.PP
+\fBcg_merge\fR
+sums together the outputs of multiple Cachegrind runs into a single output file\&.
+.SH "OPTIONS"
+.PP
+\fB\-o outfile\fR
+.RS 4
+Write the profile data to
+outfile
+rather than to standard output\&.
+.RE
+.SH "SEE ALSO"
+.PP
+cg_annotate(1), valgrind(1),
+$INSTALL/share/doc/valgrind/html/index\&.html
+or
+http://www\&.valgrind\&.org/docs/manual/index\&.html\&.
+.SH "AUTHOR"
+.PP
+Nicholas Nethercote\&.
--- valgrind-3.8.1.orig/docs/ms_print.1	2013-07-08 15:15:20.680963463 +0200
+++ valgrind-3.8.1/docs/ms_print.1	2013-07-08 15:29:31.000000000 +0200
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: ms_print
 .\"    Author: [see the "Author" section]
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\"      Date: 03/12/2013
-.\"    Manual: Release 3.8.0
-.\"    Source: Release 3.8.0
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\"      Date: 07/08/2013
+.\"    Manual: Release 3.8.1
+.\"    Source: Release 3.8.1
 .\"  Language: English
 .\"
-.TH "MS_PRINT" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1"
+.TH "MS_PRINT" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN valgrind-3.8.1.orig/docs/valgrind.1 docs/valgrind.1
--- valgrind-3.8.1.orig/docs/valgrind.1	2013-07-08 15:15:20.681963472 +0200
+++ valgrind-3.8.1/docs/valgrind.1	2013-07-08 15:29:31.000000000 +0200
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: VALGRIND
 .\"    Author: [see the "Author" section]
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\"      Date: 03/12/2013
-.\"    Manual: Release 3.8.0
-.\"    Source: Release 3.8.0
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\"      Date: 07/08/2013
+.\"    Manual: Release 3.8.1
+.\"    Source: Release 3.8.1
 .\"  Language: English
 .\"
-.TH "VALGRIND" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1"
+.TH "VALGRIND" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -427,8 +427,7 @@
 causes Valgrind to start a debugger for the program at this point\&. When you have finished with the debugger, quit from it, and the program will continue\&. Trying to continue from inside the debugger doesn\*(Aqt work\&.
 .sp
 Note: if you use GDB, more powerful debugging support is provided by the
-\fB\-\-vgdb=\fR
-\fIyes\fR
+\fB\-\-vgdb=\fR\fIyes\fR
 or
 \fIfull\fR
 value\&. This activates Valgrind\*(Aqs internal gdbserver, which provides more\-or\-less full GDB\-style control of the application: insertion of breakpoints, continuing from inside GDB, inferior function calls, and much more\&.
@@ -1010,7 +1009,7 @@
 When
 \fIno\fR, loads from partially invalid addresses are treated the same as loads from completely invalid addresses: an illegal\-address error is issued, and the resulting bytes are marked as initialised\&.
 .sp
-Note that code that behaves in this way is in violation of the the ISO C/C++ standards, and should be considered broken\&. If at all possible, such code should be fixed\&. This option should be used only as a last resort\&.
+Note that code that behaves in this way is in violation of the ISO C/C++ standards, and should be considered broken\&. If at all possible, such code should be fixed\&. This option should be used only as a last resort\&.
 .RE
 .PP
 \fB\-\-freelist\-vol=<number> [default: 20000000] \fR
@@ -1400,7 +1399,7 @@
 .PP
 \fB\-\-show\-stack\-usage=<yes|no> [default: no]\fR
 .RS 4
-Print stack usage at thread exit time\&. When a program creates a large number of threads it becomes important to limit the amount of virtual memory allocated for thread stacks\&. This option makes it possible to observe how much stack memory has been used by each thread of the the client program\&. Note: the DRD tool itself allocates some temporary data on the client thread stack\&. The space necessary for this temporary data must be allocated by the client program when it allocates stack memory, but is not included in stack usage reported by DRD\&.
+Print stack usage at thread exit time\&. When a program creates a large number of threads it becomes important to limit the amount of virtual memory allocated for thread stacks\&. This option makes it possible to observe how much stack memory has been used by each thread of the client program\&. Note: the DRD tool itself allocates some temporary data on the client thread stack\&. The space necessary for this temporary data must be allocated by the client program when it allocates stack memory, but is not included in stack usage reported by DRD\&.
 .RE
 .PP
 \fB\-\-trace\-addr=<address> [default: none]\fR
@@ -1717,8 +1716,7 @@
 $INSTALL/share/doc/valgrind/html/index\&.html
 or
 http://www\&.valgrind\&.org/docs/manual/index\&.html,
-\m[blue]\fBDebugging your program using Valgrind\*(Aqs gdbserver and GDB\fR\m[]\&\s-2\u[1]\d\s+2
-\m[blue]\fBvgdb\fR\m[]\&\s-2\u[2]\d\s+2,
+\m[blue]\fBDebugging your program using Valgrind\*(Aqs gdbserver and GDB\fR\m[]\&\s-2\u[1]\d\s+2\m[blue]\fBvgdb\fR\m[]\&\s-2\u[2]\d\s+2,
 \m[blue]\fBValgrind monitor commands\fR\m[]\&\s-2\u[3]\d\s+2,
 \m[blue]\fBThe Commentary\fR\m[]\&\s-2\u[4]\d\s+2,
 \m[blue]\fBScheduling and Multi\-Thread Performance\fR\m[]\&\s-2\u[5]\d\s+2,
diff -urN valgrind-3.8.1.orig/docs/valgrind-listener.1 docs/valgrind-listener.1
--- valgrind-3.8.1.orig/docs/valgrind-listener.1	1970-01-01 01:00:00.000000000 +0100
+++ valgrind-3.8.1/docs/valgrind-listener.1	2013-07-08 15:29:31.000000000 +0200
@@ -0,0 +1,64 @@
+'\" t
+.\"     Title: valgrind-listener
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\"      Date: 07/08/2013
+.\"    Manual: Release 3.8.1
+.\"    Source: Release 3.8.1
+.\"  Language: English
+.\"
+.TH "VALGRIND\-LISTENER" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+valgrind-listener \- listens on a socket for Valgrind commentary
+.SH "SYNOPSIS"
+.HP \w'\fBvalgrind\-listener\fR\ 'u
+\fBvalgrind\-listener\fR [\fIoptions\fR]
+.SH "DESCRIPTION"
+.PP
+\fBvalgrind\-listener\fR
+accepts (multiple) connections from
+\fBvalgrind\fR
+processes that use the
+\fB\-\-log\-socket\fR
+option on the specified port and copies the commentary it is sent to stdout\&.
+.SH "OPTIONS"
+.PP
+\fB\-e \-\-exit\-at\-zero\fR
+.RS 4
+When the number of connected processes falls back to zero, exit\&. Without this, it will run forever, that is, until you send it Control\-C\&.
+.RE
+.PP
+\fBportnumber\fR
+.RS 4
+Changes the port it listens on from the default (1500)\&. The specified port must be in the range 1024 to 65535\&. The same restriction applies to port numbers specified by a
+\fB\-\-log\-socket\fR
+to Valgrind itself\&.
+.RE
+.SH "SEE ALSO"
+.PP
+valgrind(1),
+$INSTALL/share/doc/valgrind/html/index\&.html
+or
+http://www\&.valgrind\&.org/docs/manual/index\&.html\&.
+.SH "AUTHOR"
+.PP
+Julian Seward\&.
diff -urN valgrind-3.8.1.orig/docs/vgdb.1 docs/vgdb.1
--- valgrind-3.8.1.orig/docs/vgdb.1	1970-01-01 01:00:00.000000000 +0100
+++ valgrind-3.8.1/docs/vgdb.1	2013-07-08 15:29:31.000000000 +0200
@@ -0,0 +1,208 @@
+'\" t
+.\"     Title: vgdb
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\"      Date: 07/08/2013
+.\"    Manual: Release 3.8.1
+.\"    Source: Release 3.8.1
+.\"  Language: English
+.\"
+.TH "VGDB" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+vgdb \- intermediary between Valgrind and GDB or a shell
+.SH "SYNOPSIS"
+.HP \w'\fBvgdb\fR\ 'u
+\fBvgdb\fR [\fIoptions\fR]
+.SH "DESCRIPTION"
+.PP
+\fBvgdb\fR
+("Valgrind to GDB") is used as an intermediary between Valgrind and GDB or a shell\&. It has two usage modes:
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 1.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  1." 4.2
+.\}
+As a standalone utility, it is used from a shell command line to send monitor commands to a process running under Valgrind\&. For this usage, the vgdb OPTION(s) must be followed by the monitor command to send\&. To send more than one command, separate them with the
+\fB\-c\fR
+option\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 2.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  2." 4.2
+.\}
+In combination with GDB "target remote |" command, it is used as the relay application between GDB and the Valgrind gdbserver\&. For this usage, only OPTION(s) can be given, but no COMMAND can be given\&.
+.RE
+.SH "OPTIONS"
+.PP
+\fB\-\-pid=<number>\fR
+.RS 4
+Specifies the PID of the process to which vgdb must connect to\&. This option is useful in case more than one Valgrind gdbserver can be connected to\&. If the
+\fB\-\-pid\fR
+argument is not given and multiple Valgrind gdbserver processes are running, vgdb will report the list of such processes and then exit\&.
+.RE
+.PP
+\fB\-\-vgdb\-prefix\fR
+.RS 4
+Must be given to both Valgrind and vgdb if you want to change the default prefix for the FIFOs (named pipes) used for communication between the Valgrind gdbserver and vgdb\&.
+.RE
+.PP
+\fB\-\-wait=<number>\fR
+.RS 4
+Instructs vgdb to search for available Valgrind gdbservers for the specified number of seconds\&. This makes it possible start a vgdb process before starting the Valgrind gdbserver with which you intend the vgdb to communicate\&. This option is useful when used in conjunction with a
+\fB\-\-vgdb\-prefix\fR
+that is unique to the process you want to wait for\&. Also, if you use the
+\fB\-\-wait\fR
+argument in the GDB "target remote" command, you must set the GDB remotetimeout to a value bigger than the \-\-wait argument value\&. See option
+\fB\-\-max\-invoke\-ms\fR
+(just below) for an example of setting the remotetimeout value\&.
+.RE
+.PP
+\fB\-\-max\-invoke\-ms=<number>\fR
+.RS 4
+Gives the number of milliseconds after which vgdb will force the invocation of gdbserver embedded in Valgrind\&. The default value is 100 milliseconds\&. A value of 0 disables forced invocation\&. The forced invocation is used when vgdb is connected to a Valgrind gdbserver, and the Valgrind process has all its threads blocked in a system call\&.
+.sp
+If you specify a large value, you might need to increase the GDB "remotetimeout" value from its default value of 2 seconds\&. You should ensure that the timeout (in seconds) is bigger than the
+\fB\-\-max\-invoke\-ms\fR
+value\&. For example, for
+\fB\-\-max\-invoke\-ms=5000\fR, the following GDB command is suitable:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+    (gdb) set remotetimeout 6
+    
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.RE
+.PP
+\fB\-\-cmd\-time\-out=<number>\fR
+.RS 4
+Instructs a standalone vgdb to exit if the Valgrind gdbserver it is connected to does not process a command in the specified number of seconds\&. The default value is to never time out\&.
+.RE
+.PP
+\fB\-\-port=<portnr>\fR
+.RS 4
+Instructs vgdb to use tcp/ip and listen for GDB on the specified port nr rather than to use a pipe to communicate with GDB\&. Using tcp/ip allows to have GDB running on one computer and debugging a Valgrind process running on another target computer\&. Example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+# On the target computer, start your program under valgrind using
+valgrind \-\-vgdb\-error=0 prog
+# and then in another shell, run:
+vgdb \-\-port=1234
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+On the computer which hosts GDB, execute the command:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+gdb prog
+(gdb) target remote targetip:1234
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+where targetip is the ip address or hostname of the target computer\&.
+.RE
+.PP
+\fB\-c\fR
+.RS 4
+To give more than one command to a standalone vgdb, separate the commands by an option
+\fB\-c\fR\&. Example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+vgdb v\&.set log_output \-c leak_check any
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fB\-l\fR
+.RS 4
+Instructs a standalone vgdb to report the list of the Valgrind gdbserver processes running and then exit\&.
+.RE
+.PP
+\fB\-D\fR
+.RS 4
+Instructs a standalone vgdb to show the state of the shared memory used by the Valgrind gdbserver\&. vgdb will exit after having shown the Valgrind gdbserver shared memory state\&.
+.RE
+.PP
+\fB\-d\fR
+.RS 4
+Instructs vgdb to produce debugging output\&. Give multiple
+\fB\-d\fR
+args to increase the verbosity\&. When giving
+\fB\-d\fR
+to a relay vgdb, you better redirect the standard error (stderr) of vgdb to a file to avoid interaction between GDB and vgdb debugging output\&.
+.RE
+.SH "SEE ALSO"
+.PP
+valgrind(1),
+$INSTALL/share/doc/valgrind/html/index\&.html
+or
+http://www\&.valgrind\&.org/docs/manual/index\&.html,
+\m[blue]\fBDebugging your program using Valgrind\*(Aqs gdbserver and GDB\fR\m[]\&\s-2\u[1]\d\s+2\m[blue]\fBvgdb\fR\m[]\&\s-2\u[2]\d\s+2,
+\m[blue]\fBValgrind monitor commands\fR\m[]\&\s-2\u[3]\d\s+2\&.
+.SH "AUTHOR"
+.PP
+Philippe Waroquiers\&.
+.SH "NOTES"
+.IP " 1." 4
+Debugging your program using Valgrind's gdbserver and GDB
+.RS 4
+\%http://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.gdbserver
+.RE
+.IP " 2." 4
+vgdb
+.RS 4
+\%http://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.vgdb
+.RE
+.IP " 3." 4
+Valgrind monitor commands
+.RS 4
+\%http://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.valgrind-monitor-commands
+.RE
diff -urN valgrind-3.8.1.orig/docs/xml/vg-entities.xml docs/xml/vg-entities.xml
--- valgrind-3.8.1.orig/docs/xml/vg-entities.xml	2013-07-08 15:15:20.675963418 +0200
+++ valgrind-3.8.1/docs/xml/vg-entities.xml	2013-07-08 15:29:23.000000000 +0200
@@ -6,7 +6,7 @@
 
 <!-- valgrind release + version stuff -->
 <!ENTITY rel-type    "Release">
-<!ENTITY rel-version "3.8.0">
+<!ENTITY rel-version "3.8.1">
 <!ENTITY rel-date    "10 August 2012">
 
 <!-- where the docs are installed -->