bugGNU Octave - Bugs: bug #64271, dbstop (breakpoint_struct) does...


bug #64271: dbstop (breakpoint_struct) does not correctly restore breakpoints

Submitter:  Rik <rik5>
Submitted:  Thu 01 Jun 2023 04:37:39 PM UTC
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  8.3.0 Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Sun 04 Jun 2023 03:30:56 AM UTC, comment #2: 

I fixed things on the stable branch in this changeset: http://hg.savannah.gnu.org/hgweb/octave/rev/73720920057e

Marking as Fixed and closing report.

Rik <rik5>
Group administrator
Thu 01 Jun 2023 04:44:53 PM UTC, comment #1: 

For debugging, I'm attaching a data file "bp_list.var" which contains the breakpoint structure "bp_list" from the example in the original submission.  Checking "bp_list(2)" shows that there is no second breakpoint at line 65 of sind.m.  So, a reasonable path to debugging would be

load bp_list.var
# Set appropriate breakpoints in gdb
dbstop (bp_list)

(file #54804)

Rik <rik5>
Group administrator
Thu 01 Jun 2023 04:37:39 PM UTC, original submission:  

It should be possible to save/restore breakpoints using a BP_STRUCT.  According to Octave documentation,

bp_struct = dbstatus ();  # save current breakpoints
dbclear all               # clear breakpoints for this example
dbstop (bp_struct);       # restore breakpoints

However, here is the output of an Octave session which shows that an extra breakpoint is added at the end of the file for sind.m.

octave:11> dbstop ls
ans = 63
octave:12> dbstop sind
ans = 38
octave:13> dbstatus
breakpoint in ls at line 63
breakpoint in sind at line 38
octave:14> bp = dbstatus
bp =

  2x1 struct array containing the fields:


octave:15> dbclear all
octave:16> dbstatus
octave:17> dbstop (bp)
ans = 2
octave:18> dbstatus
breakpoint in ls at line 63
breakpoints in sind at lines 38 65

Rik <rik5>
Group administrator


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

Attach Files:

Attached Files
file #54804:  bp_list.var added by rik5 (953B - application/octet-stream)


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -email is unavailable- added by rik5 (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 project members can vote.


    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-06-04 rik5 Open/ClosedOpen Closed
    2023-06-04 rik5 StatusConfirmed Fixed
        Fixed ReleaseNone 8.3.0
    2023-06-01 rik5 Dependencies- bugs #64001 is dependent
    2023-06-01 rik5 Attached File- Added bp_list.var, #54804

    Back to the top

    Powered by Savane 3.12