Debugging a panel plugin with valgrind

Landry Breuil landry.breuil at gmail.com
Mon Dec 18 09:24:51 CET 2006


Hello folks,

yesterday, thanks to ori_b on irc, i found an easy way to debug an external
panel-plugin with valgrind :
- in /usr/local/libexec/xfce4/panel-plugins/ (or where your plugins are
installed) rename the panel binary named foo-plugin to foo-plugin.real
- create an executable shellscript named foo-plugin in the same place,
containing :
#!/bin/sh
valgrind --log-file=/path/to/valgrind.output /path/to/panel-plugins/foo-
plugin.real $@
- add the plugin to the panel, it'll be really slow as wrapped in valgrind,
but you'll be able to hunt memory leaks using tail -f
/path/to/valgrind.output :)

Now, what to do with this information ?

Brian, you add it to your
http://spuriousinterrupt.org/projects/xfce4-debugpage ?
I add it to http://wiki.xfce.org/panel_plugin_howto with the gdb -p attach
method ?
I create a new page xfce_debugging_howto ?

Landry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20061218/fdceaa98/attachment.html>


More information about the Xfce4-dev mailing list