[maemo-developers] [maemo-developers] Hints for using Valgrind tools in Scratchbox
From: José Dapena Paz jdapena at igalia.comDate: Mon Nov 13 15:35:48 EET 2006
- Previous message: [maemo-developers] Unresolved issues (Week 45)
- Next message: [maemo-developers] Hints for using Valgrind tools in Scratchbox
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, Some hints for using valgrind tools in Scratchbox+Maemo. First, standard way to use valgrind and gdb. af-sb-init.sh supports parameters for using these tools with a piece of software we want to study: af-sb-init.sh start --valgrind=my_app af-sb-init.sh start --gdb=my_app Valgrind will store the results in /tmp/valgrind-my_app.log*. Gdb will show its prompt on load of my_app. This way you can debug/valgrind the program you want. An interesting example would be: "I want to valgrind my status bar applet". And this is easy: af-sb-init.sh start --valgrind=maemo_af_desktop You'll get the results in /tmp/valgrind-maemo_af_desktop.log* If you want to run other valgrind tools, you would better use these environment variables: * VALGRINDCMD: the command you want to run inside valgrind. * VALGRIND: the valgrind command and parameters. For example, if you want to run massif of maemo_af_desktop, you would run: export VALGRINDCMD=maemo_af_desktop export VALGRIND="valgrind --tool=massif --num-callers=50 --trace-children=yes --depth=5 --format=html --log-file=/tmp/massif --alloc-fn=g_malloc --alloc-fn=g_malloc0 --alloc-fn=g_realloc --alloc-fn=g_slice_alloc --alloc-fn=g_try_malloc --alloc-fn=g_slice_alloc0" af-sb-init.sh start ... do your stuff ... af-sb-init.sh stop And you'll get your massif reports in /tmp (logs) and $PWD (html and postscripts). -- José Dapena Paz <jdapena at igalia.com> Igalia
- Previous message: [maemo-developers] Unresolved issues (Week 45)
- Next message: [maemo-developers] Hints for using Valgrind tools in Scratchbox
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]