develooper Front page | perl.perl5.porters | Postings from October 2008

perl5db questions..

Thread Next
From:
Edward Peschko
Date:
October 29, 2008 04:22
Subject:
perl5db questions..
Message ID:
5cfa99000810282258r778b7a41y5a5ddeee106d8364@mail.gmail.com
All,

I was wondering - exactly how does the perl5 debugger interact with
perl (the executable?)

Basically, what I'm trying to do is write my own trace function, where
I can instrument my code with a start_trace function and a stop_trace
function in such a way that I can

    - run a program with the debug flag
    - hit 'c' to record all the actions between the start_trace and
stop_trace functions, non-interactively.

So far so good, but I'm looking through perl5db.pl and it doesn't tell
the whole story. I don't see where $DB::single is intercepted (to stop
the execution) or why 'n' calls DB::DB wheras 'c' does not (for
example), or how $DB::trace is working with watchpoints.I don't even
see where the code itself is executed.

So what parts am I missing inside the C source code itself that isn't
in perl5db? I'm trying to run perl itself, debugging a perl script,
through a debugger (gdb) but so far no luck (it hangs at the command
prompt)

Thanks much for any pointers,

Ed

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About