|
From: Yao Qi <qiy...@cn...> - 2005-11-15 07:09:31
|
The part about debugging Valgrind in README_DEVELOPERS is out-of-date. I code a patch for this. =================================================================== --- README_DEVELOPERS (revision 5114) +++ README_DEVELOPERS (working copy) @@ -37,20 +37,30 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ To debug stage 1 just run it under GDB in the normal way. -To debug Valgrind proper (stage 2) with GDB, start Valgrind like this: +To debug Valgrind proper tool, none for example, with GDB, start +Valgrind like this: valgrind --tool=none --wait-for-gdb=yes <prog> -Then start gdb like this in another terminal: +Then start GDB like this in another terminal: - gdb /usr/lib/valgrind/stage2 <pid> + gdb /usr/local/lib/valgrind/lib/<platform>/none <pid> -Where <pid> is the pid valgrind printed. Then set whatever breakpoints -you want and do this in gdb: +If you want to debug Valgrind tool without installing it, and you +could start GDB also in another terminal like this: - jump *$eip + gdb ~/grind/head4/.in_place/<platform>/none <pid> +Where <platform> is the current platform Valgrind build on and <pid> +is the pid Valgrind printed. +Then set whatever breakpoints you want and do this in GDB: + + jump *$eip (on X86 or AMD64) +or, + jump *$pc (on PPC32) + + Self-hosting ~~~~~~~~~~~~ To run Valgrind under Valgrind: -- Regards, Yao ------------ Yao Qi |