Fix 316145 - callgrind command line options in manpage reference (unknown) callgrind manual
Patch by Mark Wielaard.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13324 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/NEWS b/NEWS
index 2bd1090..bd7cd83 100644
--- a/NEWS
+++ b/NEWS
@@ -219,6 +219,7 @@
315545 [390] (find_TTEntry_from_hcode): Assertion '(UChar*)sec->tt[tteNo].tcptr <= (UChar*)hcode' failed
315959 [390] valgrind man page has bogus SGCHECK (and no BBV) OPTIONS section
316144 [390] valgrind.1 manpage contains unknown ??? strings for some core option references
+316145 [390] callgrind command line options in manpage reference (unknown) callgrind manual
n-i-bz [390] report error for vgdb snapshot requested before execution
n-i-bz [390] Some wrong command line options could be ignored
n-i-bz [390] same as 303624 (fixed in 3.8.0), but for x86 android
diff --git a/cachegrind/docs/cg-manual.xml b/cachegrind/docs/cg-manual.xml
index fb6f978..13331d8 100644
--- a/cachegrind/docs/cg-manual.xml
+++ b/cachegrind/docs/cg-manual.xml
@@ -3,8 +3,8 @@
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[ <!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities; ]>
-
-<chapter id="cg-manual" xreflabel="Cachegrind: a cache and branch-prediction profiler">
+<!-- Referenced from both the manual and manpage -->
+<chapter id="&vg-cg-manual-id;" xreflabel="&vg-cg-manual-label;">
<title>Cachegrind: a cache and branch-prediction profiler</title>
<para>To use this tool, you must specify
diff --git a/callgrind/docs/cl-manual.xml b/callgrind/docs/cl-manual.xml
index ab8d9bb..2f08ac8 100644
--- a/callgrind/docs/cl-manual.xml
+++ b/callgrind/docs/cl-manual.xml
@@ -88,7 +88,7 @@
particular by reducing the call count.</para>
<para>Callgrind's cache simulation is based on that of Cachegrind.
-Read the documentation for <xref linkend="cg-manual"/> first. The material
+Read the documentation for <xref linkend="&vg-cg-manual-id;"/> first. The material
below describes the features supported in addition to Cachegrind's
features.</para>
@@ -936,7 +936,7 @@
Cache misses on instruction reads ("I1mr"/"ILmr"),
data read accesses ("Dr") and related cache misses ("D1mr"/"DLmr"),
data write accesses ("Dw") and related cache misses ("D1mw"/"DLmw").
- For more information, see <xref linkend="cg-manual"/>.
+ For more information, see <xref linkend="&vg-cg-manual-id;"/>.
</para>
</listitem>
</varlistentry>
diff --git a/docs/xml/valgrind-manpage.xml b/docs/xml/valgrind-manpage.xml
index bd4b924..a4b84ff 100644
--- a/docs/xml/valgrind-manpage.xml
+++ b/docs/xml/valgrind-manpage.xml
@@ -255,7 +255,10 @@
url="&vg-comment-url;">&vg-comment-label;</ulink>,
<ulink id="&vg-pthreads-perf-sched-id;"
xreflabel="&vg-pthreads-perf-sched-label;"
- url="&vg-pthreads-perf-sched-url;">&vg-pthreads-perf-sched-label;</ulink>.
+ url="&vg-pthreads-perf-sched-url;">&vg-pthreads-perf-sched-label;</ulink>,
+<ulink id="&vg-cg-manual-id;"
+ xreflabel="&vg-cg-manual-label;"
+ url="&vg-cg-manual-url;">&vg-cg-manual-label;</ulink>.
</para>
</refsect1>
diff --git a/docs/xml/vg-entities.xml b/docs/xml/vg-entities.xml
index f5994c1..29a337f 100644
--- a/docs/xml/vg-entities.xml
+++ b/docs/xml/vg-entities.xml
@@ -58,3 +58,7 @@
<!ENTITY vg-pthreads-perf-sched-id "&vg-pthreads-perf-sched-manual;.&vg-pthreads-perf-sched-ref;">
<!ENTITY vg-pthreads-perf-sched-url "&vg-manual-url;&vg-pthreads-perf-sched-manual;.html#&vg-pthreads-perf-sched-id;">
+
+<!ENTITY vg-cg-manual-id "cg-manual">
+<!ENTITY vg-cg-manual-label "Cachegrind: a cache and branch-prediction profiler">
+<!ENTITY vg-cg-manual-url "&vg-manual-url;&vg-cg-manual-id;.html">