develooper Front page | perl.perl5.porters | Postings from March 2000

Help debugger help?

Thread Next
From:
Wolfgang Laun
Date:
March 14, 2000 01:55
Subject:
Help debugger help?
Message ID:
38CE0C76.847A0C41@alcatel.at
Trying to gain some experience with `perl -d', I ran

   $ perl -d -e 84   # Nick-Ing Simmons' mysterious errno value - note
that this is 42*2 ;-)

Is all of what is collected below intended?

Regards,
-Wolfgang

  DB<1> v
'Carp.pm' => '/usr/local/lib/perl5/5.6.0/Carp.pm'
'Exporter.pm' => '5.562 from /usr/local/lib/perl5/5.6.0/Exporter.pm'
'Term/Cap.pm' => '/usr/local/lib/perl5/5.6.0/Term/Cap.pm'
'Term/ReadLine.pm' => '/usr/local/lib/perl5/5.6.0/Term/ReadLine.pm'
'dumpvar.pl' => '/usr/local/lib/perl5/5.6.0/dumpvar.pl'
'perl5db.pl' => '1.06 from /usr/local/lib/perl5/5.6.0/perl5db.pl'

### OK.

  DB<2> h print
syntax error at (eval 4)[/usr/local/lib/perl5/5.6.0/perl5db.pl:1290]
line 2, near "h print"

### Maybe OK?

  DB<3> h z
z is not a debugger command.

### OK, I'm learning.

  DB<9> h zz
Can't locate object method "h" via package "zz" at (eval
5)[/usr/local/lib/perl5/5.6.0/perl5db.pl:1290] line 2, <IN> line 13.
 eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package main; $^D = $^D
| $DB::db_stop;
h zz;

;' called at /usr/local/lib/perl5/5.6.0/perl5db.pl line 1290
 DB::eval called at /usr/local/lib/perl5/5.6.0/perl5db.pl line 1184
 DB::DB called at /usr/local/lib/perl5/5.6.0/perl5db.pl line 2280
 DB::fake::at_exit() called at /usr/local/lib/perl5/5.6.0/perl5db.pl
line 2274
 DB::END() called at (eval
5)[/usr/local/lib/perl5/5.6.0/perl5db.pl:1290] line 0
 require 0 called at (eval
5)[/usr/local/lib/perl5/5.6.0/perl5db.pl:1290] line 0

### Oops, what is this?

  DB<11> h ()
Undefined subroutine &main::h called at (eval
7)[/usr/local/lib/perl5/5.6.0/perl5db.pl:1290] line 2, <IN> line 15.
 eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package main; $^D = $^D
| $DB::db_stop;
h ();

;' called at /usr/local/lib/perl5/5.6.0/perl5db.pl line 1290
 DB::eval called at /usr/local/lib/perl5/5.6.0/perl5db.pl line 1184
 DB::DB called at /usr/local/lib/perl5/5.6.0/perl5db.pl line 2280
 DB::fake::at_exit() called at /usr/local/lib/perl5/5.6.0/perl5db.pl
line 2274
 DB::END() called at (eval
7)[/usr/local/lib/perl5/5.6.0/perl5db.pl:1290] line 0
 require 0 called at (eval
7)[/usr/local/lib/perl5/5.6.0/perl5db.pl:1290] line 0

### Shouldn't try random input to `h', should I?

  DB<13> h \
  cont: \
  cont: \\\
  cont: \
  cont:
Backslash found where operator expected at (eval
8)[/usr/local/lib/perl5/5.6.0/perl5db.pl:1290] line 4, near "h

\"
 eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package main; $^D = $^D
| $DB::db_stop;
h

\\\\

;

;' called at /usr/local/lib/perl5/5.6.0/perl5db.pl line 1290
 DB::eval called at /usr/local/lib/perl5/5.6.0/perl5db.pl line 1184
 DB::DB called at /usr/local/lib/perl5/5.6.0/perl5db.pl line 2280
 DB::fake::at_exit() called at /usr/local/lib/perl5/5.6.0/perl5db.pl
line 2274
 DB::END() called at (eval
8)[/usr/local/lib/perl5/5.6.0/perl5db.pl:1290] line 4
 require 0 called at (eval
8)[/usr/local/lib/perl5/5.6.0/perl5db.pl:1290] line 4
 (Do you need to predeclare h?)
 eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package main; $^D = $^D
| $DB::db_stop;
h

\\\\

;

;' called at /usr/local/lib/perl5/5.6.0/perl5db.pl line 1290
 DB::eval called at /usr/local/lib/perl5/5.6.0/perl5db.pl line 1184
 DB::DB called at /usr/local/lib/perl5/5.6.0/perl5db.pl line 2280
 DB::fake::at_exit() called at /usr/local/lib/perl5/5.6.0/perl5db.pl
line 2274
 DB::END() called at (eval
8)[/usr/local/lib/perl5/5.6.0/perl5db.pl:1290] line 4
 require 0 called at (eval
8)[/usr/local/lib/perl5/5.6.0/perl5db.pl:1290] line 4
syntax error at (eval 8)[/usr/local/lib/perl5/5.6.0/perl5db.pl:1290]
line 4, near "h

\"

### Definitely not!
DB<18> n
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<1> l
2280==>   "Debugged program terminated.  Use `q' to quit or `R' to
restart.";
2281  }
2282
2283  package DB;   # Do not trace this 1; below!


### Not my program - am I debugging the debugger?


  DB<7> !!perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:

  Platform:
    osname=linux, osvers=2.2.12-20, archname=i686-linux
    uname='linux attk34 2.2.12-20 #1 mon sep 27 10:40:35 edt 1999 i686
unknown '
    config_args='-de'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define
    use64bitint=undef use64bitall=undef uselongdouble=undef
usesocks=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux
(egcs-1.1.2 release)
    cppflags='-fno-strict-aliasing'
    ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    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, 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
    libc=/lib/libc-2.1.2.so, 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: USE_LARGE_FILES
  Locally applied patches:
   v5.6.0-RC1
  Built under linux
  Compiled at Mar 10 2000 09:55:32
  @INC:
    /usr/local/lib/perl5/5.6.0/i686-linux
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/i686-linux
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl
    .




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