develooper Front page | perl.perl5.porters | Postings from February 2003

wishlist/idea: debug helper

Thread Next
Jarkko Hietaniemi
February 3, 2003 04:10
wishlist/idea: debug helper
Message ID:
Wouldn't it be nice if there were a C level function that could be
called from a C level debugger like gdb and which would show the
*perl* statement (and filename, linenumber if known) being executed?
dump.c:Perl_op_dump() exists, but its output is not that nice to read,
use of B::Deparse might be useful (if available...)

Whether this function belongs in the core (dump.c?) or an extension
(B:: something, Devel::Peek?) I leave for others to discuss, but how
I can see this utility being used is:

$ gdb perl -e 'for(@a=0..99){pop @a}'
Segmentation violation ...
(gdb) call Perl_dump_where(...)
-e:1: pop @a;

Jarkko Hietaniemi <> "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About