bugGNU Octave - Bugs: bug #45764, Errors in user scripts started...

 
 

bug #45764: Errors in user scripts started from 'debug>' show wrong line numbers

Submitted by:  Lachlan Andrew <lachlan>
Submitted on:  Sat 15 Aug 2015 12:14:49 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Lachlan Andrew <lachlan>
Originator Name: LachlanOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 22 Jul 2016 07:07:47 PM UTC, comment #2:

I pushed this changeset. Thanks!

John W. Eaton <jwe>
Project Administrator
Fri 01 Jul 2016 10:29:28 AM UTC, comment #1:

This replacement patch fixes a small bug in the previous one.

(file #37647)

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.
Sat 15 Aug 2015 12:14:49 AM UTC, original submission:

When running in debug mode, Octave does not update the current line number, although it does update the current file.

If line 100 of file1.m is "keyboard", and the user runs file2.m which causes an error, it will report the error as "file2.m, line 100".

This was done so that the stack frame in the original file doesn't get the wrong line number inserted. (See comment near line 700 in libinterp/parse-tree/pt-eval.cc)

The attached patch keeps track of when a new stack frame is created to run user code, and tracks the line numbers in that new frame, even if it is debug mode.

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #34649:  debug.patch added by lachlan (5KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by siko1056 (Updated the item)
  • -unavailable- added by lachlan (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 22 Jul 2016 07:07:47 PM UTCjweStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Fri 01 Jul 2016 10:29:28 AM UTClachlanAttached File-=>Added bug_45764_debug_line_nums.cset, #37647
    Wed 13 Apr 2016 09:56:26 AM UTClachlanStatusPatch Submitted=>Ready For Test
      Assigned toNone=>lachlan
      Release4.0.0=>dev
    Mon 28 Sep 2015 03:15:56 PM UTCsiko1056StatusNone=>Patch Submitted
    Sat 15 Aug 2015 12:14:49 AM UTClachlanAttached File-=>Added debug.patch, #34649

    Back to the top


    Powered by Savane 3.1-cleanup1