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

GDB tricks for debugging perl (Was: [perl #122868] crash inPerl_hv_common / S_share_hek_flags)

Thread Next
From:
demerphq
Date:
October 1, 2014 11:27
Subject:
GDB tricks for debugging perl (Was: [perl #122868] crash inPerl_hv_common / S_share_hek_flags)
Message ID:
CANgJU+XDP1n3vPRc9z=zefUXRM6PpWs2UPFadF4jV2CGsUDO5A@mail.gmail.com
FC just posted the following advice. I think these kind of tricks should be
gathered up into a perldoc which we can use. I know I could have saved some
time if I knew these tricks. (I know other tricks which I could add.) If
people like the idea how about perlgdbtricks.pod or something like that?

From FC:

This should give you the file and line number:

(gdb) p Perl_warn(my_perl, "")

Also, it may help you to reduce the test case if you get a Perl backtrace:

(gdb) p Perl_eval_pv(my_perl,"use Carp; Carp::cluck 'foo'",0)


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

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