It is possible with GDB to debug perl-embedded XS code.  First and foremost,
turn on debugging in the make routine by uncommenting this line in 
Makefile.PL:

    #OPTIMIZE => '-g',

In order to debug the particular function of interest, you have to set a 
``pending" breakpoint.  (I'm pretty sure this means that gdb doesn't look
for the symbol in its table yet, it justs waits for it to manifest.)  
In the provided file cmds.gdb, this is illustrated:

set breakpoint pending on
set args /usr/bin/ipestimate realtered.hg18_mm7_monDom4_instance.xml
b XS_iPE__Model__BNTree__optimizeSSFileForTreeAndModel
r

Use this script to start a debugger on perl:

gdb --command=cmds.gdb /usr/bin/perl

When you start GDB on perl, perl runs until the script hits the XS code 
by pointing it to the function that will be called in iPE.so.  In the 
above example, you will want to change the instance file to whatever 
you are using.

Additionally, to debug a different function, you will change the breakpoint
function.  Note that this is not the function name in iPE.xs, but instead the
name of the automatically generated function in iPE.c.
