This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
dump.c: handle GV being really a ref to a CV
authorDavid Mitchell <davem@iabyn.com>
Mon, 23 Jan 2017 16:12:38 +0000 (16:12 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 23 Jan 2017 16:49:46 +0000 (16:49 +0000)
commite18c4116c82b2027a1e5d4e6b9a7214d60779053
tree1d5dce550f356cdb6c84d59e109531347aa7d81e
parentbf1c7d4ad82bf8cd8059466e31fadb0318adffe3
dump.c: handle GV being really a ref to a CV

RT #129285

These days a 'GV' can actually just be a ref to a CV when the only thing
that would be stored in the glob is a CV. Update S_do_op_dump_bar() to
handle this. Formerly it would trigger an assert on a non-threaded build.

In fact, incorporate the fixed logic into a static function,
S_gv_display(), that is shared by both S_do_op_dump_bar() and
Perl_debop(); so both

    perl -Dx

and

    perl -Dt

get the benefit.

Also for the -Dx case, make it display the raw address of the GV too.
dump.c
ext/Devel-Peek/t/Peek.t