home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!wupost!usc!isi.edu!sondeen
- From: sondeen@isi.edu (Jeff Sondeen)
- Newsgroups: comp.lang.perl
- Subject: "b subname" doesn't work in "perl -d" (v. 4.019) ?
- Message-ID: <21995@venera.isi.edu>
- Date: 22 Jul 92 20:30:56 GMT
- Sender: news@isi.edu
- Organization: USC-Information Sciences Institute
- Lines: 55
-
- When I run the perl debugger (ala "perl -d"), and say "b subname" and
- "c", I expect the debugger to break on the first line of the
- subroutine, however it doesn't. If I explicitely say "b <some line #
- in subname>", then it does break there. Here's the details:
-
- 194% perl -d ~/bin/edifi.p bigmult.edn
-
- Loading DB routines from $RCSfile: perldb.pl,v $$Revision: 4.0.1.2 $$Date: 91/11/05 17:55:58 $
- Emacs support available.
-
- Enter h for help.
-
- main'(/sondeen/bin/edifi.p:11): $rename = 1;
- DB<1> b legal
- DB<2> b 664
- DB<3> L
- 11: $rename = 1;
- 654: sub legal {
- break if (1)
- 664: return 0 if ($name =~ /^\d/ && $name !~ /^\d+$/);
- break if (1)
- DB<3> c
- main'legal(/sondeen/bin/edifi.p:664): return 0 if ($name =~ /^\d/ && $name !~ /^\d+$/);
- DB<3>
-
-
- The problem is that the break was on line 664, not the first line of sub
- "legal" which is 662:
-
-
- 654: sub legal {
- 655: local($name) = @_;
- 656: local($i);
- 657:
- 658: # note: we must make names legal to the Hspice netlist generator
- 659: # in cadence, which limits names to 7 chars, and generates names
- 660: # of format I or N followed by int.
- 661:
- 662: return 0 if (length($name) > $max_name_length);
- 663:
- 664: return 0 if ($name =~ /^\d/ && $name !~ /^\d+$/);
- 665:
- 666: for ($i = 0; $i <= $#bad_chars; $i++) {
- 667: return 0 if index($name,$bad_chars[$i]) >= 0;
- 668: }
- 669: 1;
- 670: }
-
-
- Thanks for any help.
- --
- /jeff. "A sloppy, ungroomed appearance or inappropriate dress may be of
- great diagnostic significance, suggesting intellectual subnormality, a
- serious psychiatric disturbance, or a psychopathic disregard for
- social conventions." -- Robert Gregory, Adult Intellectual Assessment
-