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

 
 

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

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Sun 13 Dec 2020 10:33:05 PM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  Open
Release:  6.1.0 Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

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>
Project 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>
Project 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>
Project 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 ttl (Posted a comment)
  • -email is unavailable- added by philipnienhuis (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-12-21 philipnienhuis CategoryGUI => Interpreter
    2020-12-20 ttl Operating SystemMicrosoft Windows => Any

    Back to the top


    Powered by Savane 3.5