develooper Front page | perl.perl5.porters | Postings from April 2001

Source lines invisible with -d

Thread Next
Peter Scott
April 29, 2001 10:50
Source lines invisible with -d
Message ID:
[mail to got dropped?  Here's one for p5p]

Somebody please let me know whether they can replicate these symptoms, I am 
experiencing them with 5.6.0 and 5.6.1 on Linux, and 5.6.1 on Solaris 
2.5.1.  At first I thought I had lost my mind but now this appears no more 
likely than usual.

Summary: executing a script which has a -d on its shebang line with "perl 
foo" causes the source lines to be invisible when stepping through.

Some of debugger preamble excised below for readability.

[peter@tweety ~]$ cat foo
#!/usr/bin/perl -d
$foo = 1;
$bar = 2;
$baz = $foo + $bar;

[peter@tweety ~]$ perl foo
Enter h or `h h' for help, or `man perldebug' for more help.

   DB<1> n
   DB<1> n
   DB<1> p $foo
   DB<2> p $bar
   DB<3> q

This does not occur with invocations of "./foo" or "perl -d foo":

[peter@tweety ~]$ perl -d foo
Enter h or `h h' for help, or `man perldebug' for more help.

main::(foo:2):  $foo = 1;
   DB<1> n
main::(foo:3):  $bar = 2;
   DB<1> q
[peter@tweety ~]$ ./foo
Enter h or `h h' for help, or `man perldebug' for more help.

main::(./foo:2):        $foo = 1;
   DB<1> n
main::(./foo:3):        $bar = 2;
   DB<1> q

Configuration for Linux below:

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
     osname=linux, osvers=2.2.14-5.0, archname=i586-linux
     uname='linux 2.2.14-5.0 #1 tue mar 7 20:53:41 est 2000 i586 
unknown '
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=undef use5005threads=undef useithreads=undef 
     useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
     use64bitint=undef use64bitall=undef uselongdouble=undef
     cc='cc', ccflags ='-fno-strict-aliasing -DDEBUGGING 
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
     cppflags='-fno-strict-aliasing -DDEBUGGING -I/usr/local/include'
     ccversion='', gccversion='egcs-2.91.66 19990314/Linux (egcs-1.1.2 
release)', 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', 
     alignbytes=4, usemymalloc=n, prototype=define
   Linker and Libraries:
     ld='cc', ldflags =' -L/usr/local/lib'
     libpth=/usr/local/lib /lib /usr/lib
     libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt -lutil
     perllibs=-lnsl -ldl -lm -lc -lposix -lcrypt -lutil
     libc=/lib/, so=so, useshrplib=false, libperl=libperl.a
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
     cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl):
   Compile-time options: DEBUGGING USE_LARGE_FILES
   Built under linux
   Compiled at Apr 21 2001 11:01:56

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About