bugGNU Octave - Bugs: bug #53064, "clear all" should not...


bug #53064: "clear all" should not clear breakpoints

Submitter:  Avinoam Kalma <avinoam>
Submitted:  Mon 05 Feb 2018 06:09:44 AM UTC
Category:  Interpreter Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Avinoam Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Sun 11 Feb 2018 10:11:58 PM UTC, comment #3: 

It looks like it will be a little bit more difficult than just preventing their removal in the destructors.  I applied the patch and then tried

x = 5;
dbstop ls
clear all

The breakpoints are no longer visible to dbstatus, even if they haven't actually been removed.

Rik <rik5>
Group administrator
Fri 09 Feb 2018 04:51:17 PM UTC, comment #2: 

Currently, breakpoint lists are attached to the statement lists that are part of the octave_user_script and octave_user_function objects.  The destructors for those classes clear the breakpoints.

It may be true that fixing this problem is as easy as the attached patch.  But are the breakpoints restored properly when the function is loaded again?  I haven't checked.

It may be time to take another look at the way breakpoints are handled.  It seems to me that they should be stored external to the parse tree object instead of being attached to them, then used by the interpreter to decide when to stop.

(file #43215)

John W. Eaton <jwe>
Group administrator
Fri 09 Feb 2018 04:33:50 PM UTC, comment #1: 

Bah!  I'm sure we added removing breakpoints to 'clear all' specifically because Matlab did it this way.  And now we need to reverse and remove that functionality.

On the plus side, I don't think this is very hard.  Somewhere in the 'clear all' implementation there is going to be a function call to clear all breakpoints.  It should be as simple as removing one line of code, once it can be found.

Rik <rik5>
Group administrator
Mon 05 Feb 2018 06:09:44 AM UTC, original submission:  

Since Matlab 2015b, "clear all" does not clear breakpoints
see: https://www.mathworks.com/help/matlab/release-notes.html#busa1h6-21

"dbclear all" should be used to clear all breakpoints

Avinoam Kalma <avinoam>
Group Member


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

Attach Files:

Attached Files
file #43215:  diffs.txt added by jwe (706B - text/plain)


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by avinoam (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-05 pantxo Dependencies- bugs #53288 is dependent
    2018-02-09 jwe Attached File- Added diffs.txt, #43215
    2018-02-09 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code