Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Perl XS and gdb via C++

by artist (Parson)
on Jul 24, 2008 at 20:20 UTC ( #699955=perlquestion: print w/replies, xml ) Need Help??
artist has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks
I have C++ programs which calls for C routine as well. I can use gdb with C++ and it works fine. C++ programs also works fine with make file etc.. and runs nicely. Now I have Perl Interface to this program via XS Mechanism and I found out that there is a bug in a C routine ( called via extern from C++). I like to debug (using gdb) it without rebuilding the XS every now and then. How I can achieve the same? My platform is linux. I use Emacs M-x gdb.I appreciate your help.



Replies are listed 'Best First'.
Re: Perl XS and gdb via C++
by diotalevi (Canon) on Jul 25, 2008 at 07:11 UTC

    Ok, in that case make sure your XS is always compiled with symbols.

    WriteMakefile( ... OPTIMIZE => '-g', )

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://699955]
Approved by ikegami
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2016-10-28 11:00 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (381 votes). Check out past polls.