|
From: Tom H. <to...@co...> - 2005-11-15 11:07:36
|
In message <200...@cn...>
Yao Qi <qiy...@cn...> wrote:
> The part about debugging Valgrind in README_DEVELOPERS is out-of-date.
> I code a patch for this.
I actually think we should drop all that - there are much easier ways
to debug valgrind now that everything is statically linked with the
tool:
- Set VALGRIND_LAUNCHER to <prefix>/bin/valgrind
- Run "gdb <prefix>/lib/valgrind/<platform>/<tool>"
- Do "handle SIGSEGV nostop noprint" to stop gdb stopping on
a SEGV as valgrindd needs to be able to handle them to do
stack extension
- Set any breakpoints you want and proceed as normal for gdb
In principle debugging valgrind itself should work, the only problem
is getting control when it starts the tool to set breakpoints. Doing
a "catch exec" doesn't really work as that stops before the exec and
my gdb doesn't implement "catch start" or "catch thread_start".
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|