[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: question about debugging Perl modules written in C with DDD
From: |
R. Bernstein |
Subject: |
Re: question about debugging Perl modules written in C with DDD |
Date: |
Tue, 18 Nov 2008 03:43:19 -0500 |
Peter Wainwright writes:
> On Sun, 2008-11-16 at 12:50 -0800, Chuck Pareto wrote:
> > Hi,
> > I was referred to this tool (DDD) as a way to debug Perl Modules
> > written in C. I currently use Komodo IDE to program and debug Perl and
> > I am using a module called Text::Scan. Although I can walk through
> > Perl scripts to debug them in Komodo, Komodo will not step through C
> > code located within the module. I need to figure out how the c code
> > works and I'm trying to find something that will allow me to step
> > through the module including the c code. Can anyone tell me if DDD
> > will accomplish this, if not does anyone know how I can do this?
> > Thanks,
> > Chuck
>
> Anyone else tried something like this?
>
> DDD can step through C code, but as far as I know, it can't step through
> Perl in the same session.
>
> As far as I know, DDD can run one underlying "inferior" debugger at a
> time, so you can't step from Perl code into C code. Multilanguage
> debugging would be a nice feature.
>
> However, you could try debugging the Perl interpreter with GDB as
> inferior debugger, and setting breakpoints at the C functions you want
> to debug.
>
> Peter
See http://eigenclass.org/hiki.rb?ruby+live+process+introspection for
how to do this in Ruby.
In theory the same could be done in Perl. But having looked at Perl,
Python and Ruby at the C and C API level what makes Ruby cooler for
this is Ruby's uniformity, simplicity, and transparancy here. Not
only is Ruby more dynamic/powerful, but at the same time it is
*simpler*. Seems hard to believe, but in this regard it feels more
like LISP.