| 1 |
README-VALGRIND |
| 2 |
--------------- |
| 3 |
|
| 4 |
You can run nxproxy (and nxcomp) under the supervision of valgrind |
| 5 |
(a very good memory debugger) by wrapping nxproxy in the following |
| 6 |
script: |
| 7 |
|
| 8 |
<snip> |
| 9 |
#!/bin/bash |
| 10 |
|
| 11 |
# Enable core dumps. |
| 12 |
|
| 13 |
ulimit -c unlimited |
| 14 |
|
| 15 |
# Set this to directory where nxproxy is located. |
| 16 |
|
| 17 |
NXPROXY_DIR=~/NX/nxproxy |
| 18 |
|
| 19 |
# Set this to directory where valgrind is located. |
| 20 |
|
| 21 |
VALGRIND_DIR=/usr/local/bin |
| 22 |
|
| 23 |
exec ${VALGRIND_DIR}/valgrind -v --leak-check=yes --leak-resolution=high \ |
| 24 |
--show-reachable=yes --show-reachable=yes \ |
| 25 |
--suppressions=${NXPROXY_DIR}/nxproxy.supp \ |
| 26 |
--num-callers=16 --logfile-fd=2 \ |
| 27 |
\ |
| 28 |
${NXPROXY_DIR}/nxproxy $1 $2 $3 $4 $5 $6 $7 $8 $9 |
| 29 |
<snip> |
| 30 |
|
| 31 |
Run the following commands on your shell, right in the place where |
| 32 |
the nxproxy executable is to be placed in your setup: |
| 33 |
|
| 34 |
$ cat >nxproxy |
| 35 |
<copy paste the previous lines here> |
| 36 |
$ chmod a+x nxproxy |
| 37 |
|
| 38 |
Output of valgrind will go on stderr, that is in session file, if |
| 39 |
run in NX environment. |