develooper Front page | perl.perl5.porters | Postings from November 2011

[perl #104820] C<c ln> broken in blead's debugger

Thread Next
From:
Craig A . Berry
Date:
November 28, 2011 20:56
Subject:
[perl #104820] C<c ln> broken in blead's debugger
Message ID:
rt-3.6.HEAD-5084-1322530320-1388.104820-75-0@perl.org
# New Ticket Created by  Craig A. Berry 
# Please include the string:  [perl #104820]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=104820 >


In 5.14.2:

% cat foo.pl
use strict;
my $x = 'hello world';
print "$x\n";
% perl -d foo.pl

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

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

main::(foo.pl:2):       my $x = 'hello world';
 DB<1> c 3
main::(foo.pl:3):       print "$x\n";
 DB<2> q

Everything is peachy.  But in blead it breezes past the breakpoint
without stopping:

% ./perl -Ilib -d foo.pl

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

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

 DB<1> c 3
hello world
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.
 DB<2> q

And if I do a C<b 3> followed by C<c>, which should be equivalent to C<c 3>, the breakpoint apparently fires but does not display the source line without the addition of an explicit list command:

% ./perl -Ilib -d foo.pl

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

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

  DB<1> b 3
  DB<2> c
  DB<2> l
3==>b	print "$x\n";
4 	
  DB<2> s
hello world
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.  
  DB<2> q

which turns out to be just a subset of the fact that no line display happens at all when stepping through the code in the debugger that currently ships with blead.

And a manual bisect (because it was really easy to guess what broke it
by browsing the history) shows that this was caused by:

commit e09195afbb882765b006957aee1cc366505ea987
Author: Shlomi Fish <shlomif@shlomifish.org>
Date:   Sun Sep 4 12:29:59 2011 -0700

   Add enable/disable commands for breakpoints in perl -d


I think this needs to be reverted or fixed before 5.16.  I've seen this on a couple of platforms, but the examples in this report are from:

% ./perl -Ilib -V
Summary of my perl5 (revision 5 version 15 subversion 5) configuration:
  Commit id: 3c7be43ff115659a3b88a71696bf4228733c9bca
  Platform:
    osname=darwin, osvers=11.2.0, archname=darwin-2level
    uname='darwin triamond.local 11.2.0 darwin kernel version 11.2.0: tue aug 9 20:54:00 pdt 2011; root:xnu-1699.24.8~1release_x86_64 x86_64 '
    config_args='-Dusedevel -DDEBUGGING -des'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-common -DPERL_DARWIN -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include',
    optimize='-O3 -g',
    cppflags='-fno-common -DPERL_DARWIN -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include'
    ccversion='', gccversion='4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -L/usr/local/lib -L/opt/local/lib'
    libpth=/usr/local/lib /opt/local/lib /usr/lib
    libs=-ldbm -ldl -lm -lutil -lc
    perllibs=-ldl -lm -lutil -lc
    libc=, so=dylib, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib -fstack-protector'


Characteristics of this binary (from libperl): 
  Compile-time options: DEBUGGING HAS_TIMES PERLIO_LAYERS
                        PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
                        PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_64_BIT_ALL
                        USE_64_BIT_INT USE_LARGE_FILES USE_LOCALE
                        USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                        USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
  Built under darwin
  Compiled at Nov 28 2011 19:14:50
  @INC:
    lib
    /usr/local/lib/perl5/site_perl/5.15.5/darwin-2level
    /usr/local/lib/perl5/site_perl/5.15.5
    /usr/local/lib/perl5/5.15.5/darwin-2level
    /usr/local/lib/perl5/5.15.5
    /usr/local/lib/perl5/site_perl
    .


________________________________________
Craig A. Berry
mailto:craigberry@mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About