Writing a New Valgrind Tool
Suppression types have the form
tool_name:suppression_name
.
The
tool_name
here is the name you
specify for the tool during initialisation with
VG_(details_name)
.
2.3.3. Documentation
If you are feeling conscientious and want to write some documentation for your tool, please use XML as the rest of
Valgrind does. The file
docs/README
has more details on getting the XML toolchain to work; this can be difficult,
unfortunately.
To write the documentation, follow these steps (using
foobar
as the example tool name again):
1. The docs go in
foobar/docs/
, which you will have created when you started writing the tool.
2. Copy the XML documentation file for the tool Nulgrind from
none/docs/nl-manual.xml
to
foobar/docs/
, and rename it to
foobar/docs/fb-manual.xml
.
Note
: there is a tetex bug involving underscores in filenames, so don’t use ’_’.
3. Write the documentation.
There are some helpful bits and pieces on using XML markup in
docs/xml/xml_help.txt
.
4. Include it in the User Manual by adding the relevant entry to
docs/xml/manual.xml
.
Copy and edit an
existing entry.
5. Include it in the man page by adding the relevant entry to
docs/xml/valgrind-manpage.xml
. Copy and
edit an existing entry.
6. Validate
foobar/docs/fb-manual.xml
using the following command from within
docs/
:
make valid
You may get errors that look like this:
./xml/index.xml:5: element chapter: validity error : No declaration for
attribute base of element chapter
Ignore (only) these -- they’re not important.
Because the XML toolchain is fragile, it is important to ensure that
fb-manual.xml
won’t break the documen-
tation set build. Note that just because an XML file happily transforms to html does not necessarily mean the same
holds true for pdf/ps.
7. You can (re-)generate the HTML docs while you are writing
fb-manual.xml
to help you see how it’s looking.
The generated files end up in
docs/html/
. Use the following command, within
docs/
:
make html-docs
6
Содержание Software
Страница 176: ...Valgrind FAQ Release 3 8 0 10 August 2012 Copyright 2000 2012 Valgrind Developers Email valgrind valgrind org ...
Страница 177: ...Valgrind FAQ Table of Contents Valgrind Frequently Asked Questions 1 ii ...
Страница 302: ...README mips based on newer GCC versions if possible 95 ...
Страница 303: ...GNU Licenses ...
Страница 304: ...GNU Licenses Table of Contents 1 The GNU General Public License 1 2 The GNU Free Documentation License 8 ii ...