Skip to content

Commit 899a356

Browse files
committed
dump.c: add S_deb_padvar_cv() function
Make S_deb_padvar() a thin wrapper over a new S_deb_padvar_cv() function, which does the same thing (display a pad variable name), but does it for a specified CV rather than only for the currently executing CV. This function will be used shorty.
1 parent b586026 commit 899a356

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

dump.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3254,13 +3254,13 @@ Perl_runops_debug(pTHX)
32543254
}
32553255

32563256

3257-
/* print the names of the n lexical vars starting at pad offset off */
3257+
/* Print the names of the n lexical vars starting at pad offset off
3258+
* in the specified CV */
32583259

32593260
STATIC void
3260-
S_deb_padvar(pTHX_ PADOFFSET off, int n, bool paren)
3261+
S_deb_padvar_cv(pTHX_ CV *cv, PADOFFSET off, int n, bool paren)
32613262
{
32623263
PADNAME *sv;
3263-
CV * const cv = deb_curcv(cxstack_ix);
32643264
PADNAMELIST *comppad = NULL;
32653265
int i;
32663266

@@ -3284,6 +3284,16 @@ S_deb_padvar(pTHX_ PADOFFSET off, int n, bool paren)
32843284
}
32853285

32863286

3287+
/* Print the names of the n lexical vars starting at pad offset off n the
3288+
* currently executing CV */
3289+
3290+
STATIC void
3291+
S_deb_padvar(pTHX_ PADOFFSET off, int n, bool paren)
3292+
{
3293+
S_deb_padvar_cv(aTHX_ deb_curcv(cxstack_ix), off, n, paren);
3294+
}
3295+
3296+
32873297
/* append to the out SV, the name of the lexical at offset off in the CV
32883298
* cv */
32893299

0 commit comments

Comments
 (0)