It is definitely easier if you have the perl source available. It has been a long time since I have done this, but you should be able to compile it all with -g (and -DDEBUGGING) to enable the debugging stuff, and do
gdb /my/debugging/perl
(gdb) run my_script my_args
To make your life even easier, while you are recompiling your perl, link your .xs module in statically -- it will make setting breakpoints and the like easier, because your module will be loaded in from the get-go.
Another little trick is to use the perl debugger too:
gdb /my/debugging/perl
(gdb) run -d my_script my_args
Hitting Ctl-C from the perl debugging prompt will (or at least should...) drop you back down into the gdb prompt. (click
here for a post showing an example of this trick in use...)
It should also work with dbx or any other C-level debugger.
Best of luck...
--JAS
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.