From jh_chen@hotmail.com  Thu Dec  3 22:20:30 1998
From: "Jason Chen" <jh_chen@hotmail.com>
Subject: Re: [ddd-bugs] Using DDD to debug perl program with log
To: zeller@gnu.org
Date: Thu, 03 Dec 1998 13:10:36 PST
Received: from hotmail.com (f249.hotmail.com [207.82.251.140])
	by infbssys.ips.cs.tu-bs.de (8.9.1/8.9.1) with SMTP id WAA03054
	for <zeller@gnu.org>; Thu, 3 Dec 1998 22:13:48 +0100
Received: (qmail 22952 invoked by uid 0); 3 Dec 1998 21:10:38 -0000
Message-ID: <19981203211038.22950.qmail@hotmail.com>
Received: from 198.93.2.17 by www.hotmail.com with HTTP;
	Thu, 03 Dec 1998 13:10:36 PST
X-Originating-IP: [198.93.2.17]
MIME-Version: 1.0
Content-Type: text/plain
Status: RO

Hi,

    Thanks for quick response!!!

    And Thanks for providing such a good software.

Here's the code with line number which is shown exactly in ddd

1 #!/usr/local/bin/perl -w
2 printf "test1\n";
3 printf "test2\n";
4 printf "test3\n";
5 printf "test4\n";
6 printf "test5\n";
7 printf "test6\n";


Here's what I did:

ddd31 test2.pl
Break (at line 3)  (the red stop shows correctly)
Break (at line 6)  (the red stop didn't show)
Run
Cont           (the arrow stops at line 3)
Cont	       (the arrow stops at line 6 though there's no red stop)

    What I am curious is that: in C debugging, there's always a red
stop sign for every breakpoint I set. But not in perl debugging.

Here are the versions I tried:

ddd3.09, ddd3.092, ddd3.1 --> I compiled in Solaris 2.6
ddd3.09, ddd3.092, ddd3.1 --> I compiled in RedHat 4.2 (Linux)
ddd3.1 --> I get the binary version for Solaris 2.5 from your ftp site

They all have the same situations


Here's the log:

DDD 3.1 (sparc-sun-solaris2.6), Copyright (C) 1998 TU Braunschweig.
Compiled with GCC 2.7.2, libstdc++ 2.7.2
Requires X11R6, Xt11R6, Motif 1.2.6 (OSF/Motif Version 1.2.6)
Includes DDD core, manual, app-defaults, XPM 3.4.10, Athena Panner
Built 1998-12-02 by Jason Chen <chchen@ssa-de.sel.sony.com>.
$  ddd31 test2.pl
+  /bin/sh -c 'exec perl -d '\''test2.pl'\'''
#  Hello, world!
#  Starting Perl...
#  Raising core file size limit from 512 to 2147483647 bytes...
#  Raising core file size limit from 512 to 2147483647 bytes...done.
#  Running Perl (pid 17937, tty /dev/pts/23)...
#  Current language: perl
<- "\n"
   "Loading DB routines from perl5db.pl version 1.0401\n"
   "Emacs support available.\n"
   "\n"
   "Enter h or `h h\' for help.\n"
   "\n"
<- "main::(test2.pl:2):\tprintf \"test1\\n"
   "\";\n"
   "  DB<1> "
-> "$DB::emacs = 1\n"
<- "\n"
   "  DB<2> "
-> "p $ENV{\'PWD\'} || `pwd`\n"
<- "/cavd/home/chchen/lperl\n"
   "  DB<3> "
-> "L\n"
<- "  DB<3> "
#  Reading file "/cavd/home/chchen/lperl/test2.pl"...
#  Reading file "/cavd/home/chchen/lperl/test2.pl"...done.
#  File "/cavd/home/chchen/lperl/test2.pl" 7 lines, 168 characters
-> "# reset\n"
<- "\n"
   "  DB<4> "
-> "L\n"
<- "  DB<4> "
-> "h detach\n"
<- "Can\'t locate object method \"h\" via package \"detach\" at (eval 7) 
line 2, <IN> chunk 6.\n"
   "\teval \'($@, $!, $^E, $,, $/, $\\\\, $^W) = @saved;package main; 
$^D = $^D | $DB::db_stop;\n"
   "h detach;\n"
   "\n"
   ";\' called at /usr/local/lib/perl5/5.00502/perl5db.pl line 1233\n"
   "\tDB::eval called at /usr/local/lib/perl5/5.00502/perl5db.pl line 
1128\n"
   "\tDB::DB called at test2.pl line 2\n"
   "\n"
   "  DB<5> "
#  Starting Perl...done.
#  Welcome to DDD 3.1 "Blue Sky" (sparc-sun-solaris2.6)
-> "h r\n"
<- "r\t\tReturn from current subroutine.\n"
   "  DB<6> "
-> "h s\n"
<- "s [expr]\tSingle step [in expr].\n"
   "  DB<7> "
-> "h stepi\n"
<- "Can\'t locate object method \"h\" via package \"stepi\" at (eval 8) 
line 2, <IN> chunk 9.\n"
   "\teval \'($@, $!, $^E, $,, $/, $\\\\, $^W) = @saved;package main; 
$^D = $^D | $DB::db_stop;\n"
   "h stepi;\n"
   "\n"
   ";\' called at /usr/local/lib/perl5/5.00502/perl5db.pl line 1233\n"
   "\tDB::eval called at /usr/local/lib/perl5/5.00502/perl5db.pl line 
1128\n"
   "\tDB::DB called at test2.pl line 2\n"
   "\n"
   "  DB<8> "
-> "h n\n"
<- "n [expr]\tNext, steps over subroutine calls [in expr].\n"
   "  DB<9> "
-> "h nexti\n"
<- "Can\'t locate object method \"h\" via package \"nexti\" at (eval 9) 
line 2, <IN> chunk 11.\n"
   "\teval \'($@, $!, $^E, $,, $/, $\\\\, $^W) = @saved;package main; 
$^D = $^D | $DB::db_stop;\n"
   "h nexti;\n"
   "\n"
   ";\' called at /usr/local/lib/perl5/5.00502/perl5db.pl line 1233\n"
   "\tDB::eval called at /usr/local/lib/perl5/5.00502/perl5db.pl line 
1128\n"
   "\tDB::DB called at test2.pl line 2\n"
   "\n"
   "  DB<10> "
-> "h until\n"
<- "syntax error at (eval 10) line 2, at EOF\n"
   "\n"
   "  DB<11> "
-> "h c\n"
<- "c [line|sub]\tContinue; optionally inserts a one-time-only 
breakpoint\n"
   "\t\tat the specified position.\n"
   "command\t\tExecute as a perl statement in current package.\n"
   "  DB<12> "
-> "h signal\n"
<- "Can\'t locate object method \"h\" via package \"signal\" at (eval 
11) line 2, <IN> chunk 14.\n"
   "\teval \'($@, $!, $^E, $,, $/, $\\\\, $^W) = @saved;package main; 
$^D = $^D | $DB::db_stop;\n"
   "h signal;\n"
   "\n"
   ";\' called at /usr/local/lib/perl5/5.00502/perl5db.pl line 1233\n"
   "\tDB::eval called at /usr/local/lib/perl5/5.00502/perl5db.pl line 
1128\n"
   "\tDB::DB called at test2.pl line 2\n"
   "\n"
   "  DB<13> "
-> "h kill\n"
<- "syntax error at (eval 12) line 2, near \"h kill\"\n"
   "\n"
   "  DB<14> "
-> "h up\n"
<- "Can\'t locate object method \"h\" via package \"up\" at (eval 13) 
line 2, <IN> chunk 16.\n"
   "\teval \'($@, $!, $^E, $,, $/, $\\\\, $^W) = @saved;package main; 
$^D = $^D | $DB::db_stop;\n"
   "h up;\n"
   "\n"
   ";\' called at /usr/local/lib/perl5/5.00502/perl5db.pl line 1233\n"
   "\tDB::eval called at /usr/local/lib/perl5/5.00502/perl5db.pl line 
1128\n"
   "\tDB::DB called at test2.pl line 2\n"
   "\n"
   "  DB<15> "
-> "h down\n"
<- "Can\'t locate object method \"h\" via package \"down\" at (eval 14) 
line 2, <IN> chunk 17.\n"
   "\teval \'($@, $!, $^E, $,, $/, $\\\\, $^W) = @saved;package main; 
$^D = $^D | $DB::db_stop;\n"
   "h down;\n"
   "\n"
   ";\' called at /usr/local/lib/perl5/5.00502/perl5db.pl line 1233\n"
   "\tDB::eval called at /usr/local/lib/perl5/5.00502/perl5db.pl line 
1128\n"
   "\tDB::DB called at test2.pl line 2\n"
   "\n"
   "  DB<16> "
-> "b 3\n"
<- "  DB<17> "
-> "L\n"
<- "test2.pl:\n"
   " 3:\tprintf \"test2\\n"
   "\";\n"
   "   break if (1)\n"
   "  DB<17> "
-> "b 6\n"
<- "  DB<18> "
-> "L\n"
<- "test2.pl:\n"
   " 3:\tprintf \"test2\\n"
   "\";\n"
   "   break if (1)\n"
   " 6:\tprintf \"test5\\n"
   "\";\n"
   "   break if (1)\n"
   "  DB<18> "
-> "$ENV{\'TERM\'} = \'dumb\'\n"
<- "\n"
   "  DB<19> "
-> "R\n"
<- "Warning: some settings and command-line options may be lost!\n"
<- "\n"
   "Loading DB routines from perl5db.pl version 1.0401\n"
<- "Emacs support enabled.\n"
<- "\n"
   "Enter h or `h h\' for help.\n"
   "\n"
<- "\032\032test2.pl:2:0\n"
<- "  DB<19> "
-> "L\n"
<- "test2.pl:\n"
<- " 3:\tprintf \"test2\\n"
   "\";\n"
<- "   break if (1)\n"
<- " 6:\tprintf \"test5\\n"
   "\";\n"
<- "   break if (1)\n"
<- "  DB<19> "
-> "c\n"
<- "test1\n"
   "\032\032test2.pl:3:0\n"
   "  DB<19> "
-> "L\n"
<- "test2.pl:\n"
   " 3:\tprintf \"test2\\n"
   "\";\n"
   "   break if (1)\n"
   " 6:\tprintf \"test5\\n"
   "\";\n"
   "   break if (1)\n"
   "  DB<19> "
-> "c\n"
<- "test2\n"
   "test3\n"
   "test4\n"
   "\032\032test2.pl:6:0\n"
   "  DB<19> "
-> "L\n"
<- "test2.pl:\n"
   " 3:\tprintf \"test2\\n"
   "\";\n"
   "   break if (1)\n"
   " 6:\tprintf \"test5\\n"
   "\";\n"
   "   break if (1)\n"
   "  DB<19> "
-> "c\n"
<- "test5\n"
   "test6\n"
   "\032\032/usr/local/lib/perl5/5.00502/perl5db.pl:2178:0\n"
   "  DB<19> "
-> "L\n"
<- "test2.pl:\n"
   " 3:\tprintf \"test2\\n"
   "\";\n"
   "   break if (1)\n"
   " 6:\tprintf \"test5\\n"
   "\";\n"
   "   break if (1)\n"
   "  DB<19> "
#  Reading file "/usr/local/lib/perl5/5.00502/perl5db.pl"...
#  Reading file "/usr/local/lib/perl5/5.00502/perl5db.pl"...done.
#  File "/usr/local/lib/perl5/5.00502/perl5db.pl" 2183 lines, 92685 
characters


>Hi!
>
>Jason Chen writes:
>
> > There seems to be some problem to use DDD for perl debugging.
> > The breakpoints can be set only once (with a read stop sign), but 
for 
> > the rest of the breakpoints, they are all there, but not shown with 
the 
> > red stop sign.
>
>I'll need a `~/.ddd/log' file that illustrates this behaviour.
>
>-- 
>Andreas Zeller     Technische Universitaet Braunschweig, Germany
>                   mailto:zeller@acm.org 
http://www.cs.tu-bs.de/~zeller/
>


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

