-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perldb does not setup %dbline with the shebang option -d #10055
Comments
From [email protected]This is a bug report for perl from heiko@heiko-desktop.nonet, If I want to use the -d option in the first line after the shebang Here is a test file, which tries to set a breakpoint at line 8 heiko@heiko-desktop:~/perl/my_tests$ cat option_d_bug.pl print "Hello\n";Here is a session without the -d commandline option. No line Loading DB routines from perl5db.pl version 1.33 Enter h or `h h' for help, or `man perldebug' for more help. main::(option_d_bug.pl:8):
|
From @cpansprout
The first time gv_fetchfile is called for a particular file, it This bug seems to have existed for a very long time and has been |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Jan 18, 2010, at 7:37 AM, Rafael Garcia-Suarez wrote:
Right you are. Here it is.
|
From @cpansproutInline Patchdiff -Nurp blead/gv.c blead-71806/gv.c
--- blead/gv.c 2009-12-14 06:36:09.000000000 -0800
+++ blead-71806/gv.c 2010-01-13 16:47:31.000000000 -0800
@@ -121,9 +121,9 @@ Perl_gv_fetchfile_flags(pTHX_ const char
#else
sv_setpvn(GvSV(gv), name, namelen);
#endif
- if (PERLDB_LINE || PERLDB_SAVESRC)
- hv_magic(GvHVn(gv_AVadd(gv)), NULL, PERL_MAGIC_dbfile);
}
+ if ((PERLDB_LINE || PERLDB_SAVESRC) && !GvAV(gv))
+ hv_magic(GvHVn(gv_AVadd(gv)), NULL, PERL_MAGIC_dbfile);
if (tmpbuf != smallbuf)
Safefree(tmpbuf);
return gv;
diff -Nurp blead/t/run/switchd.t blead-71806/t/run/switchd.t
--- blead/t/run/switchd.t 2009-11-19 08:51:41.000000000 -0800
+++ blead-71806/t/run/switchd.t 2010-01-13 16:46:39.000000000 -0800
@@ -9,7 +9,7 @@ BEGIN { require "./test.pl"; }
# This test depends on t/lib/Devel/switchd.pm.
-plan(tests => 2);
+plan(tests => 3);
my $r;
@@ -44,3 +44,16 @@ __SWDTEST__
like($r, qr/^sub<Devel::switchd::import>;import<Devel::switchd a 42>;DB<main,$::tempfile_regexp,9>;sub<Foo::foo>;DB<Foo,$::tempfile_regexp,5>;DB<Foo,$::tempfile_regexp,6>;DB<Foo,$::tempfile_regexp,6>;sub<Bar::bar>;DB<Bar,$::tempfile_regexp,2>;sub<Bar::bar>;DB<Bar,$::tempfile_regexp,2>;sub<Bar::bar>;DB<Bar,$::tempfile_regexp,2>;$/);
}
+# [perl #71806]
+cmp_ok(
+ runperl(
+ switches => [ '"-Mless ++INC->{q-Devel/_.pm-}"' ],
+ progs => [
+ '#!perl -d:_',
+ 'sub DB::DB{} print scalar @{q/_</.__FILE__}',
+ ],
+ ),
+ '>',
+ 0,
+ 'The debugger can see the lines of the main program under #!perl -d',
+); |
From @cpansproutOn Mon Jan 25 00:48:15 2010, sprout wrote:
Applied, with some tweaks and a perldelta entry, as |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#71806 (status was 'resolved')
Searchable as RT71806$
The text was updated successfully, but these errors were encountered: