|
From: <sv...@va...> - 2009-01-06 05:54:50
|
Author: njn Date: 2009-01-06 05:54:45 +0000 (Tue, 06 Jan 2009) New Revision: 8911 Log: Add an FAQ about attaching Valgrind to already-running programs. Modified: trunk/docs/xml/FAQ.xml Modified: trunk/docs/xml/FAQ.xml =================================================================== --- trunk/docs/xml/FAQ.xml 2009-01-05 17:15:44 UTC (rev 8910) +++ trunk/docs/xml/FAQ.xml 2009-01-06 05:54:45 UTC (rev 8911) @@ -567,6 +567,29 @@ </qandaentry> +<qandaentry id="faq.attach"> + <question id="q-attach"> + <para>Is it possible to attach Valgrind to a program that is already + running?</para> + </question> + <answer id="a-undeferrors"> + <para>No. The environment that Valgrind provides for running programs + is significantly different to that for normal programs, e.g. due to + different layout of memory. Therefore Valgrind has to have full control + from the very start.</para> + + <para>It is possible to achieve something like this by running your + program without any instrumentation (which involves a slow-down of about + 5x, less than that of most tools), and then adding instrumentation once + you get to a point of interest. Support for this must be provided by + the tool, however, and Callgrind is the only tool that currently has + such support. See the instructions on the + <computeroutput>callgrind_control</computeroutput> program for details. + </para> + </answer> +</qandaentry> + + </qandadiv> |