summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-10-28 16:14:35 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-10-28 16:15:11 -0700
commit43e4250a611bbded7aab070226e8d756638cd569 (patch)
treebc86c70fc3d612cb15413d27ee121e46c64d1309 /gv.c
parent2e3295e33c63f6b4e7c3db43ec277607d5ce716d (diff)
downloadperl-43e4250a611bbded7aab070226e8d756638cd569.tar.gz
[perl #119799] Set breakpoints without *DB::dbline
The elements of the %{"_<..."} hashes (where ‘...’ is the filename), whose keys are line numbers, are used to set breakpoints on the given lines. The corresponding @{"_<..."} array contains the actual lines of source code. %{"_<..."} actually acts on the array of lines that @DB::dbline is aliased to. The assumption is that *DB::dbline = *{"_<..."} will have taken place first. Hence, all %{"_<..."} hashes are the same, when it comes to writing to keys. It is more useful for each %{"_<..."} hash to set breakpoints on its corresponding file’s lines regardless of whether @DB::dbline has been aliased, so that is what this commit does. Each hash’s mg_obj pointer in its dbfile magic now points to the array, and magic_setdbline uses it instead of PL_DBline.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index c7453156ce..e7ef9a7ec4 100644
--- a/gv.c
+++ b/gv.c
@@ -132,7 +132,7 @@ Perl_gv_fetchfile_flags(pTHX_ const char *const name, const STRLEN namelen,
#endif
}
if ((PERLDB_LINE || PERLDB_SAVESRC) && !GvAV(gv))
- hv_magic(GvHVn(gv_AVadd(gv)), NULL, PERL_MAGIC_dbfile);
+ hv_magic(GvHVn(gv), GvAVn(gv), PERL_MAGIC_dbfile);
if (tmpbuf != smallbuf)
Safefree(tmpbuf);
return gv;