in reply to simple XS

I good way to understand where the perl XS code is segfaulting and why is to run:
 gdb --args perl script.pl 
When it seg faults in gdb:
 (gdb) bt full
Can you post that please?

Replies are listed 'Best First'.
Re^2: simple XS
by spx2 (Deacon) on Mar 01, 2010 at 15:59 UTC
    thanks kthakore, I had to install the perl-debug package in debian(so that I get a perl compiled with debugging symbols) and run gdb debugperl then run -I./blib/arch/auto/SJT/SJT.so  file.pl in order to use gdb on it, and then, contrary to intuition I had to put breakpoints on SJT.xs and not SJT.c like break SJT.xs:44, I highlighted with red the line that segfaulted above.