~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to devel-docs/debug-plug-ins.txt

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    on:             shorthand for run:fatal-warnings. This is also the default
28
28
                    in the absence of an options string.
29
29
 
 
30
 
 
31
The steps to debug a plug-in are as follows:
 
32
 
 
33
  0. Make sure GIMP is built with debugging information (gcc -g)
 
34
 
 
35
  1. Start GIMP with the appropriate debugging environment variables
 
36
 
 
37
  2. Load the standalone plug-in program in the debugger (gdb or
 
38
     the ddd frontend to gdb)
 
39
 
 
40
  3. Invoke the plug-in procedure in GIMP. GIMP will start the plug-in
 
41
     process, then send a STOP signal to it and then print a message with
 
42
     the pid of the plug-in process to the terminal.
 
43
 
 
44
  4. Attach to the pid of the plug-in process in the debugger
 
45
 
 
46
  5. Set breakpoints where you want the plug-in to stop in the debugger
 
47
 
 
48
  6. Send the CONT signal (kill -CONT <pid>) to the plug-in process
 
49
 
 
50
  7. Enter "continue" in the debugger. The plug-in will then continue
 
51
     and break at the breakpoints.
 
52
 
 
53
 
30
54
Examples:
31
55
 
32
56
GIMP_PLUGIN_DEBUG=blur
38
62
 
39
63
    9000 is the pid of the new plug-in process. You can start your debugger,
40
64
    attach to it, set breakpoints/watches/etc. and continue from there.
 
65
    In case of the gdb typing "continue" will start the plugin.
41
66
 
42
67
GIMP_PLUGIN_DEBUG=blur,on
43
68