Debugging a panel plugin with valgrind

Jannis Pohlmann jannis at xfce.org
Mon Dec 18 21:20:10 CET 2006


On Mon, 18 Dec 2006 20:12:00 +0100, Enrico Tröger wrote:

> On Mon, 18 Dec 2006 20:41:12 +0100, Jannis Pohlmann <jannis at xfce.org>
> wrote:
> 
> > 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).
> I don't think so. I should be in the wiki on the plugin howto site.
> Because it is useful for plugin writers not necessarily for plugin
> users who would more likely look on the goodies website.

I don't see why we should fill the more generic Xfce wiki with content
related to goodies (remember, all plugins are goodies, except those
shipped with the panel). The goodies wiki is not limited to user
information - in fact, it already contains a lot of information for
plugin developers.

- Jannis



More information about the Xfce4-dev mailing list