Debugging a panel plugin with valgrind

Erik Harrison erikharrison at gmail.com
Tue Dec 19 01:32:22 CET 2006


On 12/18/06, Landry Breuil <landry.breuil at gmail.com> wrote:
> 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-debug page ?
>  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 ?

I've created a page for this technique and added a Debug section to
the panel howto on the wiki.

In general, all useful tidbits like this should (IMO) go onto the main
Xfce wiki somewhere. If you try to partition information too much you
kill any one resource before it gets any momentum.

If the Xfce wiki becomes so full of good info we need to do a
housecleaning on it, then the situation has IMPROVED.

>
> Landry
>
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://foo-projects.org/mailman/listinfo/xfce4-dev
>
>


-- 
Erik

<@kazin> why does php have 'echo' and 'print'?  Do they do different things?
<Bluefoxicy> kazin:  echo prints in a big empty room



More information about the Xfce4-dev mailing list