# save this file as .debug and execute this as:
# gdb -command=.debug
# or if you prefer gui
# ddd -command=.debug
#
# NOTE: Adjust the path to the perl executable
# also this perl should be built with debug enabled
file /usr/bin/perl
# If you need to debug with gdb a live script and not a library, you
# are going to have a hard time to set any breakpoint in the C code.
# the workaround is force Inline to compile and load .so, by putting
# all the code in the BEGIN {} block and call Inline->init from there.
#
# you also need to prevent from Inline deleting autogenerated .xs so
# you can step through the C source code, and of course you need to
# add '-g' so .so won't be stripped of debug info
#
# here is a sample perl script that can be used with this gdb script
#
# test.pl
# #-----#
# use strict;
# use warnings;
#
# BEGIN {
# use Inline Config =>
# #FORCE_BUILD => 1,
# CLEAN_AFTER_BUILD => 0;
#
# use Inline C => Config =>
# OPTIMIZE => '-g';
#
# use Inline C => <