|
From: <sv...@va...> - 2007-09-17 22:35:56
|
Author: njn
Date: 2007-09-17 23:35:57 +0100 (Mon, 17 Sep 2007)
New Revision: 6854
Log:
Extra info about debugging with GDB
Modified:
trunk/README_DEVELOPERS
Modified: trunk/README_DEVELOPERS
===================================================================
--- trunk/README_DEVELOPERS 2007-09-17 22:28:21 UTC (rev 6853)
+++ trunk/README_DEVELOPERS 2007-09-17 22:35:57 UTC (rev 6854)
@@ -67,14 +67,22 @@
a particular tool) requires a bit more trickery but can be achieved
without too much problem by following these steps:
-(1) Set VALGRIND_LAUNCHER to <prefix>/bin/valgrind:
+(1) Set VALGRIND_LAUNCHER to point to the valgrind executable. Eg:
- export VALGRIND_LAUNCHER=/usr/local/bin/valgrind
+ export VALGRIND_LAUNCHER=/usr/local/bin/valgrind
-(2) Run "gdb <prefix>/lib/valgrind/<platform>/<tool>":
+ or for an uninstalled version in a source directory $DIR:
- gdb /usr/local/lib/valgrind/ppc32-linux/lackey
+ export VALGRIND_LAUNCHER=$DIR/coregrind/valgrind
+(2) Run gdb on the tool executable. Eg:
+
+ gdb /usr/local/lib/valgrind/ppc32-linux/lackey
+
+ or
+
+ gdb $DIR/.in_place/x86-linux/memcheck
+
(3) Do "handle SIGSEGV SIGILL nostop noprint" in GDB to prevent GDB from
stopping on a SIGSEGV or SIGILL:
@@ -90,6 +98,8 @@
(gdb) run pwd
+Steps (1)--(3) can be put in a .gdbinit file, but any directory names must
+be fully expanded (ie. not an environment variable).
Self-hosting
~~~~~~~~~~~~
|