From d146644f30fd1f11dbb081869bc77aa24d3dd2c4 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 29 Jul 2009 03:34:56 +0000 Subject: [PATCH] Don't include "how to write a tool" in the user manual -- it's in the tech docs, and the chapter/section numbering doesn't match the rest of the numbering in the user manual. Also change some of the names of the links in that file to match the filename. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10653 --- docs/xml/manual-writing-tools.xml | 59 ++++++++++++++----------------- docs/xml/manual.xml | 2 -- 2 files changed, 27 insertions(+), 34 deletions(-) diff --git a/docs/xml/manual-writing-tools.xml b/docs/xml/manual-writing-tools.xml index 789fb2dd9e..3dca7a064b 100644 --- a/docs/xml/manual-writing-tools.xml +++ b/docs/xml/manual-writing-tools.xml @@ -4,17 +4,14 @@ [ %vg-entities; ]> - + Writing a New Valgrind Tool - -Introduction - So you want to write a Valgrind tool? Here are some instructions that may help. - -Tools + +Introduction The key idea behind Valgrind's architecture is the division between its "core" and "tool plug-ins". @@ -33,16 +30,14 @@ functions to indicate to the core that they would like to use certain services, or be notified when certain interesting events occur. But the core takes care of all the hard work. - - - + Writing a Tool - + How tools work Tool plug-ins must define various functions for instrumenting programs @@ -53,7 +48,7 @@ when the option is used to select it. - + Getting the code To write your own tool, you'll need the Valgrind source code. You'll @@ -65,7 +60,7 @@ website. - + Getting started Valgrind uses GNU automake and @@ -186,7 +181,7 @@ onto the interesting stuff... - + Writing the code A tool must define at least these four functions: @@ -211,7 +206,7 @@ core about them. - + Initialisation Most of the initialisation should be done in @@ -267,7 +262,7 @@ can be found in - + Instrumentation instrument() is the interesting one. It @@ -286,7 +281,7 @@ complex example. - + Finalisation This is where you can present the final results, such as a summary @@ -297,7 +292,7 @@ this point. - + Other Important Information Please note that the core/tool split infrastructure is quite @@ -339,14 +334,14 @@ isn't that relevant to tool-writers, however. - + Words of Advice Writing and debugging tools is not trivial. Here are some suggestions for solving common problems. - + Segmentation Faults If you are getting segmentation faults in C functions used by your @@ -359,7 +354,7 @@ tool, the usual GDB command: - + Debugging C functions If you want to debug C functions used by your tool, you can @@ -411,7 +406,7 @@ this to extract useful tracebacks from GDB. - + IR Instrumentation Problems If you are having problems with your VEX IR instrumentation, it's @@ -422,7 +417,7 @@ results of instrumentation. - + Miscellaneous If you just want to know whether a program point has been reached, @@ -442,13 +437,13 @@ list). - + Advanced Topics Once a tool becomes more complicated, there are some extra things you may want/need to do. - + Suppressions If your tool reports errors and you want to suppress some common @@ -467,7 +462,7 @@ for the tool during initialisation with - + Documentation As of version 3.0.0, Valgrind documentation has been converted to @@ -475,7 +470,7 @@ XML. Why? See The XML FAQ. - + The XML Toolchain If you are feeling conscientious and want to write some @@ -514,7 +509,7 @@ local installation. - + Writing the Documentation Follow these steps (using foobar @@ -610,7 +605,7 @@ attribute base of element chapter - + Regression Tests Valgrind has some support for regression tests. If you want to @@ -655,7 +650,7 @@ write regression tests for your tool: - + Profiling To profile a tool, use Cachegrind on it. Read README_DEVELOPERS for @@ -669,7 +664,7 @@ instruction and cache hit/miss counts. - + Other Makefile Hackery If you add any directories under @@ -687,7 +682,7 @@ example) you need to add them to the - + Core/tool Interface Versions In order to allow for the core/tool interface to evolve over time, @@ -714,7 +709,7 @@ minimising the use of naked structs in the interface. - + Final Words The core/tool interface is not fixed. It's pretty stable these days, diff --git a/docs/xml/manual.xml b/docs/xml/manual.xml index 53cee09add..d6a89351a8 100644 --- a/docs/xml/manual.xml +++ b/docs/xml/manual.xml @@ -44,7 +44,5 @@ xmlns:xi="http://www.w3.org/2001/XInclude" /> - -- 2.47.3