Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Debugger line numbering anomaly

by LanX (Sage)
on Dec 24, 2019 at 20:03 UTC ( #11110597=note: print w/replies, xml ) Need Help??


in reply to Re^2: Debugger line numbering anomaly
in thread Debugger line numbering anomaly

again:
  • is the problem reproducible if you copy the code from this thread?
  • did you include warn to see if the compilation recorded the right line-numbers?
and
  • can you narrow down which code-line is starting the problem?
update

There are internal arrays which hold all parsed lines of the debugger, you could check there if the debugger got it right.

perldebguts :

Each array @{"_<$filename"} holds the lines of $filename for a file compiled by Perl.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^4: Debugger line numbering anomaly
by lzipin (Acolyte) on Dec 24, 2019 at 23:01 UTC

    First, I compared (in the programmer's text editor Epsilon) perl5db.pl v 1.5.1 and 1.5.3. Only a few differences; none seems significant to this issue.

    So I copied the 1.5.3 version to /usr/share/perl/5.26/perl5db.pl on the Xubuntu machine. Same (wrong) debug behavior as with the original 1.5.1 version. Further, the debug command "x @{$main::{'_<t6.pl'}}" is also missing the (original) line 5. This suggests (so far) that it's a Perl 5.26 bug, and not a perl5db.pl bug.

    Still exploring ...

    -- Lee

      well, good luck ignoring the other stuff I asked you to check.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        How is db_tst.pl different from what I posted?

        No, the script doesn't have Windows/DOS line endings. If it did, it wouldn't matter to Linux, if I call it via 'perl script.pl'. But it clearly runs fine on Linux (at least my Xubuntu and Debian installations). And the debugger issues no warnings.

        What kind of warning could I insert that would help? It's not a runtime problem; it's a problem of the debugger missing a line, and so subsequent line numbers are off by one.

        I note in the perl5db.pl POD text:

        @dbline Local alias to the magical line array, "@{$main::{'_<'.$filename}}" , supplied by the Perl interpreter to the debugger. Contains the source +.

        That's pretty clear that the Perl 5.26.1 interpreter is providing a buggered line array.

        I don't know how to follow up with that, except to upgrade to something newer.

        -- Lee

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11110597]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2022-01-17 21:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (52 votes). Check out past polls.

    Notices?