Now, we know that XGetMotionEvents is in libX11, so let's rebuild that.
bbyer:X11libs-16 bbyer$ cd libX11/
bbyer:libX11 bbyer$ ls -l
total 8
-rw-r--r-- 1 bbyer admin 35 Mar 30 2007 conf_flags
drwxr-xr-x 30 bbyer admin 1020 Jun 3 21:45 libX11-1.1.2
bbyer:libX11 bbyer$ cat conf_flags
--disable-xf86bigfont --without-xcbbbyer:libX11 bbyer$ (oops, no newline :/)
$ cd libX11-1.1.2
CFLAGS="-g3" will enable debugging symbols:
bbyer:libX11-1.1.2 bbyer$ CFLAGS="-g3" ./configure --prefix=/usr/X11 --disable-xf86bigfont --without-xcb
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
[...]bbyer:libX11-1.1.2 bbyer$ make
Making all in include
make[1]: Nothing to be done for `all'.
Making all in modules
[...]
(expect this to take 15-30 minutes -- libX11 is the second-largest module!)
bbyer:libX11-1.1.2 bbyer$ sudo cp /usr/X11/lib/libX11.6.2.0.dylib /usr/X11/lib/libX11.6.2.0.dylib.old
bbyer:libX11-1.1.2 bbyer$ sudo make install
Now, repeat the above steps with gimp and gdb. The only problem is, with this configuration I can't get it to crash, so I can't get a backtrace.
What we need is a way to get debugging symbols without recompiling. dSYMs to the rescue! Apple's build system extracts debugging symbols from all binaries using dsymutil, and then "strips" them to save space. I have placed all of the dSYM bundles for X11 here:
(First, copy back your old libX11!)
Here's how you use them:
bbyer:libX11-1.1.2 bbyer$ cd ~/X11-playground/
bbyer:X11-playground bbyer$ tar jxf libX11.6.dylib.dSYM.tar.bz2
[switch to first Terminal]
bbyer:~ bbyer$ /Volumes/GIMP/Gimp.app/Contents/Resources/bin/gimp --sync
[switch to second Terminal]
bbyer:X11-playground bbyer$ gdb attach 15031
GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct 2 04:07:49 UTC 2007)
[...](gdb) break gdk_x_error
Breakpoint 1 at 0xa45294
(gdb) cont
Continuing.