Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to debug Perl that contains XS sections to see the program flow?

I have a project written in Perl with XS components written in C++. I am debugging with command like

perl -d perl_file.pl

How I can use the debugger to jump from Perl into those C++ files?

like image 259
s_m Avatar asked Oct 31 '22 19:10

s_m


1 Answers

You could use GNU Project Debugger.

gdb /usr/bin/perl
    r perl_file.pl

See perlhacktips:

  • Using gdb to look at specific parts of a program
  • Using gdb to look at what the parser/lexer are doing

Also see:

  • Get a stack trace from your running perl
  • App::Stacktrace
like image 70
Chankey Pathak Avatar answered Nov 15 '22 04:11

Chankey Pathak