summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-12-02 22:16:56 +0000
committerNicholas Clark <nick@ccl4.org>2008-12-02 22:16:56 +0000
commiteb044b10917d0598b3201b68e4a5d3ba7d124ef3 (patch)
treefbeef4b13858774559ce221a6f35c745780a814d /pp_ctl.c
parentf9bddea7d2a0d824366014c8ee6ba57e7dedd8c3 (diff)
downloadperl-eb044b10917d0598b3201b68e4a5d3ba7d124ef3.tar.gz
Change PL_debug behaviour so that string eval lines are saved whenever
a subroutine is defined, even if the eval'd string has subsequent syntax errors. This allows the debugger to single step into these subroutines. p4raw-id: //depot/perl@34986
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 5096b3a426..e9b4bfc79c 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3739,7 +3739,9 @@ PP(pp_entereval)
} else {
/* We have already left the scope set up earler thanks to the LEAVE
in doeval(). */
- if (PERLDB_SAVESRC_INVALID) {
+ if (was != PL_breakable_sub_gen /* Some subs defined here. */
+ ? (PERLDB_LINE || PERLDB_SAVESRC)
+ : PERLDB_SAVESRC_INVALID) {
/* Retain the filegv we created. */
} else {
(void)hv_delete(PL_defstash, tmpbuf, len, G_DISCARD);