bugGNU Octave - Bugs: bug #59677, Debug pointer doesn't move with...

 
 

bug #59677: Debug pointer doesn't move with debug steps during 'nested' debugging

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Sun 13 Dec 2020 10:33:05 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 03 Feb 2021 07:18:19 PM UTC, comment #3: 

I see the problem but I'm not sure how to fix it.  We may need to rethink the way code locations are stored in the call stack during code evaluation.

John W. Eaton <jwe>
Group administrator
Mon 21 Dec 2020 08:42:05 AM UTC, comment #2: 

Initially I figured it was a mere cosmetic issue.
With your findings I now think it probably still is, but with a deeper cause :-)

Category => "Interpreter"

Philip Nienhuis <philipnienhuis>
Group Member
Sun 20 Dec 2020 07:58:56 PM UTC, comment #1: 

Confirmed on Linux. But this does not seem to be an issue of the GUI. When you enable the option "Print debug location in command window ..." (preferences, tab "Command") the location printed in the command window also repeatedly displays "stopped in fb at line 2".

You can also try this in the cli version:


dbstop fa 2
dbstop fb 2
fa
fb
dbstep
dbstep
...


Torsten Lilge <ttl>
Group Member
Sun 13 Dec 2020 10:33:05 PM UTC, original submission:  

First off, I don't know if this is a real bug; but what I see is surely counter-intuitively.
Steps to reproduce, all in the GUI:

Define two functions funca and funcb, more or less as follows:

function a = funca ()
  a = 1;
  a = 2;
  a = funcb ();
  a = 4;
endfunction



function b = funcb ()
  b = 1;
  b = 2;
  b = 3;
  b = 4;
endfunction


In both functions, add a breakpoints at L.2.

Then, type 'funca'
=> execution stops in funca at L2, fine.

Now, in funca.m select L.4 'a = funcb ();' and press F9
=> executions stops in funcb at L2, and the prompt changes to '[1]debug>', fine.

Then, press the "Step" button repeatedly.
The 'debug pointer' (yellow arrow) stays at L.2 (that is the bug) but in the Workspace pane the value of 'b' is increased until funcb is finished (which AFAIU is correct).
So the debug pointer doesn't follow the "active" line in funcb. IOW, a sort of "blind" debugging stepping.

Going on clicking the 'Step' button, execution is picked up again in funca and the debug pointer correctly follows the "active" lines, also in funcb.
I do have the "Always show debug breakpoints and pointers (opens related file if closed)" set.

Philip Nienhuis <philipnienhuis>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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 ttl (Posted a comment)
  • -email is unavailable- added by philipnienhuis (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-02-03 jwe StatusNone Confirmed
        Release6.1.0 dev
    2020-12-21 philipnienhuis CategoryGUI Interpreter
    2020-12-20 ttl Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code