Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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 surveying the Monastery: (7)
As of 2020-07-07 16:57 GMT
Find Nodes?
    Voting Booth?

    No recent polls found