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

wishlist/idea: debug helper

Thread Next
From:
Jarkko Hietaniemi
Date:
February 3, 2003 04:10
Subject:
wishlist/idea: debug helper
Message ID:
20030203121013.GF2541@kosh.hut.fi
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 <jhi@iki.fi> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

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