Debugging a panel plugin with valgrind
Jannis Pohlmann
jannis at xfce.org
Mon Dec 18 20:41:12 CET 2006
On Mon, 18 Dec 2006 09:24:51 +0100, Landry Breuil 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-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 ?
I'd rather add it to the Goodies website (dunno where yet, but this
could be discussed).
- Jannis
More information about the Xfce4-dev
mailing list