Skip to content
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

debugger 'a' command doesn't work #12455

Closed
p5pRT opened this issue Oct 2, 2012 · 8 comments
Closed

debugger 'a' command doesn't work #12455

p5pRT opened this issue Oct 2, 2012 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented Oct 2, 2012

Migrated from rt.perl.org#115110 (status was 'resolved')

Searchable as RT115110$

@p5pRT
Copy link
Author

p5pRT commented Oct 2, 2012

From @khwilliamson

This is a bug report for perl from khw@​karl.(none),
generated with the help of perlbug 1.39 running under perl 5.17.5.


I'm not sure what to file this under, so did so under 'utilities'; I
reported this via email, but am now filing a ticket so it doesn't get
lost

When I set an 'a' action under 'perl -d', nothing happens.



Flags​:
  category=utilities
  severity=medium


Site configuration information for perl 5.17.5​:

Configured by khw at Tue Oct 2 08​:40​:12 MDT 2012.

Summary of my perl5 (revision 5 version 17 subversion 5) configuration​:
  Commit id​: 599f1ac
  Platform​:
  osname=linux, osvers=2.6.35-32-generic-pae,
archname=i686-linux-thread-multi-64int-ld
  uname='linux karl 2.6.35-32-generic-pae #67-ubuntu smp mon mar 5
21​:23​:19 utc 2012 i686 gnulinux '
  config_args='-des -Dprefix=/home/khw/blead -Dusedevel
-D'optimize=-ggdb3' -A'optimize=-ggdb3' -A'optimize=-O0' -Dman1dir=none
-Dman3dir=none -DDEBUGGING -Dcc=g++ -Dusemorebits -Dusethreads'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=undef, uselongdouble=define
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='g++', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O0 -ggdb3',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.4.5', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
  ivtype='long long', ivsize=8, nvtype='long double', nvsize=12,
Off_t='off_t', lseeksize=8
  alignbytes=4, prototype=define
  Linker and Libraries​:
  ld='g++', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /lib/../lib /usr/lib/../lib /lib /usr/lib
/usr/lib/i686-linux-gnu
  libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  libc=/lib/../lib/libc.so.6, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.12'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -ggdb3 -ggdb3 -O0
-L/usr/local/lib -fstack-protector'

Locally applied patches​:


@​INC for perl 5.17.5​:

/home/khw/blead/lib/perl5/site_perl/5.17.5/i686-linux-thread-multi-64int-ld
  /home/khw/blead/lib/perl5/site_perl/5.17.5
  /home/khw/blead/lib/perl5/5.17.5/i686-linux-thread-multi-64int-ld
  /home/khw/blead/lib/perl5/5.17.5
  /home/khw/blead/lib/perl5/site_perl
  .


Environment for perl 5.17.5​:
  HOME=/home/khw
  LANG=en_US.UTF-8
  LANGUAGE=en_US​:en
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)

PATH=/home/khw/bin​:/home/khw/print/bin​:/bin​:/usr/local/sbin​:/usr/local/bin​:/usr/sbin​:/usr/bin​:/sbin​:/usr/games​:/home/khw/cxoffice/bin
  PERL5OPT=-w
  PERL_BADLANG (unset)
  SHELL=/bin/ksh

@p5pRT
Copy link
Author

p5pRT commented Oct 3, 2012

From @jkeenan

On Tue Oct 02 13​:28​:49 2012, public@​khwilliamson.com wrote​:

This is a bug report for perl from khw@​karl.(none),
generated with the help of perlbug 1.39 running under perl 5.17.5.

-----------------------------------------------------------------
I'm not sure what to file this under, so did so under 'utilities'; I
reported this via email, but am now filing a ticket so it doesn't get
lost

When I set an 'a' action under 'perl -d', nothing happens.
-----------------------------------------------------------------
---

Confirmed.

##########
$ cat xdata.pl
#!/usr/local/bin/perl
use strict;
use warnings;
use feature qw( :5.10 );

while (my $l = <DATA>) {
  chomp $l;
  say $l;
}

__DATA__
123456789012 This is a test
3456789012345This is another test
6789012345678This is yet another test
9012345678901Is this yet another test?
234567890123 Yes, this is another test.
4567890123456I think this is a test.
7890123456789Now is the time.
0123456789012For all good men.
3456789012345To come to the aid party.
678901234678 This is the tenth line.

$ perl -d xdata.pl

Loading DB routines from perl5db.pl version 1.37
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

main​::(xdata.pl​:6)​: while (my $l = <DATA>) {
  DB<1> a 8 print "As I was saying\n";
  DB<2> c
123456789012 This is a test
3456789012345This is another test
6789012345678This is yet another test
9012345678901Is this yet another test?
234567890123 Yes, this is another test.
4567890123456I think this is a test.
7890123456789Now is the time.
0123456789012For all good men.
3456789012345To come to the aid party.
678901234678 This is the tenth line.
Debugged program terminated. Use q to quit or R to restart,
  use o inhibit_exit to avoid stopping after program termination,
  h q, h R or h o to get additional info.
#########

I would have expected "As I was saying" to be printed 10 times.

@p5pRT
Copy link
Author

p5pRT commented Oct 3, 2012

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Oct 3, 2012

From @shlomif

On Tue Oct 02 18​:12​:02 2012, jkeenan wrote​:

On Tue Oct 02 13​:28​:49 2012, public@​khwilliamson.com wrote​:

This is a bug report for perl from khw@​karl.(none),
generated with the help of perlbug 1.39 running under perl 5.17.5.

-----------------------------------------------------------------
I'm not sure what to file this under, so did so under 'utilities'; I
reported this via email, but am now filing a ticket so it doesn't get
lost

When I set an 'a' action under 'perl -d', nothing happens.
-----------------------------------------------------------------
---

Confirmed.

##########
$ cat xdata.pl
#!/usr/local/bin/perl
use strict;
use warnings;
use feature qw( :5.10 );

while (my $l = <DATA>) {
chomp $l;
say $l;
}

__DATA__
123456789012 This is a test
3456789012345This is another test
6789012345678This is yet another test
9012345678901Is this yet another test?
234567890123 Yes, this is another test.
4567890123456I think this is a test.
7890123456789Now is the time.
0123456789012For all good men.
3456789012345To come to the aid party.
678901234678 This is the tenth line.

$ perl -d xdata.pl

Loading DB routines from perl5db.pl version 1.37
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

main​::(xdata.pl​:6)​: while (my $l = <DATA>) {
DB<1> a 8 print "As I was saying\n";
DB<2> c
123456789012 This is a test
3456789012345This is another test
6789012345678This is yet another test
9012345678901Is this yet another test?
234567890123 Yes, this is another test.
4567890123456I think this is a test.
7890123456789Now is the time.
0123456789012For all good men.
3456789012345To come to the aid party.
678901234678 This is the tenth line.
Debugged program terminated. Use q to quit or R to restart,
use o inhibit_exit to avoid stopping after program termination,
h q, h R or h o to get additional info.
#########

I would have expected "As I was saying" to be printed 10 times.

This particular test case is working fine in the
shlomif-perl-d-refactoring branch (with a test). However «a print
"Foobar\n";» (without a line number) does not appear work properly
there. I'll look into it.

Regards,

-- Shlomi Fish

shlomif@​telaviv1​:~/Download/unpack/perl/p5/git/perl$ ./perl -Ilib -d
xdata.pl

Loading DB routines from perl5db.pl version 1.39_05
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

main​::(xdata.pl​:7)​: while (my $l = <DATA>) {
  DB<32> n
main​::(xdata.pl​:8)​: chomp $l;
  DB<32> a print "Foobar\n";
  DB<33> c
123456789012 This is a test
String found where operator expected at (eval 9)[lib/perl5db.pl​:732]
line 1, near "rint "Foobar\n""
at (eval 9)[lib/perl5db.pl​:732] line 1, <DATA> line 2.
  eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
  DB​::eval() called at lib/perl5db.pl line 1980
  DB​::DB called at xdata.pl line 8
  (Do you need to predeclare rint?)
at (eval 9)[lib/perl5db.pl​:732] line 1, <DATA> line 2.
  eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
  DB​::eval() called at lib/perl5db.pl line 1980
  DB​::DB called at xdata.pl line 8
syntax error at (eval 9)[lib/perl5db.pl​:732] line 1, near "rint "Foobar\n""
3456789012345This is another test
String found where operator expected at (eval 10)[lib/perl5db.pl​:732]
line 1, near "rint "Foobar\n""
at (eval 10)[lib/perl5db.pl​:732] line 1, <DATA> line 3.
  eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
  DB​::eval() called at lib/perl5db.pl line 1980
  DB​::DB called at xdata.pl line 8
  (Do you need to predeclare rint?)
at (eval 10)[lib/perl5db.pl​:732] line 1, <DATA> line 3.
  eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
  DB​::eval() called at lib/perl5db.pl line 1980
  DB​::DB called at xdata.pl line 8
syntax error at (eval 10)[lib/perl5db.pl​:732] line 1, near "rint "Foobar\n""
6789012345678This is yet another test
String found where operator expected at (eval 11)[lib/perl5db.pl​:732]
line 1, near "rint "Foobar\n""
at (eval 11)[lib/perl5db.pl​:732] line 1, <DATA> line 4.
  eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
  DB​::eval() called at lib/perl5db.pl line 1980
  DB​::DB called at xdata.pl line 8
  (Do you need to predeclare rint?)
at (eval 11)[lib/perl5db.pl​:732] line 1, <DATA> line 4.
  eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
  DB​::eval() called at lib/perl5db.pl line 1980
  DB​::DB called at xdata.pl line 8
syntax error at (eval 11)[lib/perl5db.pl​:732] line 1, near "rint "Foobar\n""
9012345678901Is this yet another test?
String found where operator expected at (eval 12)[lib/perl5db.pl​:732]
line 1, near "rint "Foobar\n""
at (eval 12)[lib/perl5db.pl​:732] line 1, <DATA> line 5.
  eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
  DB​::eval() called at lib/perl5db.pl line 1980
  DB​::DB called at xdata.pl line 8
  (Do you need to predeclare rint?)
at (eval 12)[lib/perl5db.pl​:732] line 1, <DATA> line 5.
  eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
  DB​::eval() called at lib/perl5db.pl line 1980
  DB​::DB called at xdata.pl line 8
syntax error at (eval 12)[lib/perl5db.pl​:732] line 1, near "rint "Foobar\n""
234567890123 Yes, this is another test.
String found where operator expected at (eval 13)[lib/perl5db.pl​:732]
line 1, near "rint "Foobar\n""
at (eval 13)[lib/perl5db.pl​:732] line 1, <DATA> line 6.

@p5pRT
Copy link
Author

p5pRT commented Oct 5, 2012

From @shlomif

On Wed Oct 03 03​:06​:35 2012, shlomif wrote​:

This particular test case is working fine in the
shlomif-perl-d-refactoring branch (with a test). However �a print
"Foobar\n";� (without a line number) does not appear work properly
there. I'll look into it.

OK, it's fixed now in shlomif-perl-d-refactoring in commit
0c25192d6e590f610c1dfb3d914773144e8cf64e .

Regards,

-- Shlomi Fish

Regards,

-- Shlomi Fish

shlomif@​telaviv1​:~/Download/unpack/perl/p5/git/perl$ ./perl -Ilib -d
xdata.pl

Loading DB routines from perl5db.pl version 1.39_05
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

main​::(xdata.pl​:7)​: while (my $l = <DATA>) {
DB<32> n
main​::(xdata.pl​:8)​: chomp $l;
DB<32> a print "Foobar\n";
DB<33> c
123456789012 This is a test
String found where operator expected at (eval 9)[lib/perl5db.pl​:732]
line 1, near "rint "Foobar\n""
at (eval 9)[lib/perl5db.pl​:732] line 1, <DATA> line 2.
eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
DB​::eval() called at lib/perl5db.pl line 1980
DB​::DB called at xdata.pl line 8
(Do you need to predeclare rint?)
at (eval 9)[lib/perl5db.pl​:732] line 1, <DATA> line 2.
eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
DB​::eval() called at lib/perl5db.pl line 1980
DB​::DB called at xdata.pl line 8
syntax error at (eval 9)[lib/perl5db.pl​:732] line 1, near "rint
"Foobar\n""
3456789012345This is another test
String found where operator expected at (eval 10)[lib/perl5db.pl​:732]
line 1, near "rint "Foobar\n""
at (eval 10)[lib/perl5db.pl​:732] line 1, <DATA> line 3.
eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
DB​::eval() called at lib/perl5db.pl line 1980
DB​::DB called at xdata.pl line 8
(Do you need to predeclare rint?)
at (eval 10)[lib/perl5db.pl​:732] line 1, <DATA> line 3.
eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
DB​::eval() called at lib/perl5db.pl line 1980
DB​::DB called at xdata.pl line 8
syntax error at (eval 10)[lib/perl5db.pl​:732] line 1, near "rint
"Foobar\n""
6789012345678This is yet another test
String found where operator expected at (eval 11)[lib/perl5db.pl​:732]
line 1, near "rint "Foobar\n""
at (eval 11)[lib/perl5db.pl​:732] line 1, <DATA> line 4.
eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
DB​::eval() called at lib/perl5db.pl line 1980
DB​::DB called at xdata.pl line 8
(Do you need to predeclare rint?)
at (eval 11)[lib/perl5db.pl​:732] line 1, <DATA> line 4.
eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
DB​::eval() called at lib/perl5db.pl line 1980
DB​::DB called at xdata.pl line 8
syntax error at (eval 11)[lib/perl5db.pl​:732] line 1, near "rint
"Foobar\n""
9012345678901Is this yet another test?
String found where operator expected at (eval 12)[lib/perl5db.pl​:732]
line 1, near "rint "Foobar\n""
at (eval 12)[lib/perl5db.pl​:732] line 1, <DATA> line 5.
eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
DB​::eval() called at lib/perl5db.pl line 1980
DB​::DB called at xdata.pl line 8
(Do you need to predeclare rint?)
at (eval 12)[lib/perl5db.pl​:732] line 1, <DATA> line 5.
eval 'no strict; ($@​, $!, $^E, $,, $/, $\\, $^W) =
@​DB​::saved;package main; rint "Foobar\\n";;
' called at lib/perl5db.pl line 732
DB​::eval() called at lib/perl5db.pl line 1980
DB​::DB called at xdata.pl line 8
syntax error at (eval 12)[lib/perl5db.pl​:732] line 1, near "rint
"Foobar\n""
234567890123 Yes, this is another test.
String found where operator expected at (eval 13)[lib/perl5db.pl​:732]
line 1, near "rint "Foobar\n""
at (eval 13)[lib/perl5db.pl​:732] line 1, <DATA> line 6.

@p5pRT
Copy link
Author

p5pRT commented Jan 15, 2013

From @jkeenan

On Fri Oct 05 16​:13​:57 2012, shlomif wrote​:

On Wed Oct 03 03​:06​:35 2012, shlomif wrote​:

This particular test case is working fine in the
shlomif-perl-d-refactoring branch (with a test). However �a print
"Foobar\n";� (without a line number) does not appear work properly
there. I'll look into it.

OK, it's fixed now in shlomif-perl-d-refactoring in commit
0c25192d6e590f610c1dfb3d914773144e8cf64e .

Regards,

-- Shlomi Fish

Have these changes been merged into blead yet? If so, then we should be
able to close the ticket.

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Jan 15, 2013

From @shlomif

Hi,

On Mon Jan 14 16​:53​:30 2013, jkeenan wrote​:

On Fri Oct 05 16​:13​:57 2012, shlomif wrote​:

On Wed Oct 03 03​:06​:35 2012, shlomif wrote​:

This particular test case is working fine in the
shlomif-perl-d-refactoring branch (with a test). However �a print
"Foobar\n";� (without a line number) does not appear work properly
there. I'll look into it.

OK, it's fixed now in shlomif-perl-d-refactoring in commit
0c25192d6e590f610c1dfb3d914773144e8cf64e .

Regards,

-- Shlomi Fish

Have these changes been merged into blead yet? If so, then we should be
able to close the ticket.

Thank you very much.
Jim Keenan

My branch was merged and this is what my shell gives​:

shlomif@​telaviv1​:~/Download/unpack/perl/p5/git/perl$ git log blead
--grep 'Fix \"a \[command'
commit f4beae3
Author​: Shlomi Fish <shlomif@​shlomifish.org>
Date​: Wed Oct 3 14​:28​:28 2012 +0200

  Fix "a [command]" statement.
 
  Without a line number. See​:
 
  https://rt-archive.perl.org/perl5/Ticket/Display.html?id=115110 .

so it seems like it was fixed. I could not find my original commit ID at
first but "git show 0c25192d6e590f610c1dfb3d914773144e8cf64e" was able
to find it. Closing this as RESOLVED.

Regards,

-- Shlomi Fish

@p5pRT
Copy link
Author

p5pRT commented Jan 15, 2013

@jkeenan - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant