bugGNU Octave - Bugs: bug #41556, Unable to set multiple breakpoints...

 
 

bug #41556: Unable to set multiple breakpoints with dbstop

Submitter:  Jérôme <jeromegnu>
Submitted:  Tue 11 Feb 2014 10:25:59 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 29 Jan 2016 08:14:04 PM UTC, comment #4: 

Hi. Sorry, I don't use Octave/Matlab anymore.

Basically, if it allows this to work:

s=dbstatus;
save('breakpoints.mat', 's');
clear all
close all
clc
load('breakpoints.mat', 's');
dbstop(s);

then this bug report can be closed.

Jérôme <jeromegnu>
Sat 12 Dec 2015 09:08:07 AM UTC, comment #3: 

Input as a struct is supported by the patch at
https://savannah.gnu.org/patch/?8784. Jérôme, could you please have a got of that patch and give me some feedback?  Thanks!

Lachlan Andrew <lachlan>
Wed 12 Feb 2014 02:21:19 PM UTC, comment #2: 

Thank you for the workaround. I knew I could do that.

In fact, it is supported in Matlab :

http://www.mathworks.fr/fr/help/matlab/ref/dbstop.html#inputarg_s

Jérôme <jeromegnu>
Wed 12 Feb 2014 02:05:55 PM UTC, comment #1: 

in help dbstop there is no mention of dbstop accepting input of type struct; therefore, you'll have do something like:

for i=1:numel(s),  dbstop(s(i).name, s(i).line);  end

you could fill in a feature request for support for struct input in dbstop, but since it's also unsupported in matlab, it'd introduce an incompatibility.

Felipe G. Nievinski <fgnievinski>
Tue 11 Feb 2014 10:25:59 PM UTC, original submission:  

My objective is to save breakpoints while clearing variables :

-------------------

s=dbstatus;
save('breakpoints.mat', 's');
clear all
close all
clc
load('breakpoints.mat', 's');
dbstop(s);

-------------------

But dbstop does not accept structures :

-------------------

dbstop (s)
error: dbstop: struct input not implemented

-------------------

This output is from dev branch and comes from here :
https://savannah.gnu.org/bugs/?41338

On 3.8, I get this:

-------------------

>> dbstatus

breakpoint in file1 at line 1.
breakpoint in file2 at line 1.

>> s=dbstatus

s =

  2x1 struct array containing the fields:

    name
    file
    line

>>
>>
>> dbstop(s)

dbstop: accepting a struct
error: add_breakpoint: unable to find the requested function

>> s(1)

ans =

  scalar structure containing the fields:

    name = file1
    file = /home/jerome/projets/octave/file1.m
    line =  1

>> s(2)

ans =

  scalar structure containing the fields:

    name = file2
    file = /home/jerome/projets/octave/file2.m
    line =  1

>> dbstop(s)

dbstop: accepting a struct
error: add_breakpoint: unable to find the requested function

>> dbstop(s(1).name, s(1).line)

ans =  1

>> dbstop(s(2).name, s(2).line)

ans =  1

>> dbstop(s)

dbstop: accepting a struct
error: add_breakpoint: unable to find the requested function

-------------------


Jérôme <jeromegnu>

 

(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 lachlan (Posted a comment)
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by fgnievinski (Posted a comment)
  • -email is unavailable- added by jeromegnu (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
    2016-02-16 rik5 Open/ClosedOpen Closed
    2016-02-08 lachlan StatusConfirmed Fixed
        Operating SystemGNU/Linux Any
    2014-12-29 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code