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

 
 

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

Submitter:  Lachlan Andrew <lachlan>
Submitted:  Sat 15 Aug 2015 12:14:49 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  lachlan
Originator Name:  Lachlan Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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

I pushed this changeset.  Thanks!

John W. Eaton <jwe>
Group 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>
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>

 

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

Attach Files:
   
   
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
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by lachlan (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-22 jwe StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2016-07-01 lachlan Attached File- Added bug_45764_debug_line_nums.cset, #37647
    2016-04-13 lachlan StatusPatch Submitted Ready For Test
        Assigned toNone lachlan
        Release4.0.0 dev
    2015-09-28 siko1056 StatusNone Patch Submitted
    2015-08-15 lachlan Attached File- Added debug.patch, #34649

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code