[Gimp-developer] Plugin Debugging Script

Brohan brohan at brohan.ca
Mon Aug 14 08:39:20 PDT 2006


I just made a tiny little shell script that helps me a bit with
debugging of plugins, and I'd like to share it. It really is a
lifesaver and saves the time spent doing ps -A, and then typing in the
process manually in gdb.

#!/bin/bash
plug_debug=`ps -eo pid,comm | grep $1 | sed s/'$1'//`; gdb attach $plug_debug

Just that simple, it accepts the command line argument of the name of
the plugin you want to debug, and then launches gdb :), was a nice
learning experience to figure out how to use sed.

Brohan


More information about the Gimp-developer mailing list