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.