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

perl -d on bleadperl has non-functional b command #11444

Closed
p5pRT opened this issue Jun 15, 2011 · 8 comments
Closed

perl -d on bleadperl has non-functional b command #11444

p5pRT opened this issue Jun 15, 2011 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 15, 2011

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

Searchable as RT92906$

@p5pRT
Copy link
Author

p5pRT commented Jun 15, 2011

From @shlomif

Created by @shlomif

In bleadperl (NOT perl-5.12.3) perl -d's "b" command does not appear
to do anything as verified on my x86-64 Mandriva Linux Cooker machine. This
patch adds a regression test to test for it.

See​:

http​://www.nntp.perl.org/group/perl.perl5.porters/2011/06/msg173568.html

Inline Patch
diff --git a/lib/perl5db.t b/lib/perl5db.t
index 4419136..f4f32da 100644
--- a/lib/perl5db.t
+++ b/lib/perl5db.t
@@ -27,7 +27,7 @@ my $dev_tty = '/dev/tty';
     }
 }
 
-plan(9);
+plan(10);
 
 sub rc {
     open RC, ">", ".perldb" or die $!;
@@ -177,6 +177,32 @@ SKIP: {
     is($output, '[$^X][done]', "taint");
 }
 
+# Testing that we can set a breakpoint
+{
+    rc(<<'EOF');
+&parse_options("NonStop=0 TTY=db.out LineInfo=db.out");
+
+sub afterinit {
+    push (@DB::typeahead,
+    'b 6',
+    'c',
+    q/do { use IO::Handle; STDOUT->autoflush(1); print "X={$x}\n"; }/,
+    'c',
+    'q',
+    );
+
+}
+EOF
+
+    my $output = runperl(switches => [ '-d', ], stderr => 1, progfile => '../lib/perl5db/t/breakpoint-bug');
+
+    like($output, qr/
+        X=\{Two\}
+        /msx,
+        "Can set breakpoint in a line.");
+}
+
+ 
 
 # clean up.
 
diff --git a/lib/perl5db/t/breakpoint-bug b/lib/perl5db/t/breakpoint-bug
new file mode 100644
index 0000000..5ac9874
--- /dev/null
+++ b/lib/perl5db/t/breakpoint-bug
@@ -0,0 +1,8 @@
+#!/usr/bin/perl
+my $x = "One";
+
+$x = "Two";
+
+my $y = "Lambda";
+
+$x = "Four";
Perl Info

Flags:
    category=core
    severity=high

Site configuration information for perl 5.12.3:

Configured by Mandriva at Wed May 18 10:05:41 UTC 2011.

Summary of my perl5 (revision 5 version 12 subversion 3) configuration:
   
  Platform:
    osname=linux, osvers=2.6.33.5-desktop-2mnb, archname=i386-linux-thread-multi
    uname='linux n8.mandriva.com 2.6.33.5-desktop-2mnb #1 smp thu jun 17 21:30:10 utc 2010 i686 i686 i386 gnulinux '
    config_args='-des -Dinc_version_list=5.12.2 5.12.2/i386-linux-thread-multi 5.12.1 5.12.1/i386-linux-thread-multi 5.12.0 5.12.0/i386-linux-thread-multi 5.10.1 5.10.0 5.8.8 5.8.7 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0 5.6.1 5.6.0 -Darchname=i386-linux -Dcc=gcc -Doptimize=-O2 -g -frecord-gcc-switches -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -mtune=generic -march=i586 -fasynchronous-unwind-tables -DDEBUGGING=-g -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dsitebin=/usr/local/bin -Dsiteman1dir=/usr/local/share/man/man1 -Dsiteman3dir=/usr/local/share/man/man3 -Dman3dir=/usr/share/man/man3pm -Dvendorman3dir=/usr/share/man/man3 -Dman3ext=3pm -Dcf_by=Mandriva -Dmyhostname=localhost -Dperladmin=root@localhost -Dcf_email=root@localhost -Ud_csh -Duseshrplib -Duseithreads -Di_db -Di_ndbm -Di_gdbm'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g -frecord-gcc-switches -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -mtune=generic -march=i586 -fasynchronous-unwind-tables',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.6.0 20110513 (prerelease)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.13.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.13'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.12.3/i386-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -frecord-gcc-switches -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -mtune=generic -march=i586 -fasynchronous-unwind-tables -L/usr/local/lib'

Locally applied patches:
    Mandriva Linux patches


@INC for perl 5.12.3:
    /home/shlomif/apps/perl/local-lib/lib/perl5/i386-linux-thread-multi
    /home/shlomif/apps/perl/local-lib/lib/perl5
    /home/shlomif/apps/perl/local-lib/lib/perl5/i386-linux-thread-multi
    /home/shlomif/apps/perl/local-lib/lib/perl5/i386-linux-thread-multi
    /home/shlomif/apps/perl/local-lib/lib/perl5
    /home/shlomif/apps/perl/local-lib/lib/perl5/i386-linux-thread-multi
    /home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.12.2/i386-linux-thread-multi
    /home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.12.2
    /home/shlomif/apps/perl/modules/lib/site_perl/5.12.2
    /home/shlomif/apps/perl/modules/lib/perl5/5.12.2/i386-linux-thread-multi
    /home/shlomif/apps/perl/modules/lib/perl5/5.12.2
    /usr/lib/perl5/site_perl/5.12.3/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.12.3
    /usr/lib/perl5/vendor_perl/5.12.3/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.12.3
    /usr/lib/perl5/5.12.3/i386-linux-thread-multi
    /usr/lib/perl5/5.12.3
    /usr/lib/perl5/site_perl/5.12.2
    /usr/lib/perl5/site_perl/5.12.2/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.12.1
    /usr/lib/perl5/site_perl/5.12.1/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.12.0
    /usr/lib/perl5/site_perl/5.12.0/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.10.1
    /usr/lib/perl5/site_perl/5.10.0
    /usr/lib/perl5/site_perl/5.8.8
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.12.2
    /usr/lib/perl5/vendor_perl/5.12.2/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.12.1
    /usr/lib/perl5/vendor_perl/5.12.1/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.12.0
    /usr/lib/perl5/vendor_perl/5.12.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.10.1
    /usr/lib/perl5/vendor_perl/5.10.0
    /usr/lib/perl5/vendor_perl
    .


Environment for perl 5.12.3:
    HOME=/home/shlomif
    LANG=en_GB.UTF-8
    LANGUAGE=en_GB:en
    LC_ADDRESS=en_US.UTF-8
    LC_COLLATE=en_US.UTF-8
    LC_CTYPE=en_US.UTF-8
    LC_IDENTIFICATION=en_GB.UTF-8
    LC_MEASUREMENT=en_GB.UTF-8
    LC_MESSAGES=en_US.UTF-8
    LC_MONETARY=en_US.UTF-8
    LC_NAME=en_GB.UTF-8
    LC_NUMERIC=en_GB.UTF-8
    LC_PAPER=en_US.UTF-8
    LC_SOURCED=1
    LC_TELEPHONE=en_US.UTF-8
    LC_TIME=en_GB.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/shlomif/apps/perl/perlbrew/bin:/home/shlomif/apps/perl/local-lib/bin:/home/shlomif/apps/apache-maven/apache-maven-2.1.0//bin:/home/shlomif/Download/unpack/graphics/fop/fop-0.93:/home/shlomif/apps/perl/modules/local/bin:/home/shlomif/apps/perl/modules/bin:/home/shlomif/apps/latemp/bin:/home/shlomif/apps/test/quadpres/bin:/home/shlomif/apps/vim/bin:/home/shlomif/bin:/home/shlomif/apps/perl/local-lib/bin:/home/shlomif/apps/apache-maven/apache-maven-2.1.0//bin:/usr/local/bin:/bin:/usr/bin:/usr/games:/usr/lib/qt4/bin
    PERL5DB=BEGIN { require qq{$ENV{HOME}/conf/trunk/shlomif-settings/perl/perldb/myperl5db.pl} }
    PERL5LIB=/home/shlomif/apps/perl/local-lib/lib/perl5:/home/shlomif/apps/perl/local-lib/lib/perl5/i386-linux-thread-multi:/home/shlomif/apps/perl/local-lib/lib/perl5:/home/shlomif/apps/perl/local-lib/lib/perl5/i386-linux-thread-multi:/home/shlomif/apps/perl/modules/lib/perl5/site_perl/5.12.2:/home/shlomif/apps/perl/modules/lib/site_perl/5.12.2:/home/shlomif/apps/perl/modules/lib/perl5/5.12.2
    PERLBREW_PATH=/home/shlomif/apps/perl/perlbrew/bin
    PERLBREW_ROOT=/home/shlomif/apps/perl/perlbrew
    PERLBREW_VERSION=0.21
    PERL_AUTOINSTALL=--skipdeps --alldeps
    PERL_BADLANG (unset)
    PERL_MM_OPT=INSTALL_BASE=/home/shlomif/apps/perl/local-lib
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Jun 15, 2011

From @cpansprout

On Wed Jun 15 12​:43​:40 2011, shlomif@​shlomifish.org wrote​:

In bleadperl (NOT perl-5.12.3) perl -d's "b" command does not appear
to do anything as verified on my x86-64 Mandriva Linux Cooker machine.
This
patch adds a regression test to test for it.

See​:

http​://www.nntp.perl.org/group/perl.perl5.porters/2011/06/msg173568.html

A binary search points to this commit​:

commit 6f83ef0
Author​: Nicholas Clark <nick@​ccl4.org>
Date​: Sun May 15 13​:21​:09 2011 +0100

  Create a lookup table for magic vtables from magic type, PL_magic_data.
 
  Use it to eliminate the large switch statement in Perl_sv_magic().
 
  As the table needs to be keyed on magic type, which is expressed as
C character
  constants, the order depends on the compiler's character set.
Frustratingly,
  EBCDIC variants don't agree on the code points for '~' and ']',
which we use
  here. Instead of having (at least) 4 tables, get the local runtime
to sort the
  table for us. Hence the regen script writes out the (unsorted)
mg_raw.h, which
  generate_uudmap sorts to generate mg_data.h

@p5pRT
Copy link
Author

p5pRT commented Jun 15, 2011

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

@p5pRT
Copy link
Author

p5pRT commented Jun 15, 2011

From @shlomif

On Wed Jun 15 13​:12​:48 2011, sprout wrote​:

On Wed Jun 15 12​:43​:40 2011, shlomif@​shlomifish.org wrote​:

In bleadperl (NOT perl-5.12.3) perl -d's "b" command does not appear
to do anything as verified on my x86-64 Mandriva Linux Cooker machine.
This
patch adds a regression test to test for it.

See​:

http​://www.nntp.perl.org/group/perl.perl5.porters/2011/06/msg173568.html

A binary search points to this commit​:

commit 6f83ef0
Author​: Nicholas Clark <nick@​ccl4.org>
Date​: Sun May 15 13​:21​:09 2011 +0100

Create a lookup table for magic vtables from magic type\,

PL_magic_data.

Use it to eliminate the large switch statement in Perl\_sv\_magic\(\)\.

As the table needs to be keyed on magic type\, which is expressed as

C character
constants, the order depends on the compiler's character set.
Frustratingly,
EBCDIC variants don't agree on the code points for '~' and ']',
which we use
here. Instead of having (at least) 4 tables, get the local runtime
to sort the
table for us. Hence the regen script writes out the (unsorted)
mg_raw.h, which
generate_uudmap sorts to generate mg_data.h

I ran git bisect just now and also got this exact git commit​:

6f83ef0 is the first bad commit
commit 6f83ef0

@p5pRT
Copy link
Author

p5pRT commented Jun 16, 2011

From @cpansprout

On Wed Jun 15 13​:30​:20 2011, shlomif wrote​:

On Wed Jun 15 13​:12​:48 2011, sprout wrote​:

On Wed Jun 15 12​:43​:40 2011, shlomif@​shlomifish.org wrote​:

In bleadperl (NOT perl-5.12.3) perl -d's "b" command does not appear
to do anything as verified on my x86-64 Mandriva Linux Cooker machine.
This
patch adds a regression test to test for it.

See​:

http​://www.nntp.perl.org/group/perl.perl5.porters/2011/06/msg173568.html

A binary search points to this commit​:

commit 6f83ef0
Author​: Nicholas Clark <nick@​ccl4.org>
Date​: Sun May 15 13​:21​:09 2011 +0100

Create a lookup table for magic vtables from magic type\,

PL_magic_data.

Use it to eliminate the large switch statement in Perl\_sv\_magic\(\)\.

As the table needs to be keyed on magic type\, which is expressed as

C character
constants, the order depends on the compiler's character set.
Frustratingly,
EBCDIC variants don't agree on the code points for '~' and ']',
which we use
here. Instead of having (at least) 4 tables, get the local runtime
to sort the
table for us. Hence the regen script writes out the (unsorted)
mg_raw.h, which
generate_uudmap sorts to generate mg_data.h

I ran git bisect just now and also got this exact git commit​:

6f83ef0 is the first bad commit
commit 6f83ef0

OK. I’ve fixed it. I’m just running tests....

@p5pRT
Copy link
Author

p5pRT commented Jun 16, 2011

From @cpansprout

On Wed Jun 15 12​:43​:40 2011, shlomif@​shlomifish.org wrote​:

In bleadperl (NOT perl-5.12.3) perl -d's "b" command does not appear
to do anything as verified on my x86-64 Mandriva Linux Cooker machine.
This
patch adds a regression test to test for it.

See​:

http​://www.nntp.perl.org/group/perl.perl5.porters/2011/06/msg173568.html

diff --git a/lib/perl5db.t b/lib/perl5db.t
index 4419136..f4f32da 100644
--- a/lib/perl5db.t
+++ b/lib/perl5db.t

I’ve just fixed this with commit f34d156.
Thank you for the test! I’ve just applied that as 2211a10.

And your breakpoint patch (<201104172031.52919.shlomif@​iglu.org.il>) has
been applied as 076b743.

@p5pRT
Copy link
Author

p5pRT commented Jun 16, 2011

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

@p5pRT p5pRT closed this as completed Jun 16, 2011
@p5pRT
Copy link
Author

p5pRT commented Jun 16, 2011

From @cpansprout

On Wed Jun 15 21​:59​:51 2011, sprout wrote​:

On Wed Jun 15 12​:43​:40 2011, shlomif@​shlomifish.org wrote​:

In bleadperl (NOT perl-5.12.3) perl -d's "b" command does not appear
to do anything as verified on my x86-64 Mandriva Linux Cooker machine.
This
patch adds a regression test to test for it.

See​:

http​://www.nntp.perl.org/group/perl.perl5.porters/2011/06/msg173568.html

diff --git a/lib/perl5db.t b/lib/perl5db.t
index 4419136..f4f32da 100644
--- a/lib/perl5db.t
+++ b/lib/perl5db.t

I’ve just fixed this with commit f34d156.
Thank you for the test! I’ve just applied that as 2211a10.

And your breakpoint patch (<201104172031.52919.shlomif@​iglu.org.il>) has
been applied as 076b743.

Oops. I missed a thank you. :-)

Thank you for the breakpoint feature!

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