The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

CV Manipulation Functions

The XSUB-writer's equivalent of caller(). The returned PERL_CONTEXT structure can be interrogated to find all the information returned to Perl by caller. Note that XSUBs don't get a stack frame, so caller_cx(0, NULL) will return information for the immediately-surrounding Perl code.

This function skips over the automatic calls to &DB::sub made on the behalf of the debugger. If the stack frame requested was a sub called by DB::sub, the return value will be the frame for the call to DB::sub, since that has the correct line number/etc. for the call site. If dbcxp is non-NULL, it will be set to a pointer to the frame for the sub call itself.

Check for the cases 0 or 3 of cur_env.je_ret, only used inside an eval context.

0 is used as continue inside eval,

3 is used for a die caught by an inner eval - continue inner loop

See cop.h: je_mustcatch, when set at any runlevel to TRUE, means eval ops must establish a local jmpenv to handle exception traps.

Locate the CV corresponding to the currently executing sub or eval. If db_seqp is non_null, skip CVs that are in the DB package and populate *db_seqp with the cop sequence number at the point that the DB:: code was entered. (This allows debuggers to eval in the scope of the breakpoint rather than in the scope of the debugger itself.)